This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This pre-commit hook will prevent you from committing any line (or filename) containing | |
# the string NOCOMMIT. Use that tag in comments around source code you want to avoid | |
# accidentally committing, like temporary IP addresses or debug printfs. | |
# | |
# To add it to an existing repository, save it to .git/hooks/pre-commit (or append, if | |
# that file already exists). Remember to make executable (chmod +x ...) | |
# | |
# To automatically add this pre-commit hook to every repository you create or clone: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# Downloads "Payment Received" transactions from the EasyPayMetrocard | |
# website (www.easypaymetrocard.com"). | |
# | |
# Requires capybara and capybara-webkit for headless JavaScript execution - | |
# the EasyPayMetroCard site requires JavaScript to obtain account activity. | |
# | |
# To install capybara-webkit, you must first install Qt, a cross-platform | |
# development kit. For instructions, see |