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:5707976
Last active December 18, 2015 01:59
Command used to build Ruby 2.0.0-p353 with rbenv, optimization values and readline from homebrew
env CFLAGS='-march=corei7-avx -O2 -pipe' RUBY_CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline`" rbenv install 2.0.0-p353
require 'rake'
task :spec => :seed_test_db
task :seed_test_db do
ENV["RAILS_ENV"] ||= 'test'
Rake::Task['db:seed'].invoke
end
rsync -cavhE --progress
var babyRoutine = require('baby-routine');
babyRoutine.createRoutine({ 'parents': [scott, andrea], 'baby': simon }, function(routine) {
routine.wakeUp(function(baby, parents) {
parents.changeDiaper(baby);
parents.feed(baby);
parents.playWithBaby(baby);
});
routine.onTired(function(baby, parents) {
if (parents.isBedTime(baby)) {
Downloading openssl-1.0.1e.tar.gz...
-> https://www.openssl.org/source/openssl-1.0.1e.tar.gz
Installing openssl-1.0.1e...
BUILD FAILED
Inspect or clean up the working tree at /var/folders/8m/z64rk5ds0q75t53jr5r4zln40000gn/T/ruby-build.20130225095411.34549
Results logged to /var/folders/8m/z64rk5ds0q75t53jr5r4zln40000gn/T/ruby-build.20130225095411.34549.log
Last 10 log lines:
@mscottford
mscottford / gist:5015777
Last active December 14, 2015 02:39 — forked from jsqu99/gist:5015728
<% preview_width, preview_height = proof_file.large.get_version_dimensions %>
<% original_width, original_height = proof_file.original.get_version_dimensions %>
<%= javascript_tag %Q[
function activate_#{proof_file.object_id}() {
// set the 'master' and 'preview' images to be cropped
$('#cropbox').attr('src', '#{proof_file.large.url}');
$('#preview').attr('src', '#{proof_file.large.url}');
@mscottford
mscottford / gist:5014352
Created February 22, 2013 15:49
shell command used to install 1.9.3-p385 via rbenv (ruby-build) with readline and openssl from homebrew and optimization flags
env CFLAGS='-g -O2' CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`" rbenv install 1.9.3-p385
@mscottford
mscottford / gist:5014132
Created February 22, 2013 15:18
shell magic to uninstall all gems
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
:ruby => '1.9.3-p327'
sunstreaker:i1136 mscottford$ bundle -v
Bundler version 1.2.3
:ruby => '1.9.3-p327'
sunstreaker:i1136 mscottford$ cat Gemfile
source :rubygems
gem 'rake'
$ bundle -v
Bundler version 1.2.3
$ ls
Gemfile-special
$ cat Gemfile-special
source :rubygems
gem 'rake'