Skip to content

Instantly share code, notes, and snippets.

View vinibaggio's full-sized avatar

Vinicius Baggio Fuentes vinibaggio

View GitHub Profile
@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
- How was your path to coding? Bootcamps/freecodecamp or studied by yourself?
Which resource was the most useful?
- How were the entry level interviews like? In terms of steps, what kind of co
ding questions?
- Was there something you wish you knew before when starting interviewing?
- What is the number one thing someone starting anew should focus immediately?
Eg. mastering a specific language vs. learning algorithms vs building a portfolio.
@vinibaggio
vinibaggio / gist:2952295
Created June 19, 2012 04:34
Validação de emails pela RFC
# Original: http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]
)+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:
\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(
?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[
\t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\0
31]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\
](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+
def wordpattern(pattern, string):
unique_types = {}
for c in list(pattern):
unique_types[c] = 1
patterns = sorted(unique_types.keys())
return wordpattern_helper(0, patterns, {}, pattern, string)
def wordpattern_helper(start, patterns, memo, final_pattern, string):
Adidas Freefootball shoes: $40
===================================
Used.
http://www.soccer.com/Images/Catalog/ProductImages/hero600/21624.FW01.jpg
4qt Slow Cooker from Crockpot: $10
=====================================
Used a few times, I actually really like it, but I haven't been cooking much.
http://www.amazon.com/dp/B0012US88I/ref=twister_B00EUC74US?_encoding=UTF8&psc=1
@vinibaggio
vinibaggio / rails.pt.yml
Created April 28, 2014 06:17
Arquivo de localização do Rails para português brasileiro.
pt:
date:
abbr_day_names:
- Dom
- Seg
- Ter
- Qua
- Qui
- Sex
- Sáb
May - Cycling - Grizzly Peak Century https://www.grizz.org/century/
July - Running - SF Marathon http://www.thesfmarathon.com/
August - Cycling - Marin Century http://www.marincyclists.com/
September - Cycling - The Jensie GranFondo http://thejensiegranfondo.com/
October - Cycling - Levi's GranFondo https://www.levisgranfondo.com/
December - Running - Endurance Challenger https://www.thenorthface.com/get-outdoors/endurance-challenge/california.html
@vinibaggio
vinibaggio / gist:5670821
Created May 29, 2013 14:44
Diferença visual entre callbacks e promises
// Callbacks
ObjController.prototype.update = function (req, res) {
model.save(function (err, object) {
if(err) req.render500(err)
otherModel.update(req.form, function (err, object) {
if(err) req.render500(err)
req.render('obj')
})
})
@vinibaggio
vinibaggio / gist:3925634
Created October 21, 2012 03:59
Example of pattern matching in scala
// Pattern matching <3
scala> val X = 'b'
X: Char = b
scala> val List(_, (X, x)) = List(('a', 1), ('b', 2))
x: Int = 2
function Car() {
this.wheels = arguments[0];
this.type = arguments[1];
}
function SportsCar() {
this.speed = arguments[0];
}
SportsCar.prototype = new Car();