Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
Root = function(element, indexes){
function constructor(){
this.setup(null, element, indexes); //defined in grandparent
};
constructor.prototype = new Group(null, element, indexes); //parent
return new constructor();
};
@nyarly
nyarly / javascript.vim
Last active December 28, 2015 20:39
How To Make The Javascripts
set backupcopy=yes
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<Affordance> a rdfs:Class ;
rdfs:comment "Base class for all affordances" .
<Null> a rdfs:Class ;
rdfs:subClassOf <Affordance> ;
rdfs:comment "The provided affordance is null. i.e. not dereferenceable, no actions provided".
lass ClassRegistry
#Extend a module with this in order to make it the registrar for a
#particular purpose.
#The top of a class heirarchy will make "register" immediately available
#to subclasses. Otherwise, classes can say Module::registry.add(name,
#self)
#
module Registrar
def registry
@registry ||= ClassRegistry.new(self)
[user]
email = [email protected]
name = Judson
[branch]
autosetupmerge = true
[color]
branch = true
diff = true
grep = true
interactive = true
#!/bin/env bash
#path old-file old-hex old-mode new-file new-hex new-mode
path=$1
old=$2
new=$5
#Per git(1):
#The file parameters can point at the user’s working file (e.g. new-file in "git-diff-files"), /dev/null (e.g.
#old-file when a new file is added), or a temporary file (e.g. old-file in the index). GIT_EXTERNAL_DIFF should
class DeadbeatConnectionRelease
def initialize(app)
@app = app
end
#This is a brittle hack for what appears to be a bug in ActiveRecord 4:
#connections aren't being properly released after their owning threads die
def call(env)
response = @app.call(env)
response[2] = ::Rack::BodyProxy.new(response[2]) do
#!/bin/env bash
git branch savepoint
for branch in $*; do
echo "git pull $(echo $branch | sed 's#/# #')" >> .git/merges.sh
done
source .git/merges.sh
<html><head></head>
<body>
<table>
<tr>
<th>Language</th>
<th>Type</th>
<th>Color</th>
</tr>
<tr>