Skip to content

Instantly share code, notes, and snippets.

View CameronBanga's full-sized avatar
🏕️
I'd rather be camping!

Cameron Banga CameronBanga

🏕️
I'd rather be camping!
View GitHub Profile

Keybase proof

I hereby claim:

  • I am cameronbanga on github.
  • I am cameron (https://keybase.io/cameron) on keybase.
  • I have a public key whose fingerprint is 29BC A5FB 1E9B B796 1516 066F 99FF B7F3 B523 6BD8

To claim this, I am signing this object:

@CameronBanga
CameronBanga / papertrail_api_hit_numbers.sh
Last active October 7, 2015 19:44
Grep through Papertrail logs from Heroku to get quick stats on API hit success and failure rates.
#!/bin/bash
FILE="2015-MM-DD"
DIR="/Users/cmbang/path/to/file/"
APISTRING="unique_string_in_your_api"
echo "\`\`\`"
echo "Heroku API hit logs for "$FILE
echo ""
@CameronBanga
CameronBanga / api_log.sh
Created May 3, 2016 17:45
A quick and bad bash script to help Harry log an API.
#!/bin/bash
## date format to log the time of the pull##
NOW=$(date +"%Y-%m-%d %H:%M:%S")
## change this to wherever you want your log stored
echo ""API pull at "$NOW" >> ~/Documents/API.txt
## update your curl here, obviously use same file
curl -X "GET" "http://www.google.com" >> ~/Documents/API.txt
@CameronBanga
CameronBanga / android_screen.sh
Created May 12, 2016 16:14
Quickly take a screenshot of an Android phone plugged into your Mac/Linux box
#!/bin/bash
# need to install adb first, if you haven't
# brew install android-platform-tools
# then, save this script, chmod 750 it
# and easy get Android screens on your desktop
# note - this breaks when multiple Android devices
# are plugged into your computer
#!/bin/bash
TERM=xterm-color
# Set a Date
NOW=$(date +"%F")
# The name to give you at the top of your text file.
name="Cameron"
# The author email set in your global git config.
author=$(git config --global user.email)