Skip to content

Instantly share code, notes, and snippets.

View mdeering's full-sized avatar
👨‍💻
Computer, computer, computer

Michael Deering mdeering

👨‍💻
Computer, computer, computer
View GitHub Profile
module CustomMatchers
class HaveActiveRecordTimestamps
def description
"have the active record timestamp columns created_at and updated_at"
end
def initialize()
end
cd
mkdir tmp
cd tmp
wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
tar zxvf GeoIP.tar.gz
cd GeoIP-1.4.6
./configure --prefix /opt/GeoIP
make
make check
# I'm trying to setup some attributes on a newly created page instance
# that was created through a association
# page = Page.first
# page.site # => 'mysite'
# new_page = page.children.create
# new_page.site # => 'mysite'
class Page < ActiveRecord::Base
freeswitch@ubuntu> status
API CALL [status()] output:
UP 0 years, 0 days, 2 hours, 43 minutes, 51 seconds, 325 milliseconds, 792 microseconds
0 session(s) since startup
0 session(s) 0/30
1000 session(s) max
cd
mkdir tmp
cd tmp
mkdir mysql_down_dec_4
cd mysql_down_dec_4
sudo cp /var/log/mysql.log.1.gz .
sudo cp /var/log/syslog .
sudo cp /var/log/syslog.1.gz .
#...
# Added in your example and it passed without your pull request.
describe 'will perform its actions before type cast' do
before do
User.class_eval do
normalize_attribute :price do |value|
value.to_s.gsub(",",".").to_f
end
end
########################## Add Git Branch to the Shell Prompt ####################################
LIGHT_BLUE="\[\033[1;34m\]"
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
parse_git_branch (){
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
gem: --no-rdoc --no-ri
.DS_Store
coverage/*
log/*.log
db/*.db
db/*.sqlite3
tmp/**/*
doc/api
doc/app
config/database.yml
config/settings.yml
source 'http://rubygems.org'
gem 'capistrano'
gem 'compass'
gem 'haml'
gem 'mysql'
gem 'rails', '3.0.0.beta4'
gem 'rspec'
gem 'rspec-rails'