Skip to content

Instantly share code, notes, and snippets.

View fernandokosh's full-sized avatar

Fernando Kosh fernandokosh

View GitHub Profile
@viola
viola / gist:1070410
Created July 7, 2011 20:00
Example of fetching Hash (key,value) to the simple_form collection.
-- model
some sort of constant hash:
HASH_NAME = {
0 => "Choose:",
1 => "On-Campus Recruiting - CSO",·
2 => "CSO Staff Referral",
3 => "Faculty Contact",·
4 => "Career Day",·
5 => "CSO Summer Job Listing",·
6 => "Alumni Contact",·
@mateusg
mateusg / inflections.rb
Created April 17, 2011 23:03
pt-BR inflections file for Ruby on Rails applications
# encoding: utf-8
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
@troex
troex / unicorn.sh
Created April 4, 2011 20:57
Unicorn start/stop/restart script for Debian
#!/bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs mysql
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: unicorn initscript
# Description: Unicorn is an HTTP server for Rack application
### END INIT INFO