Skip to content

Instantly share code, notes, and snippets.

Scribbling and bibbling

Jason Petersen jasonmp85

Scribbling and bibbling
View GitHub Profile
jasonmp85 / update-docker-docs
Last active Mar 22, 2020 — forked from ninrod/
Install Docker man pages for your Docker version
View update-docker-docs
# make bash behave
set -euo pipefail
# adapted from:
# create tmpdir and register cleanup callback
tmpdir=$(mktemp -d ~/.docker-man.XXXXXXXX)
jasonmp85 / chpg.rb
Last active Mar 15, 2019
chruby for PostgreSQL
View chpg.rb
require "formula"
class Chpg < Formula
desc "PostgreSQL environment tool"
homepage ""
url ""
sha256 "4a3d5165364e3f8289613dfe37d8e2a7615116b8a09c6a940c3207fe30e30d76"
version "0.1.1"
depends_on "petere/postgresql/postgresql-common"
View ref-explain-params.sql
CREATE TABLE dist (id integer);
CREATE TABLE ref (id integer);
SELECT create_distributed_table('dist', 'id');
SELECT create_reference_table('ref');
RETURNS void LANGUAGE plpgsql AS $$
jasonmp85 / demo.cpp
Last active Sep 20, 2017
include-what-you-use 0.8 Repro Case
View demo.cpp
#include "demo.hpp"
int main(void)
{ printf("hello world"); }
jasonmp85 /
Last active May 24, 2017
Release Checklist

These instructions assume you have $VERSION, $PROJECT, and $REPO environment variables set in your shell (e.g. 6.1.1, citus, and citus). With those set, code from most steps can be copy-pasted.

After this checklist, you're still not done: open a release checklist in Enterprise and release there, too!

Prepare Project

  • Ensure all needed changes are in the relevant release-x.y branch. git log --cherry-pick --no-merges release-x.y...master can be helpful. Be sure to cherry-pick changes in the same order they were merged to the main branch (but do not cherry-pick merge commits themselves)
  • Add a CHANGELOG entry in the master branch summarizing meaningful changes
  • Use git cherry-pick to add the new CHANGELOG entry to the release-x.y branch
  • Use git tag -a -s v$VERSION to create an annotated, signed tag for the release. Summarize the release in the one-line tag annotation (beneath 52 characters). Push the tag with git push origin v$VERSION
jasonmp85 / bill_getter.rb
Created Apr 9, 2011
Quick-and-dirty script to fetch the latest bill from AT&T as a PDF.
View bill_getter.rb
#!/usr/bin/env ruby
# encoding: UTF-8
require 'optparse'
require 'ostruct'
require 'mechanize'
options =
parser = do |p|
jasonmp85 /
Last active Dec 24, 2015
PostgreSQL Travis Tools
set -eux
# Create Ubuntu's PostgreSQL socket dir and relax permissions.
sudo mkdir -p /var/run/postgresql
sudo chown -R `whoami` /var/run/postgresql
jasonmp85 / thingy.js
Created Jul 5, 2012
Test bookmarklet
View thingy.js
* jQuery JavaScript Library v1.7.2
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* Includes Sizzle.js
jasonmp85 / sum_hours.js
Created Apr 13, 2012 — forked from cayblood/ hour script
Display Scrumy Hours in Lanes
View sum_hours.js
// use this in a bookmarklet to make a button for this script:
// javascript:document.getElementsByTagName('head')[0].appendChild(document.createElement('script')).setAttribute('src','')
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return
jasonmp85 / scrumy_hours.js
Created Apr 5, 2012
Calculate Sprint Hours in Scrumy
View scrumy_hours.js
// copy the following to a bookmark URL to use as a bookmarklet
// replace PROJECT_NAME and PASSWORD as appropriate
// javascript:window.scrumyProjectName="PROJECT_NAME",window.scrumyPassword="PASSWORD";document.getElementsByTagName('head')[0].appendChild(document.createElement('script')).setAttribute('src','')
Scrumy API JavaScript Client v0.5.0
Released under the MIT License
((function(){})).call(this),function(){function A(a,b,c){if(a===b)return a!==0||1/a==1/b;if(a==null||b==null)return a===b;a._chain&&(a=a._wrapped),b._chain&&(b=b._wrapped);if(a.isEqual&&w.isFunction(a.isEqual))return a.isEqual(b);if(b.isEqual&&w.isFunction(b.isEqual))return b.isEqual(a);var;if(d!!1;switch(d){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:a==0?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&
You can’t perform that action at this time.