Skip to content

Instantly share code, notes, and snippets.


  • Zero page
Block or report user

Report or block darkf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:2921431
type nat = Zero | Succ of nat
let rec int_of_nat x =
match x with
| Zero -> 0
| Succ x' -> 1 + int_of_nat x'
let rec nat_of_int x =
match x with
| 0 -> Zero
fiorix /
Created Feb 21, 2012
twisted tcp proxy
#!/usr/bin/env python
# coding: utf-8
import sys
from twisted.internet import defer
from twisted.internet import protocol
from twisted.internet import reactor
from twisted.python import log
maxcountryman / bf.c
Created Jan 29, 2012
A simple brainfuck interpreter in C
View bf.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
// initialize the tape with 30,000 zeroes
unsigned char tape[30000] = {0};
// set the pointer to point at the left-most cell of the tape
unsigned char* ptr = tape;
gre / easing.js
Last active Oct 22, 2019
Simple Easing Functions in Javascript - see
View easing.js
* Easing Functions - inspired from
* only considering the t value for the range [0, 1] => [0, 1]
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
View possum.hs
import Prelude hiding (toInteger)
import Data.List
data Value = StringValue String
| IntegerValue Integer
| NameValue String
| FuncValue [String] AST
| NilValue
deriving Show
kreed131 / C8Client2.hs
Created Jul 22, 2011
Simple TCP client on Haskell
View C8Client2.hs
import Network.Socket hiding (send, sendTo, recv, recvFrom)
import Network.Socket.ByteString (send, recv)
import qualified Data.ByteString.Char8 as B8
import System.Environment (getArgs)
You can’t perform that action at this time.