Skip to content

Instantly share code, notes, and snippets.

Sam Hasler SamHasler

Block or report user

Report or block SamHasler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:1057989
/**
Code copyright Dustin Diaz and Ross Harmes, Pro JavaScript Design Patterns.
**/
// Constructor.
var Interface = function (name, methods) {
if (arguments.length != 2) {
throw new Error("Interface constructor called with " + arguments.length + "arguments, but expected exactly 2.");
}
this.name = name;
@borgand
borgand / git-merge-svn
Last active Jan 7, 2019
A helper script to set *svn:mergeinfo* property when using `git svn dcommit` on merged git branches.This makes it possible to merge two SVN branches using **git-svn**.NB! the merged-from branch **MUST** be pushed to SVN.USAGE: git merge-svn <branch name>EDIT: added exit condition when mergeinfo calculation fails to avoid pushing incomplete merge…
View git-merge-svn
#!/bin/bash
function usage {
echo "USAGE: git merge-svn <from> [<to>]"
echo ""
echo " from The branch name to be merged FROM"
echo " to Optional branch name to be merged onto. Default: HEAD"
echo ""
}
@kyledrake
kyledrake / ferengi-plan.txt
Last active Sep 26, 2018
How to throttle the FCC to dial up modem speeds on your website using Nginx
View ferengi-plan.txt
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
View gist:1250084
###
Async.js is a collection of simple async patterns
built to combat callback hell
###
###
ASYNC SEQUENCE
Allows a user to define a sequence of async functions.
EXAMPLE:
async = require 'async'
You can’t perform that action at this time.