I hereby claim:
- I am tchajed on github.
- I am tchajed (https://keybase.io/tchajed) on keybase.
- I have a public key ASBxd3t8HGdTAbKbOqOp5jrcJk3pusQbgsd5umQdsV0NTgo
To claim this, I am signing this object:
// from https://github.com/LearnBoost/Socket.IO/wiki/Migrating-0.6-to-0.7+ | |
// saving the socket id | |
var sid = socket.id | |
// sending a message to a particular socket | |
io.socket(sid).emit("my event", [args]) |
// ==UserScript== | |
// @name jQuery For Chrome (A Cross Browser Example) | |
// @namespace jQueryForChromeExample | |
// @include * | |
// @author Erik Vergobbi Vold | |
// @description This userscript is meant to be an example on how to use jQuery in a userscript on Google Chrome. | |
// ==/UserScript== | |
// a function that loads jQuery and calls a callback function when jQuery has finished loading | |
function addJQuery(callback) { |
import csv | |
""" Read a CSV file of points. | |
Assumes each line of the file is a CSV list of coordinates, which are parsed as | |
floats. | |
""" | |
def read_coords(fname): | |
with open(fname, 'rb') as f: | |
points = [] |
import Text.ParserCombinators.Parsec | |
import System.Environment (getArgs) | |
import Safe | |
data Expr = | |
Var Name -- variable | |
| App Expr Expr -- application | |
| Lambda Name Expr -- lambda abstraction | |
deriving | |
(Eq,Show) |
import re | |
# match requires the entire string to match, while search will | |
# find a partial match | |
assert re.match("\d+", "123") | |
assert not re.match("\d+", "hello 123") | |
assert re.search("\d+", "123") | |
assert re.search("\d+", "hello 123") |
# Fish users | |
# Save this file as ~/.config/fish/functions/man.fish | |
function man | |
env \ | |
LESS_TERMCAP_mb=\e"[1;31m" \ | |
LESS_TERMCAP_md=\e"[1;31m" \ | |
LESS_TERMCAP_me=\e"[0m" \ | |
LESS_TERMCAP_se=\e"[0m" \ | |
LESS_TERMCAP_so=\e"[1;44;33m" \ |
Definition Reader E T := E -> T. | |
Definition get {E} : Reader E E := fun e => e. | |
Definition pure {E T} (x:T) : Reader E T := fun _ => x. | |
Definition ap {E A B} (f: Reader E (A -> B)) : Reader E A -> Reader E B := | |
fun x => fun e => f e (x e). | |
Infix "<*>" := (ap) (at level 11, left associativity). |
I hereby claim:
To claim this, I am signing this object:
let blacklists = ["https://mail.google.com/*", "https://docs.google.com/document/*] | |
let newtab = "https://www.google.com" |
#!/bin/bash | |
# basic manual argument parsing | |
usage() { | |
echo "Usage: $0 [--foo FOO] [-v]" 1>&2 | |
} | |
foo="" | |
verbose=false |