Skip to content

Instantly share code, notes, and snippets.

View blackymetal's full-sized avatar

Ariel Patino blackymetal

View GitHub Profile
@blackymetal
blackymetal / cakephp atom link
Created July 27, 2013 23:10
CakePHP adding atom:link to channel using RSS Helper
@blackymetal
blackymetal / git diff one file different commit
Last active December 21, 2015 23:28
Git diff one file from two different commits
$ git diff $start_commit..$end_commit -- path/to/file
For instance, to see the difference for a file "main.c" between now and two commits back, here are two equivalent commands:
$ git diff HEAD^^ HEAD main.c
$ git diff HEAD^^..HEAD -- main.c
@blackymetal
blackymetal / serial port blink blink
Created September 23, 2013 19:18
Blink LED from serial
@blackymetal
blackymetal / shift_arduino
Last active December 23, 2015 23:09
Shift arduino
//**************************************************************//
// Name : shiftOutCode, Hello World
// Author : Carlyn Maw,Tom Igoe, David A. Mellis
// Date : 25 Oct, 2006
// Modified: 23 Mar 2010
// Version : 2.0
// Notes : Code for using a 74HC595 Shift Register //
// : to count from 0 to 255
//****************************************************************
@blackymetal
blackymetal / pov_arduino
Last active December 24, 2015 00:49
Persistence Of Vision Arduino, chip 595
//**************************************************************//
// Name : shiftOutCode, Hello World
// Author : Carlyn Maw,Tom Igoe, David A. Mellis
// Date : 25 Oct, 2006
// Modified: 26 Sep 2013
// Version : 2.0
// Notes : Code for using a 74HC595 Shift Register //
// : to show POV persistence of vision
// http://arduino.cc/en/Tutorial/ShiftOut
// using this sample code http://paulsarduino.co.uk/?page_id=50
@blackymetal
blackymetal / sync_remote_branch_local
Created October 30, 2013 17:33
Sync remote branches local
Sync remote branch that local git repo is not aware of yet:
git remote show origin
If the remote branch you want to checkout is under "New remote branches" and not "Tracked remote branches" then you need to fetch them first:
git remote update
git fetch
Now it should work:
@blackymetal
blackymetal / iron man arc animation
Created November 1, 2013 03:18
arduino iron man arc led animation
/*
Fade
This example shows how to fade an LED on pin 9
using the analogWrite() function.
This example code is in the public domain.
*/
int led = 9; // the pin that the LED is attached to
@blackymetal
blackymetal / Reindex litecoin DB
Last active January 1, 2016 05:19
Reindex litecoin
Reindexing Litecoin wallet when saying DB corruption, open terminal and enter
cd /Applications/Litecoin-Qt.app/Contents/MacOS
./Litecoin-Qt -reindex
It works..
@blackymetal
blackymetal / Generic_Arduino_Deek_Robot
Last active January 2, 2016 21:08
Setting Arduino pro mini generic version from Deek_Robot
Select on Arduino tools
Tools > Board > Arduino Pro or Pro mini
Tools > Processor > ATmega328 (5V, 16MHZ)
Tools > Programmer > AVR ISP
When uploading a sketch first press reset button on the arduino then select Upload, once 'Uploading...' text appears realease the button.
NFC RFID-RC522
*Ardunio Uno, Arduino Pro, Arduino Pro mini
@blackymetal
blackymetal / counting objects elements
Created January 18, 2014 16:02
How many properties/elements contains an object
Object.keys(data.data).length