This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ted@ceylon /usr/bin »ls -al | grep -i ruby | |
lrwxr-xr-x 1 root wheel 75 May 21 05:31 erb -> ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/erb | |
lrwxr-xr-x 1 root wheel 71 May 21 05:31 gem -> ../../System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem | |
lrwxr-xr-x 1 root wheel 75 May 21 05:31 irb -> ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/irb | |
-rwxr-xr-x 1 root wheel 435 Jul 4 08:14 multiruby | |
-rwxr-xr-x 1 root wheel 441 Jul 4 08:14 multiruby_setup | |
lrwxr-xr-x 1 root wheel 76 May 21 05:31 rdoc -> ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/rdoc | |
lrwxr-xr-x 1 root wheel 74 May 21 05:31 ri -> ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ri | |
lrwxr-xr-x 1 root wheel 71 Jul 8 22:13 ruby -> /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby | |
-rwxr-xr-x 1 root w |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** LOCAL GEMS *** | |
actionmailer (2.3.2, 1.3.6) | |
actionpack (2.3.2, 1.13.6) | |
actionwebservice (1.2.6) | |
activerecord (2.3.2, 1.15.6) | |
activeresource (2.3.2) | |
activesupport (2.3.2, 1.4.4) | |
acts_as_ferret (0.4.4, 0.4.1) | |
autotest-fsevent (0.1.1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# threads = Array(servers).map { |server| establish_connection_to(server, failed_servers) } | |
# threads.each { |t| t.join } | |
Array(servers).each { |server| safely_establish_connection_to(server, Thread.current, failed_servers) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Time | |
def no_minutes | |
return self - self.min.minutes - self.sec.seconds | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: Schema is legacy (not my design!) | |
class WidgetSummary < ActiveRecord::Base | |
class << self | |
def for_factory_by_part_between(factory, start_date, end_date) | |
start_hour = Hour.after(start_date) | |
end_hour = Hour.before(end_date) | |
find_by_sql <<-SQL | |
select WidgetSummary.* | |
from WidgetSummary | |
inner join Widget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://forums.atlassian.com/thread.jspa?messageID=257299176&tstart=0 | |
1. Change the Base SDK in the Xcode Project to "Simulator - iPhone OS 2.2" | |
2. Change the Code Signing Identity to "Don't Code Sign" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dump table with data | |
# to be called by migration prior to potentially-dangerous operation | |
class ActiveRecord::Migration | |
def self.backup_table(table) | |
filename = "#{Time.now.strftime('%Y%m%d%H%M%S')}_#{self.to_s}_#{table}.sql" | |
STDERR.puts "Backing up table #{table} to #{filename}" | |
@connections ||= YAML::load(ERB.new(IO.read("#{RAILS_ROOT}/config/database.yml")).result) | |
connection = @connections[RAILS_ENV] | |
parameters = [] | |
(parameters << "-u #{connection['username']}") if connection['username'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== Epic Snow Leopard Upgrayyyyd Guide === | |
Son, you’re now living in the land of 64-bit systems. | |
That means that some of your 32-bit shit is now broken. | |
Not all is lost. | |
== Fixing MySQL weirdness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Terminal" | |
activate | |
do script with command "cd ~/my/development/directory" | |
do script with command "cd ~/my/development/directory; mate ." | |
do script with command "cd ~/my/development/directory; script/server" | |
do script with command "cd ~/my/development/directory; script/console" | |
do script with command "cd ~/my/development/directory; autotest" | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ted@teds-laptop:~$ ruby -v | |
The program 'ruby' is currently not installed. You can install it by typing: | |
sudo apt-get install ruby | |
bash: ruby: command not found | |
ted@teds-laptop:~$ sudo apt-get install ruby | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
E: Couldn't find package ruby |