Oscar Correa: [email protected]
- css
- javascript
- node.js
- angular (al menos mid-level)
Oscar Correa: [email protected]
ENV["RAILS_ENV"] ||= "production" | |
module UnicornServer | |
# http://unicorn.bogomips.org/Unicorn/Configurator.html | |
CONFIG_PATH = File.join(Rails.root, "config", "unicorn.rb") | |
PID_PATH = File.join(Rails.root, "tmp", "pids", "unicorn.pid") | |
RBENV = %x[which rbenv].strip | |
DAEMON = "bundle exec unicorn_rails" | |
DAEMON_OPTS = "-c #{CONFIG_PATH} -E #{ENV["RAILS_ENV"]} -D" |
<VirtualHost *:80> | |
ServerName ##APP_DOMAIN## | |
ServerAlias www.##APP_DOMAIN## | |
ServerAlias ##APPLICATION_ENV##.www.##APP_DOMAIN## | |
ServerAlias ##APPLICATION_ENV##.##APP_DOMAIN## | |
ServerAdmin admin@##APP_DOMAIN## | |
SetEnv APPLICATION_ENV ##APPLICATION_ENV## | |
SetEnv SERVER_HOSTNAME ##SERVER_HOSTNAME## | |
Header append X-Host-List "%{SERVER_HOSTNAME}e" |
# = YERB | |
# | |
# Who needs HAML when you have YAML + ERB? ;) | |
# | |
# See example.yaml below for an example. You can run this code | |
# by cloning this gist and then `ruby _yerb.rb example.yaml`. | |
# | |
# Notice that you need Ruby 1.9 so the hash order is preserved. | |
# Obviously, this is just for fun. Definitely slow as hell. | |
# |
module Feedzirra | |
module Parser | |
class FlickrEntry | |
include SAXMachine | |
include FeedEntryUtilities | |
element :guid, :as => :id | |
element :link, :as => :url |
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!" |