Skip to content

Instantly share code, notes, and snippets.

View timchan-lumoslabs's full-sized avatar

Tim Chan timchan-lumoslabs

View GitHub Profile
@timchan-lumoslabs
timchan-lumoslabs / 0_reuse_code.js
Created November 21, 2016 19:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@timchan-lumoslabs
timchan-lumoslabs / truncate_dynamodb.sh
Last active June 23, 2016 00:55 — forked from k3karthic/truncate_dynamodb.sh
Truncate all keys in a dynamodb table
#!/bin/bash
TABLE_NAME=$1
# Get id list
aws dynamodb scan --table-name $TABLE_NAME --profile default | grep ID | awk '{ print $2 }' > ~/bin/truncate.list
# Delete from id list
cat ~/bin/truncate.list | xargs -IID aws dynamodb delete-item --table-name $TABLE_NAME --key '{ "id": { "S": "ID" }}'