I hereby claim:
- I am pcapriotti on github.
- I am pcapriotti (https://keybase.io/pcapriotti) on keybase.
- I have a public key whose fingerprint is 2461 C117 39FE 5784 858C 9F18 DF96 7258 59FA 1C1F
To claim this, I am signing this object:
#include <windows.h> | |
#include <stdio.h> | |
int main() | |
{ | |
HANDLE h = CreateFile( | |
"bar.txt", | |
GENERIC_READ | GENERIC_WRITE, | |
0, | |
NULL, |
"""The reactor framework. | |
This module introduces the *reactor framework*, a collection of utilities to be | |
used in conjunction with the greelet library to solve the problem of inversion | |
of control in event-driven code. | |
Traditionally, writing event-driven code typically consists of "connecting" | |
signals to handlers (i.e. callbacks), which are to be invoked by the framework | |
in use when a certain "event" occurs. |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} | |
import Control.Monad | |
import Control.Monad.Free | |
class (Functor f, Functor g, Functor h) => Compose f g h | f g -> h where | |
compose :: f x -> g y -> Free h (Free f x, Free g y) | |
compose f g = return (liftF f, liftF g) | |
composeF :: Compose f g h => Free f x -> Free g x -> Free h x |
#!/bin/bash | |
# Extract the "next" link from an HTTP response | |
sed ' | |
1,/^\r\{0,1\}$/ { | |
/^Link:/ !d | |
s/^Link: \(.*\)$/\1/ | |
}' | | |
{ | |
IFS= read -r links |
#!/bin/bash | |
set -e | |
usage() { | |
echo "Usage: $0 USERNAME" 2>&1 | |
exit 1 | |
} | |
username="$1" | |
[ -z "$username" ] && usage |
#!/bin/bash -e | |
WALLPAPER_DIR="$HOME/backup/content/pictures/wallpapers" | |
function lock() { | |
local wp="$(scaled_wallpaper)" | |
local cmdline="" | |
[ -z "$wp" ] || cmdline="-i $wp" | |
function revert() { |
#!/bin/bash | |
set -e | |
usage() { | |
echo "Usage: $0 [-f FILE] [-n NAME] [-l LANGUAGE] [-p] [-d] DESCRIPTION" 2>&1 | |
exit 1 | |
} | |
public=true | |
dryrun=false |
#!/bin/bash | |
# prepare submission tarball for arXiv.org | |
set -e | |
usage() { | |
echo "Usage: $0 DEST SOURCE..." | |
exit 1 | |
} | |
on_exit() { |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# based on https://gist.github.com/1288596 | |
RED="\033[0;31m" | |
YELLOW="\033[0;33m" | |
GREEN="\033[0;32m" | |
NOCOLOR="\033[00m" | |
BOLD="\033[1;37m" | |
git for-each-ref --format="%(refname:short) %(upstream:short)" refs/heads | \ | |
while read local remote |