Skip to content

Instantly share code, notes, and snippets.

View titanous's full-sized avatar

Jonathan Rudenberg titanous

View GitHub Profile
@titanous
titanous / gist:3791767
Created September 27, 2012 02:08
Top 100 Tent.is users by followers
tent,3262
lorenb,199
cat,160
daniel,130
jonathan,119
me,70
jesse,64
po,59
jyap,54
updates,51
package main
import (
"bytes"
"fmt"
"net"
"net/http"
"os"
"sort"
"strconv"
@titanous
titanous / mixpanel.rb
Created August 8, 2012 22:50
Mixpanel Rack Middleware
require 'base64'
require 'json'
require 'uri'
module Mixpanel
class Tracker
attr_reader :distinct_id, :ip, :token
def initialize(token, distinct_id, ip)
@token = token
@titanous
titanous / output.csv
Created July 27, 2012 18:14
The SYMPOCALYPSE
reqs memory_kb
0 46588
100 79820
200 86960
300 91192
400 101440
500 139200
600 145512
700 153800
800 174852
#!/usr/bin/env ruby
begin
require 'heroku-api'
rescue LoadError
puts "Requires the heroku-api gem.\nRun `gem install heroku-api`"
exit
end
unless api_key = (ARGV[0] || ENV['HEROKU_API_KEY'])

Before /o

Rehearsal ------------------------------------------------
parse & run:   2.880000   0.010000   2.890000 (  2.891841)
--------------------------------------- total: 2.890000sec

                   user     system      total        real
parse & run:   2.880000   0.010000   2.890000 (  2.886266)

Hello Jonathan,

Sandra here from the iTunes Store. I understand you have moved from Canada to the Untied States and are having an issue locating a few of your applications. I can certainly appreciate your concern and eagerness to regain access to your applications therefore I will do my best to address this for you today.

Regrettably, when you move between countries and change the country associated with your iTunes account you are unable to redownload the application on the US store if you have purchased it in the Canadian Store.

If you are unable to locate the application you can search your hard disk by following the steps in this article:

iTunes: Finding lost media downloads http://support.apple.com/kb/TS1408

@titanous
titanous / cmake.rb
Created March 16, 2012 20:41 — forked from jkp/cmake.rb
Homebrew formula for cmake with Xcode 4.3 fixes
require 'formula'
class Cmake < Formula
head 'https://github.com/jkp/CMake.git', :tag => '20b4466d78739450e94738a846ab7d16d690627e'
homepage 'http://www.cmake.org/'
def install
# A framework-installed expat will be detected and mess things up.
if File.exist? "/Library/Frameworks/expat.framework"
opoo "/Library/Frameworks/expat.framework detected"
@titanous
titanous / 0-readme.md
Created February 22, 2012 20:53 — forked from mickm/0-readme.md
ruby-1.9.3-p125 cumulative performance patch.

Patched ruby 1.9.3-p125 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p125 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).

Huge thanks to funny-falcon for the performance patches.

# Allows hubot to answer almost any question by asking Wolfram Alpha
#
# Set the HUBOT_WOLFRAM_APPID environment var to your AppID
#
# compute <question> - Searches Wolfram Alpha for the answer to the question.
Wolfram = require('wolfram').createClient(process.env.HUBOT_WOLFRAM_APPID)
pickPrimary = (results) ->
for result in results