Skip to content

Instantly share code, notes, and snippets.

Avatar

Vinicius Baggio Fuentes vinibaggio

View GitHub Profile
View facebook_user.rb
class FacebookUser
def initialize(data)
@uid = data.uid
@first_name = data.info.first_name
@last_name = data.info.last_name
@email = data.info.email
@image = data.info.image
@urls = data.info.urls['Facebook']
@token = data.credentials.token
end
View flipflops.rb
(1..10).each do |i|
puts i if i==3..i==5
end
# 3
# 4
# 5
@vinibaggio
vinibaggio / gist:2472759
Created Apr 23, 2012
Loja do vinibaggio
View gist:2472759

Loja do @vinibaggio

Vou vender minhas coisas pois estou de mudança e vou aproveitar pra limpar os armarios! Estou aberto à negociação! Mande seu item de interesse e sua proposta pra vinibaggio@gmail.com. Fotos também sob demanda.

Promoção de encerramento, 15% de desconto em tudo! Pedidos com envio por sedex apenas até hoje as 14h.

Tech

View cs-httpi-less.diff
diff --git a/lib/rbraspag.rb b/lib/rbraspag.rb
index 1e5dfdc..512705e 100644
--- a/lib/rbraspag.rb
+++ b/lib/rbraspag.rb
@@ -4,7 +4,7 @@ require 'bundler'
Bundler.setup
-require "cs-httpi"
+require "httpi"
View gist:1727086
bloco = -> {
vai_danada = 1
retorno = -> {
vai_danada += 1
}
vai_danada = 5
View gist:1727064
bla = 1
# => 1
proc = -> { bla = bla + 1; bla }
# => #<Proc:0x007fb67b276b98@(irb):2 (lambda)>
bla = 5
# => 5
View .bashrc
function pless {
pygmentize -O encoding=UTF-8 $1 | less -r
}
View gist:1670822
defined?(a)
a = 1
puts a.inspect
View gist:1584610
function AkibaPlataformer(object) {
object.jump = function() {
return "Pula danada";
}
}
function Akiba(object) {
object.bla = function() {
return "Vai danada";
}
View spoj02.clj
;; The input is:
;; first line: the number of test cases
;; next lines are the limits m n such as prime numbers are in [m;n]
;; Algorithm used: Sieve of Erasthotenes
(use '[clojure.set :only (difference)])
(defn mark
([all n limit]
(mark all n n limit))