Skip to content

Instantly share code, notes, and snippets.

View tebriel's full-sized avatar

Chris M tebriel

View GitHub Profile
@crohr
crohr / README.md
Last active August 29, 2015 14:14
How to save buildpacks locally for use with pkgr

Clone buildpack(s) locally:

git clone --bare https://github.com/pkgr/heroku-buildpack-ruby.git \
  /tmp/heroku-buildpack-ruby.git

Save manifest with a list of buildpacks to use:

How to become a decent photographer in five years

You're not gonna become a master in your spare time, but you can get decently good at photography in five years of dedicated but non-full-time practice. It's taken me about twice that to get decent, but I fucked around a lot along the way.

You don't need a ton of fancy equipment, but photography does require some gear. I'll limit the gear-buying here to once a year (not counting books).

@danharper
danharper / background.js
Last active March 30, 2024 18:25
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'
@pthrasher
pthrasher / vim-necessities.md
Created October 19, 2012 15:49
Things necessary for my vim workflow
  1. Remap ; to : so I don't have to hit shift for getting into command mode.
  2. Remap jf to so that I can quickly exit insert mode.
  3. Fuzzy finding with ctrlp (install the plugin from kien/ctrlp.vim)
  4. Easy vsplit creation and navigation
    • ,v to create a new vsplit
    • ctrl-h to move into one vsplit to the left
    • ctrl-l to move into one vsplit to the right
    • ctrl-j to move into one hsplit below
    • ctrl-k to move into one hsplit up
  5. Remap ,, to switching between the two most recently used buffers
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
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: