Skip to content

Instantly share code, notes, and snippets.

View EstebanMDQ's full-sized avatar

Esteban Soler EstebanMDQ

View GitHub Profile
@EstebanMDQ
EstebanMDQ / run-test-build-and-deploy.sh
Created March 31, 2016 20:12
run gulp build in codeship and deploy that to heroku
gulp test
gulp build
git config --global user.email "you@email.com"
git config --global user.name "Your Name"
git add build
git commit -am "app built"
export CI_COMMIT_ID=$(git rev-parse HEAD)
git config --global diff.tool opendiff
git config --global difftool.opendiff.cmd 'opendiff "$LOCAL" "$REMOTE"'
git config --global merge.tool opendiff
git config --global mergetool.opendiff.cmd 'opendiff -merge "$MERGED" "$LOCAL" "$REMOTE"'
git config --global mergetool.opendiff.trustExitCode false
@EstebanMDQ
EstebanMDQ / gist:6388d76704fc7df81b73
Created September 23, 2014 22:19
DS1307 ejemplo
// Date and time functions using a DS1307 RTC connected via I2C and Wire lib
#include <Wire.h>
#include "RTClib.h"
RTC_DS1307 rtc;
void setup () {
Serial.begin(57600);
#ifdef AVR
float temp;
float target_temp = 21.0;
const int tempPin = A0; // the analog pin used to read temp
const int ledPin = 3; // the number of the LED pin
/*
LM 35
5v --|\
A0 --| |
@EstebanMDQ
EstebanMDQ / git prompt
Created April 11, 2011 21:14
this snippet must be added to your .bashrc in order to allow your prompt show the branch you are using
export PS1='\[\033[00;30m\]\u \[\033[00;34m\]\w\[\033[00m\]\[\033[00;31m\]`git branch 2>/dev/null|cut -f2 -d\* -s` \[\033[00m\]\$ '