Skip to content

Instantly share code, notes, and snippets.

takeo / gist:385818
Created April 30, 2010 21:53 — forked from 3n/gist:385810
// definition of trackEvent method on a global object
$3N = {
trackEvent : function(category, action, label, value){
if (typeof(pageTracker) == "object") pageTracker._trackEvent(category, action, label, value);
else if(typeof(_gaq) == "object") _gaq.push(['_trackEvent', category, action, label, value]);
takeo / mini.rb
Created February 24, 2010 08:32 — forked from defunkt/mini.rb
# test/spec/mini 5
def context(*args, &block)
return super unless (name = args.first) && block
require 'test/unit'
klass = ? ActiveSupport::TestCase : Test::Unit::TestCase) do
def self.test(name, &block)
tell application "Mail"
set selectedMessages to the selection
set mailboxMap to {{accountName:"Work", archive:"All Mail"}, {accountName:"Gmail", archive:"All Mail"}}
repeat with mapItem in mailboxMap
set archiveMailbox to the mailbox (archive of mapItem) of account (accountName of mapItem)
set messagesToMove to {}
repeat with msg in selectedMessages
if name of the mailbox of msg is "INBOX" then
if name of the account of the mailbox of msg is (accountName of mapItem) then
takeo / gist:4809
Created August 11, 2008 04:37 — forked from defunkt/gist:4754
= Gistr
A simple tool to post gists to tumblr.
== The Problem
Tumblr does not have a way to post code snippets simply and the current solutions are lacking.