Skip to content

Instantly share code, notes, and snippets.

View serradura's full-sized avatar
🎯
Focusing

Rodrigo Serradura serradura

🎯
Focusing
View GitHub Profile
@serradura
serradura / Gemfile
Created April 28, 2011 15:06
Arquivos do post "Desenvolvendo uma Aplicação Facebook do Zero com RAILS 3 - Parte 1", link: http://blog.serraduralabs.com/desenvolvendo-uma-aplicacao-facebook-do-zero-2
source 'http://rubygems.org'
gem 'rails', '3.0.7'
gem 'koala', '1.0.0.rc'
group :development, :test do
gem 'sqlite3'
gem 'mongrel'
end
@serradura
serradura / sinatra_fb_canvas_app.rb
Created June 11, 2011 12:17
Arquivos de Exemplo de como integrar aplicações Ruby ao Facebook
require 'rubygems'
require 'sinatra'
require 'haml'
require 'koala'
enable :sessions
set :facebook, {:app_id => 'Application ID',
:app_secret => 'Application Secret',
:callback_url => 'http://localhost:3000/canvas/'}
@serradura
serradura / config.ru
Created December 13, 2011 03:16
Rack Middleware
require 'poc'
use UrlEncodedParametersEliminator
run App.new
@serradura
serradura / LICENSE.txt
Created April 27, 2012 17:10 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Rodrigo Serradura <http://github.com/serradura>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
@serradura
serradura / fgraph.rb
Last active December 10, 2015 00:58 — forked from anonymous/fb_public.rb
Two clients: HGet (easy way to have Net::HTTP responses supports HTTP and HTTPS) and FGraph (shortcut to do Facebook Graph API requests)
# Examples:
# client = FGraph.new("USERNAME")
#
# if you need see response details use:
# client.request # returns a Net::HTTPFound instance, with this you can see the status, headers# Examples:
# client = FGraph.new("USERNAME")
#
# client.data # returns the parsed response body
# if you need an alias to get the api data response, use:
/*************
CONSTRUCTOR:
*************
Notify.options = {"closeButton": true}; // Defines global options.
notify = new Notify({"closeButton": false}); // You can pass custom options
*/
/*******
USAGE
*******
@serradura
serradura / OSX-setup.sh
Last active September 4, 2015 17:21
Dotfiles for standard stack setup
# chmod +x OSX-setup.sh
if ! type "git" > /dev/null; then
echo "Installing git"
brew install git
fi
if [ -d "~/.oh-my-zsh" ]; then
# Installing oh my zsh
@serradura
serradura / Linux.global.gitignore
Last active August 29, 2015 14:16
Linux global gitignore
#########
# Linux #
#########
*~
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
@serradura
serradura / scripts.sh
Last active July 29, 2016 02:44
Short shell scripts
# # Uninstall all installed gems - Ruby 2.3.x
gem list | grep -Ev 'test-unit|rvm|rubygems-bundler|rdoc|psych|power_assert|net-telnet|io-console|gem-wrappers|executable-hooks|did_you_mean|rake|bundler-unload|bigdecimal|minitest|json' | cut -d" " -f1 | xargs gem uninstall -aIx
# Uninstall all installed gems
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
# Delete all git local tags
git tag | grep | cut -d" " -f1 | xargs git tag -d
# Manual js minification