Skip to content

Instantly share code, notes, and snippets.

View timgws's full-sized avatar
🎉
Winning!

Tim Groeneveld timgws

🎉
Winning!
View GitHub Profile
var myObj = {
fred: { apples: 2, oranges: 4, bananas: 7, melons: 0 },
mary: { apples: 0, oranges: 10, bananas: 0, melons: 0 },
sarah: { apples: 0, oranges: 0, bananas: 0, melons: 5 }
}
var countMe = {}
var obj = 0;
var key;
var a = myObj;
@timgws
timgws / keybase.md
Created November 16, 2015 00:44
keybase.md

Keybase proof

I hereby claim:

  • I am timgws on github.
  • I am timgws (https://keybase.io/timgws) on keybase.
  • I have a public key whose fingerprint is 4500 CA57 75BF E97B CCD7 D5E8 5300 2EDF B48E 70D5

To claim this, I am signing this object:

@timgws
timgws / README.md
Last active January 27, 2016 04:40
Getting Top 20 Books from Amazon as JSON for test data

Sometimes, I just want to generate a bunch of test data.

fzaninotto/Faker is awesome for generating fake data, but when you want something that is more real, such as book titles, how do you do it? I use my two favourite tools: Amazon... and Google Chrome :)

1: Go to http://www.amazon.com/best-sellers-books-Amazon/zgbs/books

2: Run the following inside the Google Chrome Developer Console:

books = [];
@timgws
timgws / keybase.md
Created December 12, 2017 00:28
keybase.md

Keybase proof

I hereby claim:

  • I am timgws on github.
  • I am timgws (https://keybase.io/timgws) on keybase.
  • I have a public key ASBYo4uzYM2uojLjpo5OjBYlbVCcriA5pc1w9VeeEfo6Swo

To claim this, I am signing this object:

@timgws
timgws / install-sleepwatcher-bluetooth-fix.sh
Last active November 1, 2018 17:44
Install sleepwatcher to restart bluetooth & friends
#!/bin/sh
brew install sleepwatcher
# https://gist.github.com/jagtesh/de81fa1c6b45fad0ff8e
sudo cp /usr/local/Cellar/sleepwatcher/2.2/de.bernhard-baehr.sleepwatcher-20compatibility.plist /Library/LaunchAgents/
sudo cp /usr/local/Cellar/sleepwatcher/2.2/etc/sleepwatcher/rc.* /etc/
# Add bluetooth script to /etc/rc.wakeup (the script requires root)
sudo tee -a /etc/rc.wakeup <<EOF