Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am erithmetic on github.
* I am erithmetic (https://keybase.io/erithmetic) on keybase.
* I have a public key ASAPTfgVHzVEcYA5oFJR6zz7E5UOnW6HZQ1rueEL2wuzaQo
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am erithmetic on github.
  • I am dkastner (https://keybase.io/dkastner) on keybase.
  • I have a public key ASDaFEZkAeG7sfRYHLEG25e1Wf0_EzxRb9IHKMuA3icDpwo

To claim this, I am signing this object:

https://blog.testlodge.com/wp-content/uploads/2016/02/seo_cheat_sheet.png
https://d2eeipcrcdle6.cloudfront.net/seo-cheat-sheet.pdf
http://www.rickeliason.com/cheat-sheets/seo-cheat-sheet/
package main
import (
"bufio"
"encoding/json"
"log"
"os"
)
type requestDetails struct {
[root@00-22-4d-81-93-4d ~]# imgadm list
UUID NAME VERSION OS PUBLISHED
da144ada-a558-11e2-8762-538b60994628 ubuntu-12.04 2.4.1 linux 2013-04-15T20:18:53Z
f669428c-a939-11e2-a485-b790efc0f0c1 base 13.1.0 smartos 2013-04-26T15:16:02Z
class Article < ActiveRecord::Base
has_many :authorships
has_many :authors, through: :authorships
def total_kudos
authors.sum(&:kudos)
end
end
# OK

Keybase proof

I hereby claim:

  • I am dkastner on github.
  • I am dkastner (https://keybase.io/dkastner) on keybase.
  • I have a public key whose fingerprint is C94E E936 BB6C 27A1 06EF CEC8 7CA7 AA38 47D8 F82E

To claim this, I am signing this object:

@erithmetic
erithmetic / autounit
Created January 27, 2010 15:45
autotest for PHPUnit
# Prereqs:
# * Ruby
# * gem install watchr
# Usage:
# copy autounit to php project directory
# run watchr autounit
watch('test/.*Test\.php') do |md|
puts "\e[H\e[2J" #clear console
@erithmetic
erithmetic / content_dependent.rb
Created November 14, 2012 15:11
Code for EU Cuke post
click 'add Widget'
page.should have_content('widget added')
# hotness = age_in_minutes / (votes**2.5)
def original_hotness(now, created_at, votes)
age_in_minutes = (((created_at.to_f / 60).floor * 60) - ((now.to_f / 60).floor * 60)) / -60
age_in_minutes / (votes**2.5)
end
def new_hotness(now, created_at, votes)