Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

" Modeline and Notes {
" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker={,} foldlevel=0 foldmethod=marker spell:
"
" __ _ _____ _
" ___ _ __ / _/ |___ / __ __(_)_ __ ___
" / __| '_ \| |_| | |_ \ _____\ \ / /| | '_ ` _ \
" \__ \ |_) | _| |___) |_____|\ V / | | | | | | |
" |___/ .__/|_| |_|____/ \_/ |_|_| |_| |_|
" |_|
"
"colorscheme earendel
"colorscheme moria
"colorscheme github
"colorscheme freya
"colorscheme codeschool
"colorscheme two2tango
nnoremap z :w<cr>
"set nonumber
" 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'
<input checked="checked" type="checkbox" />
this.checked=true;
<input checked="checked" type="checkbox" />
<input name="Check me" type="button" />
this.checked=true;
check(e){
this.checked=!this.checked;
}
@edi9999
edi9999 / yogamoves_export.js
Last active November 15, 2015 17:07
Yogamoves
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"
@edi9999
edi9999 / swatch.bash
Created September 17, 2015 19:14
swatch
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"
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);
from lxml.html import clean
import argparse
import datetime
import imaplib
import getpass
import json
import pyzmail.parse
var express = require('express');
var app = express();
var games=[];
var pendingGames = []
var activeGames = []
var getActiveGameById = function(id){
return activeGames.filter(function(game){