Skip to content

Instantly share code, notes, and snippets.

View rnons's full-sized avatar

Ping Chen rnons

View GitHub Profile

build

$ ghc temp.hs

Note

Don't use -O2 when build temp.hs, would stack overflow.

@GaZ3ll3
GaZ3ll3 / jing_fm_tunes.py
Last active October 7, 2015 10:18
show music tunes addresses from jing.fm in .m4a file.
"""
Created on June 19th, 2013. via. Sublime Text 2
@author: lurker
"""
#!/usr/bin/env python
# -*- coding: utf8 -*-
import urllib2,httplib
@snoyberg
snoyberg / proxy.hs
Created June 28, 2012 12:10
Conduit proxy server
{-# LANGUAGE OverloadedStrings #-}
import Data.Conduit
import Data.Conduit.Network
import Data.Conduit.Text (encode, decode, utf8)
import qualified Data.Conduit.List as CL
import qualified Data.Conduit.Binary as CB
import Data.Text (toUpper)
import qualified Data.ByteString.Char8 as S8
@defunkt
defunkt / gitio
Created September 11, 2011 08:11
Turn a github.com URL into a git.io URL.
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard.
url = ARGV[0]
code = ARGV[1]
@bdotdub
bdotdub / redis.markdown
Created November 24, 2010 22:18
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support