Skip to content

Instantly share code, notes, and snippets.

Matt Freer mattfreer

  • Birmingham, UK
Block or report user

Report or block mattfreer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View db_terminate_backend.rake
# http://stackoverflow.com/questions/5108876/kill-a-postgresql-session-connection
namespace :db do
desc "Fix 'database is being accessed by other users'"
task :terminate => :environment do
ActiveRecord::Base.connection.execute <<-SQL
SELECT
pg_terminate_backend(pid)
FROM
pg_stat_activity
WHERE
View docker-ssh-forward.bash
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK):$(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
You can’t perform that action at this time.