Skip to content

Instantly share code, notes, and snippets.

View mscottford's full-sized avatar
🔎
hunting for code to clean up

M. Scott Ford mscottford

🔎
hunting for code to clean up
View GitHub Profile
@mscottford
mscottford / gist:2788642
Created May 25, 2012 15:05
Run all spree tests on one line
bundle exec rake test_app; cd api; bundle install; bundle exec rspec spec; cd ../auth; bundle install; bundle exec rspec spec; cd ../core; bundle install; bundle exec rspec spec; cd ../dash; bundle install; bundle exec rspec spec; cd ../promo; bundle install; bundle exec rspec spec; cd ..
@mscottford
mscottford / gist:2934651
Created June 15, 2012 04:20
Options for starting a local ftp service for testing with
vsftpd -orun_as_launching_user=YES -olisten=YES -olisten_port=2121 -oanon_mkdir_write_enable=YES -oanon_other_write_enable=YES -oanon_upload_enable=YES -owrite_enable=YES
This file has been truncated, but you can view the full file.
Homebrew 0.9
==> Downloading http://ftp.postgresql.org/pub/source/v9.1.4/postgresql-9.1.4.tar.bz2
Already downloaded: /Users/mscottford/Library/Caches/Homebrew/postgresql-9.1.4.tar.bz2
/usr/bin/tar xf /Users/mscottford/Library/Caches/Homebrew/postgresql-9.1.4.tar.bz2
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file src/pl/plpython/Makefile
==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.4 --datadir=/usr/local/Cellar/postgresql/9.1.4/share/postgresql --docdir=/usr/local/Cellar/postgresql/9.1.4/share/doc/postgresql --enable-thread-safety --with-bonjour --with-gssapi --with-krb5 --with-openssl --with-libxml --with-libxslt --with-ossp-uuid --with-python --with-perl ARCHFLAGS='-arch x86_64'
./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.4 --datadir=/usr/local/Cellar/postgresql/9.1.4/share/postgresql --docdir=/usr/local/Cellar/postgresql/9.1.4/share/doc/postgresql --enable-thread-safety --with-bonjour --with-gssapi --with-krb5 --with-openssl --wi
@mscottford
mscottford / .rbenv-version
Created August 9, 2012 03:29
Capybara issue illustration
1.9.3-p194
/*----------------------------------------------------------------------
* "Agatha Christie" Problem
* Who was the killer?
*
* Alice, her husband, son, daughter,
* and brother are involved in a murder.
* One of the five killed one of the other
* four.
*
* 1. A man and a woman were together in the bar
-- Ruby level backtrace information ----------------------------------------
/Users/mscottford/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'
/Users/mscottford/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:62:in `run'
/Users/mscottford/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:66:in `rescue in run'
/Users/mscottford/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:25:in `run'
/Users/mscottford/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/reporter.rb:34:in `report'
/Users/mscottford/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `block in run'
/Users/mscottford/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `map'
/Users/mscottford/
# run this file with `rails runner sample_tenant.rb`
# You'll need to make sure that you've added `gem 'ffaker'` to your `Gemfile`.
require 'ffaker'
require 'open-uri'
require 'cgi'
PRICES = [
2.99, 4.99, 7.99, 8.99, 12.99, 15.99, 16.99, 17.99, 18.99,
19.99, 21.99, 22.99, 26.99, 28.99, 29.99, 30.99, 32.99, 35.99, 36.99,
$ bundle --version
Bundler version 1.2.3
$ cat Gemfile
gem 'typograph', :require => nil, :git => 'https://github.com/stereobooster/typograph.git'
$ bundle
Updating https://github.com/stereobooster/typograph.git
Using htmlentities (4.3.1)
Using typograph (0.0.1.pre.3) from https://github.com/stereobooster/typograph.git (at master)
$ bundle --version
Bundler version 1.2.3
$ git clone https://josevalim@github.com/plataf
ormatec/devise.git
Cloning into 'devise'...
remote: Counting objects: 17759, done.
remote: Compressing objects: 100% (6477/6477), done.
remote: Total 17759 (delta 11559), reused 16586 (delta 10611)
Receiving objects: 100% (17759/17759), 2.14 MiB | 1.34 MiB/s, done.
$ rails --version
Rails 3.2.11
$ bundle --version
Bundler version 1.2.3
$ rails new nil-default-executeable
create
create README.rdoc
create Rakefile