Skip to content

Instantly share code, notes, and snippets.

TSiege / The Technical Interview Cheat
Last active Jun 25, 2021
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat


I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!


Vestride /
Last active Jun 23, 2021
Encoding video for the web

Encoding Video


Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
jlong / uri.js
Created Apr 20, 2012
URI Parsing with Javascript
View uri.js
var parser = document.createElement('a');
parser.href = "";
parser.protocol; // => "http:"
parser.hostname; // => ""
parser.port; // => "3000"
parser.pathname; // => "/pathname/"; // => "?search=test"
parser.hash; // => "#hash"; // => ""
Adirael /
Created Aug 17, 2012
Fix wordpress file permissions
# This script configures WordPress file permissions based on recommendations
# from
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
nzakas / gist:5511916
Created May 3, 2013
Using GitHub inside a company
View gist:5511916

I'm doing some research on how companies use GitHub Enterprise (or public GitHub) internally. If you can help out by answering a few questions, I'd greatly appreciate it.

  1. What is the primary setup? Is there an organization and each official repo is owned by that organization?
  2. Does every engineer have a fork of each repo they're working on?
  3. Are engineers allowed to push directly to the official repo? Or must all commits go through a pull request?
  4. Do engineers work on feature branches on the main repo or on their own forks?
  5. Do you require engineers to squash commits and rebase before merging?
  6. Overall, what is the workflow for getting a new commit into the main repository?
  7. What sort of hooks do you make use of?
  8. Are there any ops issues you encountered? (Scaling, unforeseen downtime, etc.)
Integralist /
Created Nov 1, 2013
BBC News' RTL (right to left) solution

Right-to-Left (RTL)


There are two methods to use in order to flip CSS styles: interpolated properties and the flip() function.

  • Interpolation should be used for any property which has a direction (e.g. padding-left, margin-right, border-right, left, etc.)
  • flip() should be used for all other properties

Which properties need to be flipped?

stevenschobert / load_remote_content_mail_dot_app.scpt
Last active Mar 31, 2021
Apple Script to click the "Load Remote Content" button. I like to disable all remote content in, and then bind this script to a keyboard shortcut using Keyboard Maestro.
View load_remote_content_mail_dot_app.scpt
tell application "System Events" to tell process "Mail"
set mainWindow to a reference to the first window
set rootSplitter to a reference to the first splitter group of the mainWindow
set firstSplitter to a reference to the last splitter group of the rootSplitter
set scrollArea to a reference to the last scroll area of the firstSplitter
set scrollGroup to a reference to the first group of the scrollArea
if number of groups of the scrollGroup is greater than 1 then
set maybeRemoteContentGroup to a reference to the first group of the scrollGroup
leepettijohn / functions.php
Last active Mar 23, 2021
Add Event to The Events Calendar from a Gravity Form
View functions.php
//The following section is an add-on to this tutorial -
//Shout to for their initial work
/* Before Starting:
- Make sure you have these three plugins installed
- Gravity Forms
- The Events Calendar
- Gravity Forms + Custom Post Types
- Once Gravity Forms is installed, create a form with these fields
- Single Line Text (Event Title)
- Paragraph Text (Event Description)
ianmjones /
Last active Feb 27, 2021
A script for downloading the AWS PHP SDK v2, stripping down to S3 functionality and then applying a custom namespace.
#!/usr/bin/env bash
set -e
if [ ! -d src/amazon-s3-and-cloudfront ]; then
echo 'This script must be run from the repository root.'
exit 1
for PROG in composer find sed
claygriffiths /
Last active Nov 6, 2020 — forked from joost/
Resize Local by Flywheel VirtualBox image
# Steps we will take:
# 1. Change Local (Docker Machine) image type (this will take a bit)
# 2. Resize image
# 3. Resize partion
# Also see:
# IMPORTANT: Make sure Local is not running!