Link: http://blog.therubymug.com/blog/2011/07/26/the-install-osx-lion.html
- Install XCode 4
- Brew:
brew update && brew upgrade
- RVM:
rvm update --head rvm reload rvm repair all
- Gems:
gem pristine
# adapted from http://github.com/rspec/rspec-rails/blob/master/specs.watchr | |
# Run me with: | |
# | |
# $ watchr specs.watchr | |
# -------------------------------------------------- | |
# Convenience Methods | |
# -------------------------------------------------- | |
def all_spec_files |
framework "WebKit" | |
class Widget | |
class RPC | |
class << self | |
public :include | |
end | |
def initialize(widget) | |
@widget = widget |
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |
#!/usr/bin/env macruby | |
framework 'AppKit' | |
# Inspired by: http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html | |
# Inits NSApp | |
NSApplication.sharedApplication | |
# Allows an app without an applicaiton bundle or info.plist to still be an app |
# !/usr/bin/env ruby | |
# USAGE | |
# sudo killmatch Rails | |
unless ARGV[0] | |
puts "Specify a pattern to kill! i.e killmatch Rails" | |
exit | |
end |
alias rake="time rake" | |
# Run `padrino rake` when inside a padrino project, | |
# otherwise run the normal rake command. | |
function rake () { | |
if [[ -f ".components" ]]; then | |
padrino rake $* | |
else | |
ruby -S rake $* | |
fi |
" Search for mkdCode and throw this in there where you like...I did on line 72 | |
syn region mkdCode start=/^``[^`]*/ end=/[^`]*``.*/ |
#put into the padrino boot.rb file before Padrino.load! | |
module Padrino | |
module Admin | |
module AccessControl | |
class Base | |
## | |
# Return an array of project_modules | |
# | |
def project_modules(account) | |
roles = account.roles if account.roles.kind_of?(Array) rescue [] |
Link: http://blog.therubymug.com/blog/2011/07/26/the-install-osx-lion.html
brew update && brew upgrade
rvm update --head rvm reload rvm repair all
gem pristine
require 'sinatra/base' | |
require 'ostruct' | |
dummy = OpenStruct.new :template_cache => Tilt::Cache.new, :settings => Sinatra::Base | |
dummy.extend Sinatra::Templates | |
puts dummy.markdown('# hi') |