Skip to content

Instantly share code, notes, and snippets.


Ashley Felton ropable

View GitHub Profile
ropable /
Last active May 28, 2021 — forked from Tras2/
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Get the current external IP address
IP=$(curl -s -X GET
ropable /
Created Jan 22, 2020 — forked from willurd/
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
ropable / postgres_queries_and_commands.sql
Last active Mar 21, 2017 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
View postgres_queries_and_commands.sql
-- 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%'