Skip to content

Instantly share code, notes, and snippets.

@depressed-pho
depressed-pho / config.h
Created January 16, 2013 13:32
AC_SYS_LARGEFILE bug
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "[email protected]"
/* Define to the full name of this package. */
#define PACKAGE_NAME "ac-sys-largefile-bug"
/* Define to the full name and version of this package. */
@depressed-pho
depressed-pho / HsOpenSSL-touch-SSLContext-on-withSSL.patch
Created October 2, 2012 17:44
HsOpenSSL: touch SSLContext on withSSL
diff --git a/OpenSSL/Session.hsc b/OpenSSL/Session.hsc
index de054fe..c4637e6 100644
--- a/OpenSSL/Session.hsc
+++ b/OpenSSL/Session.hsc
@@ -319,7 +319,9 @@ fdConnection :: SSLContext -> Fd -> IO SSL
fdConnection context fd = connection' context fd Nothing
withSSL :: SSL -> (Ptr SSL_ -> IO a) -> IO a
-withSSL = withMVar . sslMVar
+withSSL ssl f = do a <- withMVar (sslMVar ssl) f
@depressed-pho
depressed-pho / colours.sh
Created April 18, 2012 05:23
Manipulating ANSI colour sequences in Bash
#!/usr/bin/env bash
#
# Example:
#
# . colours.sh
#
# setColour bold underline green:black
# echo "Hello, world!"
# setColour reset
#
@depressed-pho
depressed-pho / fibonacci.sh
Created April 17, 2012 07:44
Fibonacci series in /bin/sh
#!/bin/sh
fibonacci_init() {
_fib_0=1
_fib_1=1
_fib_2=1
_fib_n=0
}
fibonacci_next() {