Skip to content

Instantly share code, notes, and snippets.


Matt Aimonetti mattetti

View GitHub Profile
mattetti / gist:248
Created Jul 21, 2008 — forked from schacon/gist:1
my test fork!
View gist:248
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
mattetti / bug.rb
Created Feb 12, 2014
typo bug that cost me a few hours of debugging
View bug.rb
@iterations = opts[:iterations] || opts["iterations"] || 1000
keygen =, iterations: @iteration))
View gist:9577075
func APIToken(usr, password string) (string, error) {
req, err := http.NewRequest("GET", apiURL, nil)
if err != nil {
return "", fmt.Errorf("creating request")
req.SetBasicAuth(usr, password)
resp, err := client.Do(req)
if err != nil {
return "", err
mattetti / gist:f5b0c44830eb9b98178a
Created Jun 24, 2014
urls from Blake Mizerany's talk at #GoSF - June 23rd
View gist:f5b0c44830eb9b98178a
View gist:97adf09df58b969943d4
crypt_secret = key_generator.generate_key("signed encrypted cookie")
encryptor =, crypt_secret)
encrypted_message = encryptor.encrypt_and_sign({msg: "hello world"})
# => {:msg => "hello world"}
View gist:f17b1c37d46a058f6345
class ::Pwned
def marshal_load(*args)
ActiveRecord::Base.connection.tables.each do |t|
def marshal_dump; end
def by
View gist:14377563832ae3bd77ec
### Keybase proof
I hereby claim:
* I am mattetti on github.
* I am mattetti ( on keybase.
* I have a public key whose fingerprint is EC60 B9C9 EE13 9B5D E626 5349 9012 5AAA CAEC EA7F
To claim this, I am signing this object:
mattetti / .gitconfig
Created May 28, 2015
cat ~/.gitconfig
View .gitconfig
name = Matt Aimonetti
email =
co = checkout
st = status
br = branch
ci = commit
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s - %an %Cgreen(%cr) %C(bold blue)%Creset' --abbrev-commit
View h4x0r_0.go
package main
import "fmt"
func main() {
type key struct {
door string
keys := []key{key{door: "x"}, key{door: "y"}, key{door: "z"}}
View gist:5710
merb-gen app test
undefined method `generator_scope' for Merb:Module
/opt/local/lib/ruby/gems/1.8/gems/merb-gen-0.9.4/lib/merb-gen/base.rb:15:in `initialize'
/opt/local/lib/ruby/gems/1.8/gems/merb-gen-0.9.4/app_generators/merb/merb_generator.rb:9:in `initialize'
/opt/local/lib/ruby/gems/1.8/gems/rubigen-1.3.2/lib/rubigen/lookup.rb:163:in `new'
/opt/local/lib/ruby/gems/1.8/gems/rubigen-1.3.2/lib/rubigen/lookup.rb:163:in `instance'
/opt/local/lib/ruby/gems/1.8/gems/rubigen-1.3.2/lib/rubigen/scripts/../scripts.rb:30:in `run'
/opt/local/lib/ruby/gems/1.8/gems/merb-gen-0.9.4/lib/merb-gen.rb:19:in `run'