- Export virtual machines to ~/Documents
- ~/.purple (pidgin config)
- ~/.ievms (no configs, but super large so downloading again would be annoying)
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 |
diff --git a/lib/autolink.rb b/lib/autolink.rb | |
index 178e92f..dcdbc2a 100644 | |
--- a/lib/autolink.rb | |
+++ b/lib/autolink.rb | |
@@ -78,12 +78,10 @@ module Twitter | |
new_text = "" | |
# this -1 flag allows strings ending in ">" to work | |
- text.split(/[<>]/, -1).each_with_index do |chunk, index| | |
- if index != 0 |