Skip to content

Instantly share code, notes, and snippets.

View nuclearsandwich's full-sized avatar

Steven! Ragnarök nuclearsandwich

View GitHub Profile
require 'uri'
require 'digest/md5'
caOrderValue = '0.00'; # orem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sollicitudin, mi ac lobortis feugiat, ligula augue eleifend libero, vitae suscipit sem nisi ac augue
caOrderReference = URI::escape('blafoo');
caEventID = 'somenumber'; # orem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sollicitudin, mi ac lobortis feugiat, ligula augue eleifend libero, vitae suscipit sem nisi ac augue
caComment = ''; # lorem ipsum
caMultiple = '1';
caItems = ''; # (Optional) orem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sollicitudin, mi ac lobortis feugiat, ligula augue eleifend libero, vitae suscipit sem nisi ac augue.
# Aenean hendrerit, neque at imperdiet auctor, diam eros interdum lorem, eu suscipit augue risus id neque.
@colindean
colindean / dont.rb
Created April 15, 2011 18:13 — forked from acid/dont.rb
require 'digest/md5'
class Hash
def to_query
require 'uri'
self.collect{ |k,v| k.to_s.downcase + '=' + URI::escape(v)}.join('&')
end
end
caPin = "1234"
caSubDomain = "track"
query = {
@reality
reality / xmonad.hs
Created April 18, 2011 14:32
My XMonad config file.
import XMonad
import Data.Monoid
import System.Exit
import XMonad.Hooks.SetWMName
import qualified XMonad.StackSet as W
import qualified Data.Map as M
myTerminal = "terminator"
myFocusFollowsMouse :: Bool
@wheresalice
wheresalice / redis.io
Created May 4, 2011 13:46
A basic Redis client in Io.
//metadoc Redis Alice Kaerast 2011
/*metadoc Redis description
redis is an open source, advanced key-value store
<br />An example:
<pre>
myredis := Redis clone connect("127.0.0.1:6379")
myredis send("rpush", "foo", "bar")
</pre>
*/
@tpope
tpope / account.html.haml
Created May 15, 2011 15:01
Our designers are way more clever than your designers
%fieldset.account_info
- ["First Name","Last Name","Email","Choose Password"].each do |n|
%dl.half
%dt
%label{:class => cycle("required", "", "required", "required")}=n
%dd
%input(type="text")
@sjl
sjl / markdown.vim
Created June 21, 2011 19:47 — forked from vim-voom/markdown.vim
Markdown folding for Vim
" folding for Markdown headers, both styles (atx- and setex-)
" http://daringfireball.net/projects/markdown/syntax#header
"
" this code can be placed in file
" $HOME/.vim/after/ftplugin/markdown.vim
func! Foldexpr_markdown(lnum)
let l1 = getline(a:lnum)
if l1 =~ '^\s*$'
# Ruby 1.8
m { }
arity: -1
proc call arg check: no
wraps values: n/a
m { || }
arity: 0
proc call arg check: yes, 0
@macournoyer
macournoyer / app.ru
Created August 19, 2011 17:02
The invisible block web framework. In honor of _why.
# rackup app.ru
require "./invisible"
app = Invisible.new do
get "/" do
render do
h1 "Why?"
p "Because."
end
require 'thread'
require 'json'
require 'net/http'
require 'uri'
require 'betabrite'
require 'psych'
require 'usb'
class StreamClient
def initialize user, pass
lock(something)
{
try
{
if (foo) // THIS
{
Bar();
}
else // LOOKS
{