Skip to content

Instantly share code, notes, and snippets.

@lawrencejones
lawrencejones / commit-msg
Last active Aug 29, 2015
Commit hooks to insert ghi prompt and force issue reference
View commit-msg
#!/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 Sep 30, 2020
golang net/http/cgi example
View cgi.go
// go build -ldflags "-s -w" -o index.cgi cgi.go
package main
import (
"fmt"
"net/http"
"net/http/cgi"
)
@avendael
avendael / vimium.conf
Created Oct 17, 2013
Emacs keybindings for vimium. Paste this into vimium's advanced settings.
View vimium.conf
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 Sep 3, 2013
Getting golang + mac os x + gdb to play nicely
View .bash_profile
alias gdbnew='/usr/local/Cellar/gdb/7.6/bin/gdb'
@cmcavoy
cmcavoy / mozilla_openbadges_proposal.markdown
Created Nov 19, 2012
Mozilla Open Badges Projects Guidelines
View mozilla_openbadges_proposal.markdown

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 Jul 12, 2012
FontAwesome mapping for XeLaTeX
View fontawesome.sty
% 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 Mar 13, 2012
Python completions (ST) functions/methods
View PythonCompletions.py
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 Jul 13, 2011
Go optional args, v2
View gist:1080828
package main
import (
"fmt"
)
type Person struct {
Name string
Age int
Position string
@rampion
rampion / try-catch-ex.c
Created Apr 8, 2009
TRY/CATCH/FINALLY macros for C
View try-catch-ex.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");
You can’t perform that action at this time.