OSX -> 10.9.3
$ brew -v
Homebrew 0.9.5
| Site -> has_many :pages | |
| > Rails.cache.fetch('test') { a = Array.new ; Site.all.each{|s| a.push(s) if s.pages.count > 1 } ; a } | |
| Site Load (0.7ms) SELECT "sites".* FROM "sites" | |
| (0.7ms) SELECT COUNT(*) FROM "pages" WHERE "pages"."site_id" = 2 | |
| (0.7ms) SELECT COUNT(*) FROM "pages" WHERE "pages"."site_id" = 1 | |
| => [#<Site id: 2, designer_id: 4, url: "http://tigris.id.au/", created_at: "2012-09-11 01:18:07", updated_at: "2012-09-11 01:18:07">, #<Site id: 1, designer_id: 1, url: "http://tigris.id.au/", created_at: "2012-09-02 16:39:54", updated_at: "2013-08-01 03:15:47">] | |
| > Rails.cache.fetch('test') { a = Array.new ; Site.all.each{|s| a.push(s) if s.pages.count > 1 } ; a } | |
| => [#<Site id: 2, designer_id: 4, url: "http://tigris.id.au/", created_at: "2012-09-11 01:18:07", updated_at: "2012-09-11 01:18:07">, :@new_record, false] |
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| require 'bundler/setup' | |
| require 'mail' | |
| def formatted_email(name, email) | |
| address = Mail::Address.new(email) | |
| address.display_name = name | |
| address.format |
| source 'http://rubygems.org' | |
| gem 'rails', '4.0.0.beta1' | |
| gem 'sqlite3' |
I don't get why when I upload (ftp.put) a copy of the same file, then download that copy, ruby thinks the content is different? Obviously something in Net::FTP is screwing with my ISO-8859-1 character in the file? I dunno, still trying to track it down.
| # /tmp/foo/Gemfile | |
| source 'https://rubygems.org' | |
| gem 'rake' | |
| gem 'unicorn' |
| default['unicorn']['before_fork'] = %Q( | |
| defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect! | |
| old_pid = '#{node['unicorn']['pid']}.oldbin' | |
| if File.exists?(old_pid) && server.pid != old_pid | |
| begin | |
| Process.kill('QUIT', File.read(old_pid).to_i) | |
| rescue Errno::ENOENT, Errno::ESRCH | |
| puts 'Old master alerady dead' | |
| end |
| { | |
| "auto_complete_commit_on_tab": true, | |
| "auto_match_enabled": false, | |
| "color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme", | |
| "fold_buttons": false, | |
| "hot_exit": false, | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ], |
| #!/usr/bin/env bash | |
| GITHUB_USER="tigris" | |
| GITHUB_PROJECT=... | |
| GIT_BRANCH="master" | |
| apt-get -y update | |
| apt-get -y install build-essential zlib1g-dev libssl-dev libyaml-dev libreadline-dev | |
| cd /tmp | |
| wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
| tar -xvzf ruby-1.9.3-p194.tar.gz |