Skip to content

Instantly share code, notes, and snippets.

View vquaiato's full-sized avatar
:octocat:
am I working?

Vinicius Quaiato vquaiato

:octocat:
am I working?
View GitHub Profile
#------------------------------------------------------------------------------
# Rotinas para verificação de CPF e CNPJ
# Linguagem: Ruby
# Escrito por: André Camargo < [email protected] > http://blog.boaideia.inf.br
# Use, copie, melhore a vontade! Patches são bem-vindos...
#------------------------------------------------------------------------------
def check_cpf(cpf=nil)
return false if cpf.nil?
nulos = %w{12345678909 11111111111 22222222222 33333333333 44444444444 55555555555 66666666666 77777777777 88888888888 99999999999 00000000000}
source :rubygems
gem 'sinatra'
gem 'json'
gem 'omniauth'
gem 'omniauth-oauth2'
gem 'omniauth-github'
# gem 'omniauth-att', :path => File.expand_path("./../../omniauth-att", __FILE__)
gem 'thin'
@vquaiato
vquaiato / HomeController.cs
Created September 19, 2012 03:54 — forked from rodolfofadino/HomeController.cs
Exemplo Facebook SDK C# (teste)
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;
using Facebook;
namespace MvcApplication1.Controllers
@vquaiato
vquaiato / 01. Gemfile
Created September 13, 2012 04:08 — forked from schleg/01. Gemfile
Setup for Devise + Omniauth (mongoid and facebook-only)
#add this to your gemfile
gem 'mongoid'
gem 'devise'
gem "omniauth-facebook"
@vquaiato
vquaiato / raw_better-fifa-raquer.sh
Created April 12, 2012 03:53 — forked from marciol/raw_better-fifa-raquer.sh
raw_better-fifa-raquer
seq 1 1000000 | xargs -n1 -P100 -I{} curl -d "i_answer=1544512" http://pt.fifa.com/theclub/polls/pollId=1544769/staticvote.htmx
# Inspired by https://github.com/vquaiato/better-fifa-raquer
@vquaiato
vquaiato / Importing posts from Wordpress into Jekyll.rb
Created December 29, 2011 00:24 — forked from vitobotta/Importing posts from Wordpress into Jekyll.rb
The script I used to import posts from my Wordpress blog into a new Jekyll one.
%w(rubygems sequel fileutils yaml active_support/inflector).each{|g| require g}
require File.join(File.dirname(__FILE__), "downmark_it.rb")
module Jekyll
module WordPress
def self.process(dbname = 'SEU_DB_NAME', user = 'SEU_DB_USER', pass = 'SEU_DB_PASS', host = 'localhost', table_prefix = 'wp_')
db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
%w(_posts _drafts images/posts/featured).each{|folder| FileUtils.mkdir_p folder}
@vquaiato
vquaiato / rails-3-mongo-devise.rb
Created June 23, 2011 23:43 — forked from mborromeo/rails-3-mongo-devise.rb
Rails 3 Master + MongoDB + Devise template
# This Rails template will generate a Rails 3 (MASTER) application, with MongoDB as ORM and Devise for authentication.
# You will require ruby 1.9.2-HEAD to run generated app.
file 'Gemfile', <<-GEMS
source 'http://gemcutter.org'
gem 'rails'
gem "mongoid"
gem "bson_ext"
gem "inherited_resources"
gem "devise", :git => "git://github.com/plataformatec/devise.git"
public class MeuDependencyResolver : IDependencyResolver
{
private ILookup<Type, object> lookup;
private HashSet<object> dependencias = new HashSet<object>();
public MeuDependencyResolver()
{
this.dependencias.Add(new DummyDependencia1());
this.dependencias.Add(new DummyDependencia2());
this.dependencias.Add(new DummyDependencia2_2());