Skip to content

Instantly share code, notes, and snippets.

View macournoyer's full-sized avatar

Marc-André Cournoyer macournoyer

View GitHub Profile
# Montreal Against Rails code
# Written by macournoyer, Carl Mercier and Francois Beausoleil
## Framework code
class App
def call(env)
#im doing good
@request =
@response =
#!/usr/bin/env ruby
# Lil' script to fix or implement Fogbugz tickets from the command line.
# Usage:
# Edit `base_uri`.
# fogbugz login password
# Copy the returned token and paste on the `default_params` line.
# fogbugz fix 1234 "I IZ TEH AWESOME"
require "rubygems"
require "httparty"
macournoyer / .gitconfig
Created October 28, 2008 20:42
My .gitconfig
name = macournoyer
email =
diff = auto
status = auto
branch = auto
st = status
co = checkout
macournoyer / gist:20999
Created October 30, 2008 13:20
Open a new tab in Terminal
#!/usr/bin/env ruby
# Open a new tab in Terminal
# usage: tab [cmd]
# If cmd is specified, it will be run in new tab while old tab is reactivated.
# If no cmd, new tab is activated
require "rubygems"
require "appscript"
include Appscript
window = app("Terminal").windows.first
Teh Ceiling Cat of us, whu haz cheezeburger, yu be spechul
Yu ordered cheezburgerz,
Wut yu want, yu gets, srsly.
In ceiling and on teh flor.
Giv us dis day our dalee cheezburger.
And furgiv us for makin yu a cookie, but eateding it.
And we furgiv wen cats steel our cookiez.
An do not let us leed into teh showa, but deliver us from teh wawter.
Ceiling Cat pwns all. He pwns teh ceiling and teh floor and walls too.
Forevur and evuhr. Amen.
# Memcache-like Invisible app
STORE = {}
with ":key" do
put { STORE[params[:key]] = params[:value] }
get { render STORE[params[:key]] }
class User
has_many :cats
class UserTest < Test::Unit::TestCase
# Useless
should_have_many :cats
# Useful
def test_should_add_a_cat
From d8d28ef73fdd539e0d6a358b7e3f00ac5317842c Mon Sep 17 00:00:00 2001
From: macournoyer <>
Date: Wed, 19 Nov 2008 15:43:45 -0500
Subject: [PATCH] Fix presentable_for so longest presentable name is matched first.
This makes sure subscripton_discount_ is matched before subscripton_.
.../lib/active_presenter/base.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Error while running applet.
processing/core/ `createGraphics': java.lang.RuntimeException: You need to use "Import Library" to add processing.opengl.PGraphicsOpenGL to your sketch. (NativeException)
from processing/core/ `size'
from processing/core/ `size'
from sun/reflect/ `invoke0'
from sun/reflect/ `invoke'
from sun/reflect/ `invoke'
from java/lang/reflect/ `invoke'
from org/jruby/javasupport/ `invokeWithExceptionHandling'
from org/jruby/javasupport/ `invoke'
#!/usr/bin/env ruby
# List tweets w/ links.
# require: sudo gem install jnunemaker-twitter --source
# usage: twitlinks [num]
require "rubygems"
require "twitter"
EMAIL = ''
PASSWORD = 'greenerpoop'