This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
# Forked from jacqui and Iain Hecker, http://iain.nl | |
# put all this in your ~/.irbrc | |
# gem install wirble hirb ap interactive_editor | |
# TODO: Can fail silently if gems are missing. | |
puts "Loading '#{File.expand_path(__FILE__)}'..." | |
require 'rubygems' | |
require 'yaml' | |
if ($0 == 'irb' && ENV['RAILS_ENV']) || ($0 == 'script/rails' && Rails.env) |
require "date" | |
new_dates = File.open("new_dates.txt","w") | |
File.open("old_dates.txt","r") do |f| | |
while line = f.gets | |
newdate = DateTime.parse(line) | |
new_dates << newdate.strftime("%Y-%m-%d %H:%M:%S") << "\n" | |
end | |
end |
# Forked from Iain Hecker, http://iain.nl | |
# put all this in your ~/.irbrc | |
# gem install wirble hirb ap interactive_editor | |
# TODO: Can fail silently if gems are missing. | |
puts "Loading '#{File.expand_path(__FILE__)}'..." | |
require 'rubygems' | |
require 'yaml' | |
if ENV['RAILS_ENV'] | |
load File.dirname(__FILE__) + '/.railsrc' |
.ellipsis { | |
width: 100px; | |
white-space: nowrap; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
-o-text-overflow: ellipsis; | |
-ms-text-overflow: ellipsis; | |
} |
<?php | |
/** | |
* Baltimore Locator - an IM, SMS, Twitter and Phone application that finds | |
* locations in Baltimore. | |
* | |
* @copyright 2011 Mark J. Headd (http://www.voiceingov.org) | |
* @author Mark Headd | |
*/ |
Fixing Snow Leopard Console | |
http://www.sarahmei.com/blog/2010/01/08/travails-with-readlin/ | |
http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard | |
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz | |
cd ~/src | |
curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.0.tar.gz | |
tar xzvf readline-6.0.tar.gz |
# Environment Variables | |
# ##################### | |
# TMP and TEMP are defined in the Windows environment. Leaving | |
# them set to the default Windows temporary directory can have | |
# unexpected consequences. | |
unset TMP | |
unset TEMP | |
# Alternatively, set them to the Cygwin temporary directory |
# AUTOTEST config file by @neocsr | |
# ~/.autotest | |
def check_and_require_gem(name,with_require) | |
eval %[if (Gem.available?('#{name}')); require '#{with_require}'; else; puts "#"*40; puts "# Gem '#{name}' not found."; puts "#"*40; end] | |
end | |
# Don't use RedGreen with Ruby 1.9 due to MiniTest replacement of UnitTest | |
if ENV["RSPEC"] || (RUBY_VERSION =~ /1\.9/) | |
check_and_require_gem('turn','turn') |
# ================================================= | |
# = Texmate support for Rails 3 bundle navigation = | |
# ================================================= | |
# ~/Library/Application Support/TextMate/Pristine Copy/Bundles/Ruby on Rails.tmbundle/Support/lib/rails/rails_path.rb | |
# or | |
# ~/Library/Application\ Support/TextMate/Bundles/Ruby\ on\ Rails.tmbundle/Support/lib/rails/rails_path.rb | |
# line 293 | |
def wants_haml | |
@wants_html ||= File.file?(File.join(rails_root, "vendor/plugins/haml/", "init.rb")) || |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer