Skip to content

Instantly share code, notes, and snippets.

View srMarquinho's full-sized avatar
🎯
Focusing

Marco Araujo srMarquinho

🎯
Focusing
View GitHub Profile
@srMarquinho
srMarquinho / ubuntu_agnoster_install.md
Created June 17, 2017 08:00 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 14.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@srMarquinho
srMarquinho / application_controller.rb
Created February 14, 2017 09:14 — forked from scottwb/application_controller.rb
Get a list of all the filters on a given Rails 3 controller.
# Add these methods to your ApplicationController. Then, any controller
# that inherits from it will have these methods and can programmatically
# determine what filters it has set.
class ApplicationController < ActionController::Base
def self.filters(kind = nil)
all_filters = _process_action_callbacks
all_filters = all_filters.select{|f| f.kind == kind} if kind
all_filters.map(&:filter)
end