Skip to content

Instantly share code, notes, and snippets.

@michaelwills
michaelwills / pr.md
Created February 17, 2018 05:18 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@michaelwills
michaelwills / inject.js
Last active November 24, 2015 12:59 — forked from timnew/gist:3137257
Inject Javascript to current page
javascript:var s = 'http://code.jquery.com/jquery-1.7.2.min.js'; var b=document.body;if(b){void(z=document.createElement('script'));void(z.type='text/javascript');void(z.src=s);void(b.appendChild(z));}else{}
@michaelwills
michaelwills / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@michaelwills
michaelwills / jquery-lodash-injector.js
Last active August 29, 2015 14:23 — forked from spalger/gist:6417923
Inject jQuery and loads into current webpage
// convert to bookmarklet here:
// http://mrcoles.com/bookmarklet/
javascript: (function () {
var jv = '2.1.4';
var lv = '3.9.3';
var el = document.createElement('pre'),
b = document.getElementsByTagName('body')[0],
otherjQuery = false,
msg = '',
@michaelwills
michaelwills / netsed.rb
Created November 21, 2014 23:08 — forked from g3d/netsed.rb
require "formula"
class Netsed < Formula
homepage "http://silicone.homelinux.org/projects/netsed/"
url "http://silicone.homelinux.org/release/netsed/netsed-1.2.tar.gz"
sha256 "0a7f12bac83d02c6fc837055bf4ff02c1bdfc8ea478227afcc762e92d1661c80"
def install
system "make"
@michaelwills
michaelwills / csvds.py
Created November 12, 2012 05:32 — forked from fawce/csvds.py
Rough draft, CSV data source for zipline
"""
Generator-style DataSource that loads from CSV.
"""
import pytz
import csv
import mmap
import os.path