Skip to content

Instantly share code, notes, and snippets.

View DanielCoulbourne's full-sized avatar

Daniel Coulbourne DanielCoulbourne

View GitHub Profile
@DanielCoulbourne
DanielCoulbourne / Resource.js
Created June 16, 2017 20:04
ES6 Resource Client
/***
*
* EXAMPLE USAGE
*
* Resource.index('users')
* Resource.store('users', { email: 'daniel@tighten.co' })
* Resource.show('users', 1)
* Resource.update('users', { id: 1, email: 'daniel.coulbourne@gmail.com' })
* Resource.destroy('users', 1)
*
@DanielCoulbourne
DanielCoulbourne / gitwords.sh
Created March 24, 2017 20:00
Count the number of usages of a given first word in your git commits.
#!/bin/bash
email="$email"
echo "Most used first words in this repo:";
echo $(git log --format=%s --author=$email | cut -d' ' -f1) | tr ' ' '\n' | sort | uniq -c | sort -r