Instantly share code, notes, and snippets.

View gist:35d5dc0c837842191d79468803e7a4a2

Install Composer on Managed Hosting at Domainfactory

Step 1:

Log in to your Managed Hosting Server via SSH

Step 2:

Add these two lines to .bashrc:

View README.md

Google Analytics Nginx Proxy

Google PageSpeed Insights flags browser caching of Google Analytics:

Leverage browser caching

Set up a proxy in your Nginx configuration file to address this issue.

Source

View README.md

Reformat a bootable USB drive

1. Identify volume

df -h

Output may look something like this:

Filesystem  Size  Used  Avail  Use%  Mounted on
View README.md

Increase key repeat rate on macOS

Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat

Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.

Source: https://apple.stackexchange.com/a/83923

View README.md

Fasd

Website: https://github.com/clvv/fasd

Usage

Jump to recent directory: z dirname

Jump to recent directory with interactive selection: zz

View README.md

Frontend Performance

Notes & tips

  • Reflow (Mozilla) = Layout (Webkit)
  • Loading: Layout > Paint > Composition
  • Composition is on GPU like translate > skips layout and paint loading cycle
  • Aim for 60 FPS
  • Only change properties that trigger compositing rather than layout or paint
  • Use requestAnimationFrame
View README.md