Skip to content

Instantly share code, notes, and snippets.

View todb-r7's full-sized avatar

Tod Beardsley todb-r7

View GitHub Profile
mike@rbci:~$ psql -U postgres
psql (9.0.3)
Type "help" for help.
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';
UPDATE 1
postgres=# \c template0
You are now connected to database "template0".
template0=# update pg_database set datistemplate = FALSE where datname = 'template1';
UPDATE 1
@todb-r7
todb-r7 / pre-commit
Last active December 10, 2015 10:39 — forked from anonymous/pre-commit
#!/usr/bin/env ruby
# Check that modules actually pass msftidy checks first.
# To install this script, copy it to ".git/hooks/pre-commit" and
# make it executable
valid = true # Presume validity
files_to_check = []
results = %x[git diff --cached --name-only]