Skip to content

Instantly share code, notes, and snippets.

@joshwines
joshwines / unicorn_kill9r.sh
Created May 1, 2018 01:33
Kill all unicorn threads
ps aux | grep -ie '[u]nicorn' | awk '{print $2}' | xargs kill -9
# or with sudo
ps aux | grep -ie '[u]nicorn' | awk '{print $2}' | xargs sudo kill -9
@joshwines
joshwines / keybase.md
Last active June 3, 2019 00:36
keybase.md

Keybase proof

I hereby claim:

  • I am joshwines on github.
  • I am joshwines (https://keybase.io/joshwines) on keybase.
  • I have a public key ASCZWI4MeWNa-xzyNnPtiY-u92QGN20_OXWjeRzaAMNH2wo

To claim this, I am signing this object:

@joshwines
joshwines / postgres_queries_and_commands.sql
Created June 6, 2017 06:18 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'