Skip to content

Instantly share code, notes, and snippets.

View aussiegeek's full-sized avatar
🚲
Thinking about riding

Alan Harper aussiegeek

🚲
Thinking about riding
View GitHub Profile
Apache + Passenger + FileVault
chmod +a "www allow search" /Users/alan
#!/usr/bin/env ruby
BASE='/opt/ree'
# The command to run for your vanila Ruby 'gem' command
OLD_GEM='gem'
# The command to run for REE's 'gem' command
NEW_GEM="#{BASE}/bin/ruby #{BASE}/bin/gem"
output=`#{OLD_GEM} list`
new_list=`#{NEW_GEM} list`
output.each do |line|
set :user, 'nordicmineral' # Your dreamhost account's username
set :domain, 'gambino.dreamhost.com' # Dreamhost servername where your account is located
set :project, 'nordicmineral' # Your application as its called in the repository
set :application, 'nordicmineral.com' # Your app's location (domain or sub-domain name as setup in panel)
set :applicationdir, "/home/#{user}/#{application}" # The standard Dreamhost setup
# version control config
set :scm_username, 'nordicmineral'
set :scm_password, '***********'
set :repository, "svn+ssh://#{scm_username}@nordicmineral.com/home/nordicmineral/svn/#{project}"

Last night we had our third Brisbane Cocoaheads meeting, great to see we picking up steam and seeing some regulars.

First of all we had Rob Keniger give us an introduction to the WebKit Bridge, which allows you to use HTML and Javascript within a Cocoa app, and bridge between Cocoa and Javascript.

Next up we had Dr Nic assisted by Anthony Mittaz+ try and throw together a quick app to download a contact list from Highrise and display it it an iPhone Table View, when we had to pack up we had the table view almost working correctly, and the data fetching was still to be done.

Watching someone else code, I picked up two shortcuts name
Cmd + Double Click a class name to view its header definiation
Option + Double Click on a class name to view its documentation

#!/usr/bin/env ruby
BASE='/opt/ruby-enterprise-1.8.6-20080624'
# The command to run for your vanila Ruby 'gem' command
OLD_GEM='gem'
# The command to run for REE's 'gem' command
NEW_GEM="#{BASE}/bin/ruby #{BASE}/bin/gem"
output=`#{OLD_GEM} list`
new_list=`#{NEW_GEM} list`
output.each do |line|
#!env ruby
class DummyTable
def initialize(tablename)
@@tablename=tablename
end
def self.method_missing(m, *args); end
def self.datetime(name,options={})
puts "execute \"UPDATE #{@@tablename} SET #{name}=CONVERT_TZ(#{name},'SYSTEM','+00:00');\""
end
ActiveRecord::Base.logger = Logger.new(STDERR)