Skip to content

Instantly share code, notes, and snippets.

@lawrencejones
lawrencejones / commit-msg
Last active August 29, 2015 14:02
Commit hooks to insert ghi prompt and force issue reference
#!/usr/bin/env coffee
# vi: set filetype=coffee
fs = require 'fs'
ttyFd = fs.openSync '/dev/tty', 'r'
msgFile = process.argv[2]
failed = false
error = 'Error! Please reference git issue!'
@larryli
larryli / cgi.go
Last active March 5, 2024 17:14
golang net/http/cgi example
// go build -ldflags "-s -w" -o index.cgi cgi.go
package main
import (
"fmt"
"net/http"
"net/http/cgi"
)
@avendael
avendael / vimium.conf
Created October 17, 2013 17:06
Emacs keybindings for vimium. Paste this into vimium's advanced settings.
map <c-n> scrollDown
map <c-p> scrollUp
map <c-b> scrollLeft
map <c-f> scrollFullPageDown
map <c-b> scrollFullPageUp
map <c-v> scrollFullPageDown
map <a-v> scrollFullPageUp
map <c-w> copyCurrentUrl
map <a-w> copyCurrentUrl
map <c-k> copyCurrentUrl
@Pallinder
Pallinder / .bash_profile
Created September 3, 2013 17:29
Getting golang + mac os x + gdb to play nicely
alias gdbnew='/usr/local/Cellar/gdb/7.6/bin/gdb'
@cmcavoy
cmcavoy / mozilla_openbadges_proposal.markdown
Created November 19, 2012 22:02
Mozilla Open Badges Projects Guidelines

Mozilla Open Badges

Overview

Learning today happens everywhere. But it's often difficult to get recognition for skills and achievements that happen online or out of school. Mozilla Open Badges helps solve that problem, making it easy for any organization to issue, manage and display digital badges across the web.

Many organizations are issuing badges as a part of their curriculum, but most do so in a siloed environment. The Open Badges specification allows badge systems to push their badges to a unified backpack, giving the badge earner control of their data.

Mozilla's Webmaker badges give a good overview of a typical issuing program.

@sway
sway / fontawesome.sty
Created July 12, 2012 23:14
FontAwesome mapping for XeLaTeX
% FontAwesome (http://fortawesome.github.com/Font-Awesome/) bindings for (Xe)LaTeX
% Author: Honza Ustohal <honza@egoistic.biz>
%
% Translation of FontAwesome's private range characters into XeTeX symbols. All icons are camel-cased and prefixed with 'fa', i.e. what was .icon-align-center the CSS version of FontAwesome becomes \faAlignCenter
% This might be reworked into a full blown package in the near future
%
% Prerequisite:
% XeLaTeX, FontAwesome installed as a system font accessible by XeLaTeX
%
% Usage:
@agibsonsw
agibsonsw / PythonCompletions.py
Created March 13, 2012 22:57
Python completions (ST) functions/methods
import sublime, sublime_plugin
import re
py_compl = [ # standard Python functions
("abs()\tabs fn", "abs(${1:number})$0"),
("all()\tall fn", "all(${1:iterable})$0"),
("any()\tany fn", "any(${1:iterable})$0"),
("bin()\tbin fn", "bin(${1:integer})$0"),
("bool()\tbool fn", "bool(${1:[value]})$0"),
("bytearray()\tbytearray fn",
@bradfitz
bradfitz / gist:1080828
Created July 13, 2011 17:38
Go optional args, v2
package main
import (
"fmt"
)
type Person struct {
Name string
Age int
Position string
@rampion
rampion / try-catch-ex.c
Created April 8, 2009 02:35
TRY/CATCH/FINALLY macros for C
// gcc -o try-catch-ex try-catch.c try-catch-ex.c
#include <stdio.h>
#include "try-catch.h"
// Example of use for try-catch.h
int main(int argc, char *argv[])
{
int i = 101;
printf("before try block...\n");