Skip to content

Instantly share code, notes, and snippets.

View gzfrancisco's full-sized avatar
🤖
Bender of Code

Francisco Granados Gómez gzfrancisco

🤖
Bender of Code
View GitHub Profile
@gzfrancisco
gzfrancisco / permit_params_from.rb
Last active August 29, 2015 14:23
Rails 4 permit params DSL
def method_missing(symbol, *args, &block)
p "Start method_missing from #{self} at #{symbol}"
return unless symbol.to_s.start_with?('permit_params_from_')
object = symbol.to_s.sub('permit_params_from_', '')
context = []
def context.method_missing(symbol, &block_b)
p "Start context from #{self} at #{symbol}"
second_context = []
def second_context.method_missing(symbol)
self << symbol
@gzfrancisco
gzfrancisco / osx_install.sh
Created October 18, 2015 07:18 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"