Skip to content

Instantly share code, notes, and snippets.

View sophiedeziel's full-sized avatar
🐰
Je code avec Glitch le lapin

Sophie Déziel sophiedeziel

🐰
Je code avec Glitch le lapin
View GitHub Profile
//#include "U8glib.h"
//
//U8GLIB_SSD1306_128X64 display(U8G_I2C_OPT_FAST);
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Wire.h>
Adafruit_SSD1306 display(-1);
@sophiedeziel
sophiedeziel / .zshrc
Created September 15, 2016 14:55
Only run Rubocop on files changed in a branch
alias rdm="git diff master --name-only --diff-filter=ACMR | grep '.rb' | ag -v 'schema' | xargs rubocop"
@sophiedeziel
sophiedeziel / .zshrc
Created September 15, 2016 14:51
See how many commits the local branch is ahead of a remote repository (useful to deploy to heroku)
aheadof() {
default_remote='production'
remote=${1-$default_remote}
branch="$(current_branch_name)"
fetch="$(git fetch $remote)"
ahead="$(git rev-list $remote/$branch..$branch --count)"