Skip to content

Instantly share code, notes, and snippets.

View .nvimrc
" Modeline and Notes {
" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker={,} foldlevel=0 foldmethod=marker spell:
"
" __ _ _____ _
" ___ _ __ / _/ |___ / __ __(_)_ __ ___
" / __| '_ \| |_| | |_ \ _____\ \ / /| | '_ ` _ \
" \__ \ |_) | _| |___) |_____|\ V / | | | | | | |
" |___/ .__/|_| |_|____/ \_/ |_|_| |_| |_|
" |_|
"
View .vimrc.local
"colorscheme earendel
"colorscheme moria
"colorscheme github
"colorscheme freya
"colorscheme codeschool
"colorscheme two2tango
nnoremap z :w<cr>
"set nonumber
View .vimrc.bundles.local
" UnBundle 'godlygeek/tabular'
Bundle 'ctrlpvim/ctrlp.vim'
Bundle 'vim-scripts/Align'
Bundle 'vim-scripts/Decho'
Bundle 'vim-scripts/dbext.vim'
Bundle "mattn/emmet-vim"
Bundle 'tommcdo/vim-exchange'
Bundle 'floobits/floobits-neovim'
Bundle 'ryanss/vim-hackernews'
View gist:b293ed30b6bda9dd21d9
<input checked="checked" type="checkbox" />
this.checked=true;
View gist:2fcbffb14c707ac54609
<input checked="checked" type="checkbox" />
<input name="Check me" type="button" />
this.checked=true;
check(e){
this.checked=!this.checked;
}
View swatch.bash
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
swatch() {
[ -a /tmp/swatch ] || touch /tmp/swatch
inotifywait -m -e close_write,moved_to --format %e/%f -r /tmp/swatch |
{ echo "hi" ; while IFS=/ read -r events file; do
echo "$file $events"
View gist:d73ad6704ead7eed3b47
var P = require("bluebird");
var request = require("request");
var requestAsync = P.promisify(request, {multiArgs: true});
request("https://example.org")
var foo = requestAsync("https://example.org").catch(function (err) {
return urls;
console.log(err);
View yogamoves_export.js
doc = $('frame[name="mainFrame"]', top.document)[0].contentDocument;
$(doc).find("tr.scheduleRow").each(function(el){
obj = $(this).find("td").map(function(){return this.innerText});
teacher = encodeURIComponent(obj[4].replace("\n",""));
course = encodeURIComponent(obj[3].replace("\n",""));
date = obj[0].replace(/.* ([0-9]+)\/([0-9]+)\/([0-9]+)/,"$3$2$1");
time = parseInt(obj[1].replace(/([0-9]+):([0-9]+)/,"0$1$2"),10)
console.log(obj)
startT = date+"T"+pad(time,4) + "00"
View email_fetching.py
from lxml.html import clean
import argparse
import datetime
import imaplib
import getpass
import json
import pyzmail.parse
View morpion.js
var express = require('express');
var app = express();
var games=[];
var pendingGames = []
var activeGames = []
var getActiveGameById = function(id){
return activeGames.filter(function(game){