Skip to content

Instantly share code, notes, and snippets.

@biinari
biinari / postgres_queries_and_commands.sql
Last active October 22, 2019 12:10 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (>= 9.2, < 9.6)
SELECT pid,
age(clock_timestamp(), query_start) AS age,
usename, state, query, waiting,
age(clock_timestamp(), xact_start) AS xact_age
FROM pg_stat_activity
WHERE state != 'idle'
AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY age DESC;
@biinari
biinari / test-kitchen-chef-shell.sh
Last active April 15, 2016 11:39 — forked from mattjbarlow/gist:242b66cdae6938d34419
Chef Shell in Test Kitchen (assuming using chef_solo provisioner)
#!/bin/sh
set -e # fail on errors
set -x # trace on
RUNLIST="$1" # eg 'recipe[example],role[something]'
cd /tmp/kitchen
[ -f client.pem ] || ssh-keygen -P '' -f client.pem
sudo /opt/chef/embedded/bin/gem install chef-zero -v '4.5.0' # last version to not enforce ruby version >= 2.1.0
diff --git ext/readline/extconf.rb ext/readline/extconf.rb
index 4920137..8e81253 100644
--- ext/readline/extconf.rb
+++ ext/readline/extconf.rb
@@ -19,6 +19,10 @@ def readline.have_func(func)
return super(func, headers)
end
+def readline.have_type(type)
+ return super(type, headers)
@biinari
biinari / rvm2rbenv.txt
Last active December 16, 2015 06:09 — forked from brentertz/rvm2rbenv.txt
Arch linux focussed rvm2rbenv instructions
## Prepare ###################################################################
# Remove RVM
rvm implode
# Update software for archlinux
yaourt -Syau
## Install ###################################################################
yaourt -S rbenv