Skip to content

Instantly share code, notes, and snippets.


Alan R. Fachini alfakini

View GitHub Profile
fbarbirato / gist:211abbe30be956d21521
Last active August 29, 2015 14:01
Sobre a discussão recente sobre TDD entre DHH, Uncle Bob, Kent Beck e Martin Fowler
View gist:211abbe30be956d21521

Discussão iniciada no grupo tdd-no-mundo-real

Pessoal, desculpe a resposta longa mas esse assunto é muito interessante. Quem hoje em dia, pode acompanhar uma discussão entre grandes pioneiros de sua área que com certeza entrarão para a história da Engenharia de Software nos séculos seguintes? Somos muito afortunados quanto a isso.

Tenho acompanhado essas discussões pelos blogs do DHH e do Uncle Bob.

Achei que deveriam ter incluído o Uncle Bob no hangout. Como disseram que fariam outros episódios, creio que ele deve participar no próximo.

Resumindo o que tirei das opiniões deles:

piscisaureus /
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

ljos /
Last active October 12, 2021 03:23
Showing how to listen to all keypresses in OS X through the Cocoa API using Python and PyObjC
#!/usr/bin/env python
# Copyright © 2016 Bjarte Johansen <>
# The MIT License (MIT)
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# “Software”), to deal in the Software without restriction, including
View test.rb
require 'active_record'
require 'benchmark/ips'
:adapter => 'sqlite3',
:database => ':memory:')
ActiveRecord::Base.connection.create_table('posts') do |t|
t.string :name
erikh /
Created March 31, 2012 07:02 — forked from DAddYE/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
hrldcpr /
Last active May 4, 2023 10:31
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

View gist:1975644
class PostsController < ActionController::Base
def create
def update
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
View gist:1847248
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
endolith /
Last active April 26, 2023 09:40
Frequency estimation methods in Python
from __future__ import division
from numpy.fft import rfft
from numpy import argmax, mean, diff, log, nonzero
from scipy.signal import blackmanharris, correlate
from time import time
import sys
import soundfile as sf
except ImportError:
from scikits.audiolab import flacread