Skip to content

Instantly share code, notes, and snippets.

View rossnelson's full-sized avatar
💀

Ross Nelson rossnelson

💀
View GitHub Profile
@rossnelson
rossnelson / server from new install
Created April 29, 2012 16:43
Leopard, Homebrew, Git, RVM, Ruby, MySQL and ImageMagick
# 2012-01-07
#
# Mac OS X 10.5.8
# Homebrew 0.9
# Xcode 3.1.4
# Git 1.7.10
# RVM 1.3.0
# Ruby 1.9.3
# MySQL 5.5.20
# ImageMagick 6.7.5-7
@rossnelson
rossnelson / how-to.md
Last active October 13, 2015 06:57
Mountain Lion, Xcode, GIT, RVM, Passenger, Mysql, ImageMagick

2012-01-15

  • Mac OS X 10.8
  • Homebrew
  • Apple Command Line Tools
  • ZSH
  • Git
  • RVM
  • Ruby 1.9.3
  • Passenger
/* CSS guide */
/* http://www.w3schools.com/cssref/css_selectors.asp */
#id, .class, *,
element, element1+element2, element1 element2, element2>element2, element1~element2,
[attribute], [attribute=value], [attribute~=value], [attribute|=value],
[attribute^=value], [attribute$=value], [attribute*=value],
@rossnelson
rossnelson / result.rb
Last active December 18, 2015 20:49
sunspot results
class Result
attr_accessor :title, :body, :url
def teaser_body
body.gsub(%r{</?[^>]+?>}, '')
end
def self.parse(results)
results.map do |r|
# Homebrew
export PATH=$HOME/.bin:/usr/local/bin:/usr/local/sbin:$PATH
# RVM
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Rails
alias rg='rails generate'
alias rc='rails console'
alias plog='touch log/production.log && tail -f log/production.log'
alias dlog='touch log/development.log && tail -f log/development.log'
alias tlog='touch log/test.log && tail -f log/test.log'
# Passenger
alias rst='touch tmp/restart.txt'
source $HOME/.profile
source $HOME/.bashrc
.DS_Store
export rvm_pretty_print_flag=1
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="wuffers"
# Example aliases