Skip to content

Instantly share code, notes, and snippets.

View vinibaggio's full-sized avatar

Vinicius Baggio Fuentes vinibaggio

View GitHub Profile
@vinibaggio
vinibaggio / exemplo.css
Created October 10, 2011 02:09
Exemplo de bg com gradiente
html { min-height: 100%; }
body {
width: 600px;
margin: auto;
background: #1e1e1e;
background-image: url('textura.png');
background-image: url('textura.png'), -webkit-gradient(linear, left top, left bottom, from(rgba(100, 100, 100, 0.2)), to(rgba(0, 0, 0, 0.5))); /* Saf4+, Chrome */
background-image: -webkit-linear-gradient(top, rgba(100, 100, 100, 0.2), rgba(0, 0, 0, 0.5)), url('textura.png'); /* Chrome 10+, Saf5.1+ */
@vinibaggio
vinibaggio / arvoreb.c
Created November 20, 2011 20:22
Arvore B, sem remoção, apenas inserção
// PS: Datasets:
// http://dl.dropbox.com/u/3545192/cep.zip
// http://dl.dropbox.com/u/3545192/consultas.txt
/* SCE-183 - Algoritmos e estruturas de dados II
* Professora: Prof.a Dr.a Hosiane M. Bueno
*
* Trabalho 2: ¡rvore-B
*
* Autor: VinÌcius Baggio Fuentes
@vinibaggio
vinibaggio / gist:1566379
Created January 5, 2012 17:58
Doubling all the numbers
;; I have a sequence and I want to double all the numbers up to a limit. The following works, but looks awful!
;; (defn double-all [numbers limit]
;; (for [val numbers :when (< (* 2 val) limit) ] (* 2 val)))
(defn double-all [numbers limit]
(filter #(> limit %) (map #(* 2 %) numbers)))
(double-all (range 20) 10)
@vinibaggio
vinibaggio / spoj02.clj
Created January 6, 2012 18:51
Prime numbers
;; 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))
function AkibaPlataformer(object) {
object.jump = function() {
return "Pula danada";
}
}
function Akiba(object) {
object.bla = function() {
return "Vai danada";
}
defined?(a)
a = 1
puts a.inspect
function pless {
pygmentize -O encoding=UTF-8 $1 | less -r
}
@vinibaggio
vinibaggio / gist:1727064
Created February 3, 2012 01:29
closure example
bla = 1
# => 1
proc = -> { bla = bla + 1; bla }
# => #<Proc:0x007fb67b276b98@(irb):2 (lambda)>
bla = 5
# => 5
@vinibaggio
vinibaggio / gist:1727086
Created February 3, 2012 01:34
blocos malucos
bloco = -> {
vai_danada = 1
retorno = -> {
vai_danada += 1
}
vai_danada = 5
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"