Skip to content

Instantly share code, notes, and snippets.

View vinibaggio's full-sized avatar

Vinicius Baggio Fuentes vinibaggio

View GitHub Profile
- 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.
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
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:0e8be5f07b81dbdb49d6
Created December 22, 2014 23:01
GC crash in 1.4
$ 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 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
@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();
@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]+