Opinions are like assholes, every one has got one.
This one is mine.
Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.
| # Rename an email address in all old commits. | |
| # WARNING: Will change all your commit SHA1s. | |
| # Based off of the script from here: | |
| # http://coffee.geek.nz/how-change-author-git.html | |
| git filter-branch -f --commit-filter ' | |
| if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ]; | |
| then | |
| GIT_AUTHOR_EMAIL="[email protected]"; | |
| GIT_COMMITTER_EMAIL="[email protected]"; | |
| git commit-tree "$@"; |
| # Make sure to notice the comments at https://gist.github.com/jhass/719014#gistcomment-19774 | |
| <VirtualHost *:80> | |
| ServerName diaspora.example.org | |
| ServerAlias www.diaspora.example.org | |
| RedirectPermanent / https://diaspora.example.org/ | |
| </VirtualHost> | |
| <VirtualHost *:443> | |
| ServerName diaspora.example.org |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import urllib2 | |
| gh_url = 'https://api.github.com' | |
| req = urllib2.Request(gh_url) | |
| password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
| Conditionals | |
| ( false :) | |
| console.log "if" | |
| :( true ) | |
| console.log "else if" | |
| :() | |
| console.log "else" | |
| Conditionals | |
| ( false :) | |
| console.log "if" | |
| :( true ) | |
| console.log "else if" | |
| :() | |
| console.log "else" | |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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 = [email protected]: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:
| (function (global) { | |
| /* ... Code that defines MyModule ... */ | |
| global.MyModule = (global.module || {}).exports = MyModule; | |
| })(this); |
| gulp = require 'gulp' | |
| clean = require 'gulp-clean' | |
| jade = require 'gulp-jade' | |
| coffee = require 'gulp-coffee' | |
| minify = require 'gulp-minify' | |
| ### | |
| quick syntax ideas: | |
| gulp.files() takes a glob and is an array of file streams |