Skip to content

Instantly share code, notes, and snippets.

@terrywang
terrywang / Berkshelf
Last active October 25, 2019 23:20
Vagrantfile sample for Vagrant, the following plugins are required: vagrant-berkshelf, vagrant-omnibus, vagrant-proxyconf, vagrant-vbguest, vagrant-proxyconf. Berksfile defines cookbooks and their dependencies. Run berks install to install cookbooks and dependencies.
site :opscode
cookbook 'nginx', '~> 2.4.4'
@jdp
jdp / Makefile
Created August 31, 2012 06:07
Use Makefiles for CoffeeScript, Handlebars, and Sass
COFFEEC = coffee
SASSC = sass
HANDLEBARSC = handlebars
# Build app package
APPSRC = static/scripts/main.coffee
APPOBJ = ${APPSRC:.coffee=.js}
APPOUT = static/scripts/app.js
@padraic
padraic / escaping-rfc.md
Created July 7, 2012 14:27
Escaping RFC for PHP Core - Basically Zend\Escaper in C

* Version: 1.0

* Date: 2012-09-18

* Author: Pádraic <padraic.brady.at.gmail.com>

* Status: Under Discussion

* First Published at: http://wiki.php.net/rfc/escaper

@peon-pasado-zeitnot
peon-pasado-zeitnot / gist:1242279
Created September 26, 2011 13:53
This D-trace script lists all run programs with their arguments - works with OSX
#!/usr/sbin/dtrace -C -s
#pragma D option quiet
proc::posix_spawn:exec-success,proc::__mac_execve:exec-success
{
this->isx64=(curproc->p_flag & P_LP64)!=0;
#define SELECT_64_86(x64, x86) (this->isx64 ? (x64) : (x86))
#define GET_POINTER(base, offset) (user_addr_t)SELECT_64_86(*(uint64_t*)((base)+sizeof(uint64_t)*(offset)), *(uint32_t*)((base)+sizeof(uint32_t)*(offset)))
@amiryal
amiryal / git config
Last active February 20, 2024 21:02
Easily visualise Git merge.conflictstyle diff3 with meld, while preserving all information
[merge]
conflictstyle = diff3
tool = three_meld
[mergetool "three_meld"]
# Opens up four diff windows:
# LOCAL:MERGED, BASE:LOCAL, BASE:REMOTE, LOCAL:REMOTE
#
# Lets you edit the MERGED file (including original diff3 markers), showing
# you the final diff from LOCAL. For reference, you can look in the other
# windows to see how LOCAL and REMOTE are each different from BASE, as well

Ever wondered how much who adds/removes, its time to find out :D (those are real stats, i just obfuscated the names )

###Results

Git scores (in LOC):
mr-add              :  +482273       -9466
justu               :  +286250       -159905
grosser             :  +152384       -323344

another : +121257 -82116