This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- github util | |
-- | |
-- Expect a file called ~/.github-cred with your oauth string in first line. | |
-- Otherwise all commands are run without credentials | |
module Main where | |
import Control.Applicative | |
import Control.Exception | |
import Control.Monad | |
import Data.List |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Control.Applicative | |
import Control.Monad | |
import System.Environment | |
import System.Process | |
import Data.Function | |
import Data.Word | |
import Data.List (sortBy) | |
import Numeric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Preboot -- Prelude Reboot | |
-- | |
-- A minimal prelude reboot with better base classes | |
-- | |
-- * Provide a module to Work with the RebindableSyntax extension | |
-- * Better classes: | |
-- * Monad : no return or fail | |
-- * Enum : hiding fromEnum and toEnum | |
-- * Number Literal become the Integral class (e.g. Int) or Fractional class (e.g. Double). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
funkyShow :: Show a => a -> String | |
funkyShow l = "\x1b[" ++ c ++ dig ++ "\x1b[0m" | |
where | |
c = cols !! (fromEnum (head dig) `mod` lenCols) | |
dig = show l | |
lenCols = length cols | |
cols = ["31;1m", "32;1m", "33;1m", "34;1m", "35;1m", "36;1m"] {-"37;1m", "38;1m", "7m"] -} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Data.ByteArray.Encoding as BD | |
import Debug.Trace | |
bytedump n f a = trace ("[HS] " ++ n ++ " " ++ toHex (f a)) a | |
where toHex = (show :: ByteString -> String) . BD.convertToBase BD.Base16 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
module CStruct where |
OlderNewer