Skip to content

Instantly share code, notes, and snippets.

Avatar

Vinicius Baggio Fuentes vinibaggio

View GitHub Profile
View questions
- 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.
View patterns.py
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):
View gist:223880ac23d943136038cc19fdce3168
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
View gist:4f4e5f28efd6c9ccd533
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
View gist:0e8be5f07b81dbdb49d6
$ go run bla.go
runtime: garbage collector found invalid heap pointer *(0x2081ce020+0x0)=0x1 s=nil
runtime: found *(0x2081b9ce0+0x28) = 0x2081ce020+0x0
fatal error: bad pointer
runtime stack:
runtime.throw(0x151ab9)
/usr/local/Cellar/go/1.4/libexec/src/runtime/panic.go:491 +0xad fp=0x7fff5fbff1a0 sp=0x7fff5fbff170
scanblock(0x2081b9ce0, 0x240, 0x1065e8)
/usr/local/Cellar/go/1.4/libexec/src/runtime/mgc0.c:412 +0x989 fp=0x7fff5fbff2e0 sp=0x7fff5fbff1a0
@vinibaggio
vinibaggio / rails.pt.yml
Created Apr 28, 2014
Arquivo de localização do Rails para português brasileiro.
View rails.pt.yml
pt:
date:
abbr_day_names:
- Dom
- Seg
- Ter
- Qua
- Qui
- Sex
- Sáb
@vinibaggio
vinibaggio / gist:5670821
Created May 29, 2013
Diferença visual entre callbacks e promises
View gist:5670821
// 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 Oct 21, 2012
Example of pattern matching in scala
View gist:3925634
// Pattern matching <3
scala> val X = 'b'
X: Char = b
scala> val List(_, (X, x)) = List(('a', 1), ('b', 2))
x: Int = 2
View gist:3068537
function Car() {
this.wheels = arguments[0];
this.type = arguments[1];
}
function SportsCar() {
this.speed = arguments[0];
}
SportsCar.prototype = new Car();
@vinibaggio
vinibaggio / gist:2952295
Created Jun 19, 2012
Validação de emails pela RFC
View gist:2952295
# 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]+