Public Gists by PatrickTulskie

Gravatar
Wed Jan 20 10:56:13 -0800 2010
1
2
3
/*
Assuming a page where you have several tabs and maps within those tabs:
Render your map with displayMap() and whatever parameters you need to render it (address, etc)
Gravatar
Wed Jan 13 13:23:12 -0800 2010
1
2
3
require 'autotest/fsevent'
require 'autotest/growl'
require 'redgreen/autotest'
Gravatar
Tue Jan 12 08:53:39 -0800 2010
1
2
3
#!/bin/sh
 
# setup ------------------------------------------------------------------------
Gravatar
Tue Jan 05 13:14:06 -0800 2010
1
2
3
# An extension to the Hash class to inspect what it is made of
class Hash
  def whatami
Gravatar
Mon Jan 04 11:14:40 -0800 2010
1
2
3
# Yes this actually works. No you shouldn't run it unless you're prepared to reboot.
 
loop do
Gravatar
Sat Dec 19 12:19:39 -0800 2009
1
alias optff="cd ~/Library/Application\ Support/Firefox/Profiles/; for f in */*.sqlite; do sqlite3 \$f 'VACUUM;'; done; echo Firefox DBs Optimized;"
Gravatar
Mon Dec 07 12:43:12 -0800 2009
1
2
3
require 'base64'
 
clear_code = <<OBF
Gravatar
Wed Nov 04 13:14:51 -0800 2009
1
2
3
class Patrick
  def self.should_i_deploy?(*args)
    true
Gravatar
Fri Oct 23 19:18:23 -0700 2009
1
2
3
module ActsAsAbandonable
  def abandonable?
    true
gist: 216050 Used to total an array of h...
Gravatar
Thu Oct 22 09:03:39 -0700 2009
1
2
3
require 'rubygems'
require 'money'
require 'yaml'
Gravatar
Tue Oct 13 12:45:50 -0700 2009
1
2
3
require 'rubygems'
require 'mash'
require 'hashie'
Gravatar
Tue Sep 15 09:09:28 -0700 2009
1
2
3
%w(rubygems activesupport).each { |g| require g }
 
class KanyeWest
Gravatar
Tue Jul 07 14:33:53 -0700 2009
1
2
3
%w(rubygems benchmark).each { |gem| require gem }
 
puts "Outside: " + Benchmark.measure { |a| puts "Inside: " + (Benchmark.measure { |b| 10000.times { |val| puts "#{val} bananas!" } }).to_s }.to_s
Gravatar
Thu Jun 18 09:49:11 -0700 2009
1
2
3
module Hpricot
  
  module Hextensions
Gravatar
Wed Jun 10 22:52:05 -0700 2009
1
2
3
class AnnoyingKid
  def self.why?(answer)
    self.why?(answer)
Gravatar
Wed May 13 22:57:12 -0700 2009
1
2
3
class Array
  
  def antiuniq
Gravatar
Fri Mar 13 10:23:43 -0700 2009
1
2
3
#!/usr/bin/env ruby
#
# usage: script/server_restarter
Gravatar
Fri Jan 23 12:06:59 -0800 2009
1
2
3
=begin
 Written by: Patrick Tulskie (http://github.com/patricktulskie)
 WARNING: This will delete any previous fixture dumps that you've made with the script before it runs.
Gravatar
Thu Dec 18 12:07:41 -0800 2008
1
2
3
#IRC Response
=begin
Needs some work, but I could definitely see this helping those people who like to sit in IRC and be jerks when people ask questions.