Skip to content

Instantly share code, notes, and snippets.

Peter van Hardenberg pvh

Block or report user

Report or block pvh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am pvh on github.
  • I am pvh (https://keybase.io/pvh) on keybase.
  • I have a public key whose fingerprint is 0C58 D3A1 52EE 06E1 133B 6E0E 09F9 C3FC A774 E561

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am pvh on github.
  • I am pvh (https://keybase.io/pvh) on keybase.
  • I have a public key whose fingerprint is 1D89 D8E0 2432 9132 67E4 0A9F 920A 0456 2DFF C83D

To claim this, I am signing this object:

@pvh
pvh / gist:7992259
Created Dec 16, 2013
Node language member
View gist:7992259
The Node.JS language team is responsible for the success of Heroku developers building in Node. They are part of the broader “languages team”, a group of developers with similar language-specific responsibilities and shared infrastructure.
A language team is responsible for the success of their language on the platform, including varying degrees of
* building core language-specific features such as the “build pack”,
* working within the community to improve projects upstream to provide a better experience for Heroku users,
* implementing support for and document Heroku product improvements for that language's community,
* supporting existing and prospective customers through outreach and support,
* language-specific documentation and content, and
* marketing responsibilities such as attending and speaking at conferences.
View gist:6394061

The PHP language owner is responsible for the success of Heroku developers building in PHP. They are part of the broader “languages team”, a group of developers with similar language-specific responsibilities and shared infrastructure.

A language owner will be responsible for varying degrees of

  • building core language-specific features such as the “build pack”,
  • working within the community to improve projects upstream to provide a better experience for Heroku users,
  • customer outreach,
  • customer support,
  • sales support,
  • language-specific documentation and content, and
  • marketing responsibilities such as attending and speaking at conferences.
@pvh
pvh / gist:5060202
Last active Dec 14, 2015
ddddemo time
View gist:5060202
  • workflow

start by opening up PSQL

$ heroku pg:psql -a isis-db

what tables have we got?

\d

let's get a little more detail

\d+

@pvh
pvh / gist:4634543
Last active Dec 11, 2015
Postgres: The Bits You Haven't Found talk
View gist:4634543
A Beastiary of Badassery
-
SQLisms
--
WITH
arrays and unnest
window functions
JSON
row types
View gist:3151759
pvh$ bundle exec irb
irb(main):001:0> require 'sequel'
=> true
irb(main):002:0> DB = Sequel.connect("postgres:///")
=> #<Sequel::Postgres::Database: "postgres:///">
irb(main):003:0> DB.extension(:pg_array, :pg_row)
=> #<Sequel::Postgres::Database: "postgres:///">
irb(main):004:0> DB[:databases].select(Sequel::lit('(databases)')).all.first.values.first
=> "(foo,localhost:5432)"
irb(main):005:0>
View gist:2579956
module Shogun
module Once
class OnceRecord < Sequel::Model
Sequel.extension :pg_array
DB.extend Sequel::Postgres::PGArray::DatabaseMethods
unrestrict_primary_key
end
def self.ever(*arguments, &blk)
OnceRecord.create(signature: signature(arguments), arguments: arguments.pg_array)
View gist:1277329
require 'spec_helper'
describe Thing do
subject { Thing.new() }
describe "#rating" do
its(:amount) { should == 25 }
end
describe "winning" do
before { subject.win }
View gist:1163214
(ns states.core)
(def resource-transitions
{:create
[{:condition #(= (% :ec2-state "pending"))
:transition :booting},
{:condition #(> (* 10 60) (% :created_at050))
:transition :failed}]
You can’t perform that action at this time.