Skip to content

Instantly share code, notes, and snippets.

Avatar

Steve Hoeksema steveh

View GitHub Profile
View shapes.py
class Shape:
def area(self):
raise NotImplementedError
def perimeter(self):
raise NotImplementedError
class Rectangle(Shape):
def __init__(self, side1, side2):
View keybase.md

Keybase proof

I hereby claim:

  • I am steveh on github.
  • I am steveh7 (https://keybase.io/steveh7) on keybase.
  • I have a public key whose fingerprint is 3ADA 37FE E349 122E 2E34 221F AB6B 83FF A8E4 F047

To claim this, I am signing this object:

View string_boolean.rb
class StringBoolean
class << self
TRUE = "1".freeze
FALSE = "0".freeze
TRUTHY = ["1", "t", "y", "true", "yes"].freeze
FALSEY = ["0", "f", "n", "false", "no", ""].freeze
def true
TRUE
View http_redirect.tf
variable "source_domain" {}
variable "destination_domain" {}
variable "certificate_arn" {}
variable "protocol" {
default = "https"
}
View postgresql-diesel-rust-types.md
PostgreSQL Type PostgreSQL Size Description Range Diesel Type Rust Type
Nullable Types nullable Nullable``
View keybase.md

Keybase proof

I hereby claim:

  • I am steveh on github.
  • I am steveh7 (https://keybase.io/steveh7) on keybase.
  • I have a public key ASA4hXRsUZicLxQXK0uC4mH38gp4to8CEtA7iYJ4MAF2qQo

To claim this, I am signing this object:

View update.sh
#!/bin/bash
# Installation: save to /usr/local/bin/update
# and chmod +x /usr/local/bin/update
# Usage: update
set -euo pipefail
if [ -d ".git" ]; then
@steveh
steveh / crontab.sh
Created Jul 13, 2017
PRS price to Influxdb
View crontab.sh
* * * * * /home/steve/power/price | /home/steve/power/write
View rate_limiter.rb
# before
invoiced = Invoiced::Client.new("{API_KEY}")
# after
RateLimiter = Struct.new(:really) do
def method_missing(method, *args)
if can_do_the_thing?
View elasticsearch@1.7.rb
# /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/elasticsearch@1.7.rb
class ElasticsearchAT17 < Formula
desc "Distributed search & analytics engine"
homepage "https://www.elastic.co/products/elasticsearch"
url "https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.6.tar.gz"
sha256 "78affc30353730ec245dad1f17de242a4ad12cf808eaa87dd878e1ca10ed77df"
revision 1
bottle :unneeded