Skip to content

Instantly share code, notes, and snippets.

View tylerjohnst's full-sized avatar
:fishsticks:

Tyler Johnston tylerjohnst

:fishsticks:
  • GitHub Staff
  • Saint Petersburg, FL
View GitHub Profile

Rails Dev Stack on Snow Leopard

(from a scratch install). Kinda, I imported my user home (~) from a Time Machine backup.

Homebrew

sudo mkdir /usr/local
sudo chown -R `whoami` /usr/local
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local

Deploying an app for the first time

Locally:

cap deploy:ownership -s user=admin
cap deploy:setup

Verify & tweak yaml configs, Aloha, etc (most of which were generated by socialist) in /var/www/dashboard.app/shared.

cap deploy

Installing Rails on Windows

Download RubyInstaller 1.9.1 and Development Kit

http://rubyinstaller.org/download.html

Update and Install Gems

gem update --system

gem install sqlite3-ruby

/etc/network/interfaces

auto lo
iface lo inet loopback

# WAN Interface
auto eth0
iface eth0 inet static
     address XXX.XXX.XXX.XXX

netmask XXX.XXX.XXX.XXX

Rails Dev Stack on Snow Leopard

(from a scratch install). Kinda, I imported my user home (~) from a Time Machine backup.

Homebrew

sudo mkdir /usr/local
sudo chown -R `whoami` /usr/local
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local

Installing Rails on Ubuntu 10.04 LTS

sudo apt-get install build-essential libsqlite3-dev
sudo apt-get install ruby1.9.1
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.6.tgz
tar -zxf rubygems-1.3.6.tgz
cd rubygems-1.3.6
sudo ruby setup.rb
sudo gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n sqlite3-ruby

sudo gem install rails --pre

def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
@tylerjohnst
tylerjohnst / barcodes.coffee
Created November 29, 2011 21:50
Ugh JScript
# Barcode generation in Windows JScript
number = WSHInputBox('Consignment Barcodes', 'How many barcodes do you want to generate?', '1')
number = parseInt(number)
if number >= 0
number += 1
else
return
@tylerjohnst
tylerjohnst / fulcrum_classification_set_example.json
Created May 1, 2012 13:51
Example classification_set JSON body for an API request
{
"classification_set":{
"name":"Florida and Georgia Cities",
"description":"List of serviceable cities in Florida and Georgia",
"created_at":"2012-04-24T08:59:35Z",
"updated_at":"2012-04-24T08:59:50Z",
"items":[
{
"label":"Florida",
"value":"Florida",