Skip to content

Instantly share code, notes, and snippets.

@ion1
ion1 / configure-trafficserver
Created February 21, 2014 06:14
Configure my Traffic Server instance
#!/bin/sh
set -eu
# Configure my Traffic Server instance.
export LC_ALL=C
cd /etc/trafficserver
# Other portability issues would just raise runtime errors; this one would
@ion1
ion1 / ImplicitParamsTypeHoles.md
Last active August 29, 2015 13:56
Abusing ImplicitParams as a substitute for type holes

Abusing ImplicitParams as a substitute for type holes

Type holes in GHC 7.8 make this nicer and remove the need for the ImplicitParams hack, but before 7.8:

{-# LANGUAGE ImplicitParams #-}

import Control.Applicative

newtype Reader r a = Reader { runReader :: r -> a }
{-# LANGUAGE QuasiQuotes #-}
-- | Generate the coefficients for
-- <http://codegolf.stackexchange.com/a/24289/1621>
module Main (main) where
import Data.List
import Numeric.AD
import Text.Printf.TH
@ion1
ion1 / git-rebase-todo
Created March 17, 2014 23:54
git-rebase-todo for ghc/more_cpp_settings
pick acfaf04 Adding CPP and CPP-Flags to configure step, ghc settings file, and associated dyn flags support
# moved up
fixup c76a2ab Adding CPP and CPP-Flags to configure step, ghc settings file, and associated dyn flags support
fixup 6e63d3f Still not quite right, CPP flags work in progress
fixup 5ee38e2 fix cpp detection.
# moved up
fixup 4fedb2e fix cpp detection.
@ion1
ion1 / local-xorg-edgers-pin
Created March 20, 2014 07:46
/etc/apt/preferences.d/local-xorg-edgers-pin
Package: libcuda* nvidia*
Pin: release o=LP-PPA-xorg-edgers
Pin-Priority: 500
Package: *
Pin: release o=LP-PPA-xorg-edgers
Pin-Priority: 50
@ion1
ion1 / 0README.md
Last active August 29, 2015 13:57
Nautilus scripts for git-annex
@ion1
ion1 / keybase.md
Created March 23, 2014 18:50
Keybase proof

Keybase proof

I hereby claim:

  • I am ion1 on github.
  • I am ion (https://keybase.io/ion) on keybase.
  • I have a public key whose fingerprint is 529A CA94 FE09 4CBE 2DCF 97BF 9D75 D9F4 EAFD B760

To claim this, I am signing this object:

@ion1
ion1 / MyTree.hs
Created July 20, 2014 15:10
Data.Reify example
{-# LANGUAGE TypeFamilies #-}
module MyTree where
import Control.Applicative
import Data.Reify
data MyTree a = Leaf a | Node (MyTree a) (MyTree a)
deriving (Eq, Ord, Show)
@ion1
ion1 / rcon
Last active August 29, 2015 14:05
rcon
https://gist.github.com/ion1/4589818#file-rcon
@ion1
ion1 / foo.html
Created August 20, 2014 20:04
foo
<!DOCTYPE html><html><head><title>Foo</title><style>body { font-size: 3em; }td { padding: 0.3em; text-align: right; }</style></head><body><table><tr><td><span style="color: red">0</span><span style="color: blue">1</span></td><td><span style="color: red">0</span><span style="color: blue">2</span></td><td><span style="color: red">0</span><span style="color: blue">3</span></td><td><span style="color: red">0</span><span style="color: blue">4</span></td><td><span style="color: red">0</span><span style="color: blue">5</span></td><td><span style="color: red">0</span><span style="color: blue">6</span></td><td><span style="color: red">0</span><span style="color: blue">7</span></td><td><span style="color: red">0</span><span style="color: blue">8</span></td><td><span style="color: red">0</span><span style="color: blue">9</span></td><td><span style="color: red">1</span><span style="color: blue">0</span></td></tr><tr><td><span style="color: red">1</span><span style="color: blue">1</span></td><td><span style="color: red">1