Last active
March 26, 2020 14:43
-
-
Save davidmyersdev/5b2f3c2dff362d704d06f64489480e4c to your computer and use it in GitHub Desktop.
Random code snippets
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
# generate a Rails migration timestamp | |
Time.now.strftime('%Y%m%d%H%M%S') |
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
# schedule automatic postgres backups in heroku | |
heroku pg:backups:schedule DATABASE_URL --at '02:00 America/New_York' --app <app> | |
# repeat a command n times | |
for i in {1..5}; do echo 'hello'; done | |
# generate a human readable timestamp | |
date -r `date +%s` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment