Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)
$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
| After automatically updating Postgres to 9.6.1 via Homebrew, the pg_ctl start command didn't work. | |
| The error was something like "database files are incompatible with server". | |
| Database files have to be updated before starting the server, here are the steps that had to be followed: | |
| # need to have both 9.6.1 and latest 9.5.x installed, and keep 9.6.1 as default | |
| brew unlink postgresql | |
| brew install postgresql95 | |
| brew unlink postgresql95 | |
| brew link postgresql |
| #!/bin/bash | |
| TABLE_NAME=$1 | |
| # Get id list | |
| aws dynamodb scan --table-name $TABLE_NAME | grep ID | awk '{ print $2 }' > /tmp/truncate.list | |
| # Delete from id list | |
| cat /tmp/truncate.list | xargs -IID aws dynamodb delete-item --table-name $TABLE_NAME --key '{ "id": { "S": "ID" }}' |