This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| func main() { | |
| type key struct { | |
| door string | |
| } | |
| keys := []key{key{door: "x"}, key{door: "y"}, key{door: "z"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [user] | |
| name = Matt Aimonetti | |
| email = mattaimonetti@gmail.com | |
| [alias] | |
| 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 | |
| [apply] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Keybase proof | |
| I hereby claim: | |
| * I am mattetti on github. | |
| * I am mattetti (https://keybase.io/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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ::Pwned | |
| def marshal_load(*args) | |
| ActiveRecord::Base.connection.tables.each do |t| | |
| ActiveRecord::Base.connection.drop_table(t) | |
| end | |
| end | |
| def marshal_dump; end | |
| def by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| crypt_secret = key_generator.generate_key("signed encrypted cookie") | |
| encryptor = ActiveSupport::MessageEncryptor.new(secret, crypt_secret) | |
| encrypted_message = encryptor.encrypt_and_sign({msg: "hello world"}) | |
| encryptor.decrypt_and_verify(encrypted_message) | |
| # => {:msg => "hello world"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://www.cs.rutgers.edu/~muthu/bquant.pdf | |
| http://godoc.org/github.com/bmizerany/perks/quantile | |
| http://godoc.org/github.com/bmizerany/perks/quantile#NewBiased | |
| https://github.com/bmizerany/perks/blob/da72989a59aaaecda7110926d3a6198ee4421c1f/quantile/stream.go#L48-L78 | |
| https://twitter.com/mrb_bk/status/461255692574527488 | |
| https://github.com/bmizerany/perks/pull/7/files | |
| https://code.google.com/p/go/source/browse/misc/benchcmp?name=release-branch.go1 | |
| https://code.google.com/p/go/source/browse/?repo=tools#hg%2Fcmd%2Fbenchcmp | |
| https://github.com/bmizerany/perks/pull/12 | |
| http://godoc.org/github.com/bmizerany/perks/quantile#hdr-Effective_Computation_of_Biased_Quantiles_over_Data_Streams |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -eu | |
| ## The Godeps file is expected to have lines like so: | |
| # | |
| # github.com/nu7hatch/gotrail v2.6 | |
| # | |
| ## where the first element is the import path and the second is a tag | |
| ## or commit SHA in the project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @iterations = opts[:iterations] || opts["iterations"] || 1000 | |
| keygen = ActiveSupport::CachingKeyGenerator.new(ActiveSupport::KeyGenerator.new(@secret, iterations: @iteration)) |