Skip to content

Instantly share code, notes, and snippets.


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.
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
4qt Slow Cooker from Crockpot: $10
Used a few times, I actually really like it, but I haven't been cooking much.
View gist:4f4e5f28efd6c9ccd533
May - Cycling - Grizzly Peak Century
July - Running - SF Marathon
August - Cycling - Marin Century
September - Cycling - The Jensie GranFondo
October - Cycling - Levi's GranFondo
December - Running - Endurance Challenger
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:
/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 /
Created Apr 28, 2014
Arquivo de localização do Rails para português brasileiro.
- Dom
- Seg
- Ter
- Qua
- Qui
- Sex
- Sáb
vinibaggio / gist:5670821
Created May 29, 2013
Diferença visual entre callbacks e promises
View gist:5670821
// Callbacks
ObjController.prototype.update = function (req, res) { (err, object) {
if(err) req.render500(err)
otherModel.update(req.form, function (err, object) {
if(err) req.render500(err)
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 / gist:2952295
Created Jun 19, 2012
Validação de emails pela RFC
View gist:2952295
# Original:
(?:(?:\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]+