Skip to content

Instantly share code, notes, and snippets.

-- create table for bad db names
create table things(database_name text);
-- insert some junk into it
insert into things values ('db1'),('db2'),('db3');
-- create the dropper proc
--call database_deleter();
CREATE OR REPLACE PROCEDURE database_deleter()
### Keybase proof
I hereby claim:
* I am datachomp on github.
* I am datachomp (https://keybase.io/datachomp) on keybase.
* I have a public key ASCoyDr-XEmQhc-9F3KvqX10RSxrw7ei7QonREC0rNQdfgo
To claim this, I am signing this object:
@datachomp
datachomp / quick_queries.sql
Created October 3, 2016 02:46
quick queries to transfer
select count(state) as count, state
FROM (SELECT CASE
WHEN state='idle' THEN 'idle'
WHEN state='idle in transaction' THEN 'idle_in_txn'
WHEN state='active' THEN 'active'
ELSE 'unknown' END AS state
FROM pg_stat_activity) state
GROUP BY state
UNION
SELECT COUNT(*) as count, 'waiting' as state
@datachomp
datachomp / gist:2d73c121ee315b2110b9
Created November 11, 2015 17:59
Minimum Viable User Group.md
step 1 - discovery of people in your area interested in the technology
step 2 - just pick a time to meet on hangouts or something. There are never perfect times... just pick something and go
step 3 - Lay out a plan/topics for 4 months. Try to get commitments from people in the field to hop on for 10-15 minutes to talk about what they are working on.
step 4 - start meeting
As a User Group organizer, this will also give you a bit of an idea of what you're signing up for.
@datachomp
datachomp / gist:5823475
Last active December 18, 2015 18:09
This is a rough agenda for tonights nerd beers
OKC Nerd Beers - 6/20/2013 Nerdgenda
5:00-8:00 at the Bricktown Tapwerks
Should I virtualize my database?
Suggested Beer - Dead Armadillo Brew
How are you deploying?
Suggested Beer - Green Flash West Coast IPA
How are you hosting your blog?