Skip to content

Instantly share code, notes, and snippets.

require 'active_support/all'
class A < HashWithIndifferentAccess
end
class B < HashWithIndifferentAccess
def initialize(*args)
super
freeze
end
@stp-che
stp-che / backup.sh
Last active October 2, 2015 19:58
Simple backup automation
#!/bin/sh
d=`date +%Y%m%d`
path=/home/keeper/backup
pg_dump -U postgres -d my_database -n my_schema -f $path"dump"$d -O
zip -jq $path"dump"$d".zip" $path"dump"$d