Skip to content

Instantly share code, notes, and snippets.

View killerswan's full-sized avatar

Kevin Cantú killerswan

View GitHub Profile
(*
to compile use:
fsc FebKit.fs -r "/usr/lib/cli/webkit-sharp-1.0/webkit-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll"
*)
#light
open System
open WebKit
open Gtk
@OnorioCatenacci
OnorioCatenacci / SmallJSONDemo.fs
Created July 16, 2010 00:42
F# fragment for JSON Serialize/Deserialize
(* Borrowed very liberally from
https://blogs.msdn.com/b/jomo_fisher/archive/2010/03/06/neat-samples-f-freebase-and-dgml.aspx
and
http://cs.hubfs.net/forums/permalink/11096/11096/ShowThread.aspx#11096
Many thanks to both those posters for giving me 99% of the starting code
@tels7ar
tels7ar / BuddhaHandMuffins.md
Created December 19, 2010 04:07
Muffins with a citrus kick

Phil's Zesty Buddha's Hand Muffins

Shamelessly ripped off from the Bisquick recipe book, with some tweaks.

Ingredients

2 c Bisquick baking mix
2/3 c whole milk
1/2 c diced fingered citron zest
1/4 c brown sugar

@oxbowlakes
oxbowlakes / 3nightclubs.scala
Created May 13, 2011 15:14
A Tale of 3 Nightclubs
/**
* Part Zero : 10:15 Saturday Night
*
* (In which we will see how to let the type system help you handle failure)...
*
* First let's define a domain. (All the following requires scala 2.9.x and scalaz 6.0)
*/
import scalaz._
import Scalaz._
@tomgibara
tomgibara / Tracker.java
Created May 18, 2011 03:51
A wrapper around Google analytics tracker for Android
package com.tomgibara.android.util;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumSet;
import android.os.AsyncTask;
import android.os.SystemClock;
import com.google.android.apps.analytics.GoogleAnalyticsTracker;
@ssokolow
ssokolow / winenv.py
Created June 5, 2011 21:55
Helpers for permanent modifications to the Windows environment
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Helpers for automating the process of setting up ported Linux/UNIX
applications which were designed with expectations like being in $PATH.
@note: Basic functionality requires only the Python standard library.
Some functions and methods also require the PyWin32 package.
@note: A much more verbose "sudo for Windows" implementation (BSD-licensed)
@beastaugh
beastaugh / installing-ghc7.2-osx10.7.md
Created August 24, 2011 21:41
Installing GHC 7.2 on Mac OS X 10.7 Lion

Installing GHC 7.2 on Mac OS X

This is a brief and bare-bones guide to getting GHC 7.2 and the cabal-install tool (the two basic things you'll need to do Haskell development) up and running on a new Mac OS X 10.7 install.

The instructions given here worked for me, but YMMV.

@mwotton
mwotton / test.hs
Created October 3, 2011 11:02
test
{-# LANGUAGE OverloadedStrings #-}
import Lengthable
import Prelude hiding (length)
import qualified Data.Text
import Data.Text(Text(..))
text :: Text
text = "abcdefg"
main = do print $ length [1,2,3]
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"