This file contains hidden or 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/bash -xe | |
#THIS SCRIPT MUST BE RUN AS ROOT | |
ADMIN_USER=admin | |
ADMIN_GROUP=admin | |
#add admin group | |
(cat /etc/group | grep -E '\b$ADMIN_GROUP\b') || sudo groupadd $ADMIN_GROUP | |
#add admin user |
This file contains hidden or 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
SELECT nspname || '.' || relname AS "relation", | |
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
AND C.relkind <> 'i' | |
AND nspname !~ '^pg_toast' | |
ORDER BY pg_total_relation_size(C.oid) DESC | |
LIMIT 20; |
This file contains hidden or 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
git config --global color.ui true |
This file contains hidden or 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
# Commit your work locally and from the remote machine run | |
$ git pull dev@devmac-2:~/projects/atlas/atlas master |
This file contains hidden or 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
# Below is the strat on reverting multiple commits while rolling forward rather than winding back | |
$ git reset --hard f7a4ffb0291f5fab47dd539a47e04bbd659e138 | |
# Where the SHA is the known good version you want to be back at | |
$ git reset --soft @{1} | |
# Which brings you back to origin head with the changes off the past commits reversed | |
# eg | |
# [-console.log("Loosing")-]{+console.log("Winning")+} | |
# becomes | |
# [+console.log("Winning")+]{-console.log("Loosing")-} |
NewerOlder