Skip to content

Instantly share code, notes, and snippets.

View vincenthz's full-sized avatar
👻
making things better

Vincent Hanquez vincenthz

👻
making things better
View GitHub Profile
@vincenthz
vincenthz / mirror-hackage.sh
Created December 21, 2014 23:24
mirror hackage (2014-12 version)
#!/bin/sh
[ ! -d package ] && mkdir package
for splitpk in `tar tf 00-index.tar.gz | cut -d/ -f 1,2`; do
pk=`echo $splitpk | sed 's|/|-|'`
name=$pk.tar.gz
if [ ! -a package/$name ]; then
wget http://hackage.haskell.org/package/$pk/$name -O package/$name
fi
@vincenthz
vincenthz / Gh.hs
Last active August 29, 2015 14:11
github interaction
module Main where
import Data.List
import System.Environment
import Github.Issues
import Github.Repos
import Text.Printf
handleError :: String -> [String] -> Either Error a -> IO a
handleError action args (Left err) =
@vincenthz
vincenthz / cprng.c
Created October 10, 2012 07:43
CPRNG with a block cipher in CTR mode.
/*
* Copyright (C) 2012 Vincent Hanquez
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
@vincenthz
vincenthz / .xsession
Created October 17, 2011 14:57
my xmonad xsession file
#xmodmap -e "keycode 192 = XF86Launch1"
xmodmap -e "keycode 192 = XF86Launch6"
#xmodmap -e "keycode 193 = XF86Launch2"
xmodmap -e "keycode 193 = XF86Calendar"
xmodmap -e "keycode 194 = XF86Launch3"
xmodmap -e "keycode 195 = XF86Launch4"
xmodmap -e "keycode 196 = XF86Launch5"
xset b off