Skip to content

Instantly share code, notes, and snippets.

View astropanic's full-sized avatar

Wojciech Pietrzak astropanic

View GitHub Profile
@astropanic
astropanic / gist:4f583740f93465fbd2bc
Created November 3, 2014 10:14
Ruby is a beautiful language
return (1<<31) - (name.downcase.each_byte.each_with_index.to_a.inject(0.0) {|s,(v,i)| s+=(v.to_f/[((2**8)*i), 1.0].max);s} * (2**23)).to_i
#!/usr/bin/env ruby
$debug = false
require 'yaml'
CONFIG_FILENAME = ".git-wtf"
begin
require 'rubygems'
require 'term/ansicolor'

Keybase proof

I hereby claim:

  • I am astropanic on github.
  • I am astropanic (https://keybase.io/astropanic) on keybase.
  • I have a public key ASALn0AmyftU0jyEIviHRBE9txPGIjyWBNA5QPZ9vqpWyQo

To claim this, I am signing this object: