Skip to content

Instantly share code, notes, and snippets.

View logicaroma's full-sized avatar

Ramin Mohammadi logicaroma

View GitHub Profile
byte lineEnding = 0x0A;
//Data array that the received info from android app is recorded. Every byte corresponds to a digital pin.
byte readBuffer[15]; //For example readBuffer[5] is for digital pin 5.
byte defaultByte = 0x10; //On start all arduino digital pins must be input for electrical protection.
//Pins 0 and 1 are used for serial comminations. So read
void setup() {
for (int i=0; i < sizeof(readBuffer)-1 ; ++i) {
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
/**
* Example of using an angular provider to build an api service.
* @author Jeremy Elbourn ([email protected])
*/
/** Namespace for the application. */
var app = {};
/******************************************************************************/
@logicaroma
logicaroma / Common.SSH.Commands.md
Created May 29, 2014 22:59 — forked from wbs75/Common.SSH.Commands.md
Common SSH Commands - Linux Shell Commands

Navigating in UNIX

pwd	Shows the full path of the current directory
ls	Lists all the files in the current directory
ls -al	Lists all files and information
ls –alR	Lists all files and information in all subdirectories
ls -alR | more	Same as ls –alR, pausing when screen becomes full
ls -alR > filename.txt	Same as ls –alR, outputs the results to a file
ls *.html	Lists all files ending with .html

cd [directory name] Changes to a new directory

@logicaroma
logicaroma / day12:-animation.markdown
Created May 29, 2014 16:13
A Pen by Kenji Saito.
@logicaroma
logicaroma / Button-Group.markdown
Created May 29, 2014 16:07
A Pen by Geoff Yuen.
@logicaroma
logicaroma / Month-Picker.markdown
Last active November 27, 2017 18:52
By [CSSFlow](http://www.cssflow.com): free UI elements and widgets coded with HTML5, CSS3, and Sass. View the original article and download the Sass source at: [cssflow.com/snippets/month-picker](http://www.cssflow.com/snippets/month-picker)

Month Picker

By CSSFlow: free UI elements and widgets coded with HTML5, CSS3, and Sass.

View the original article and download the Sass source at:
cssflow.com/snippets/month-picker

Original PSD by Liam McCabe.

Tested in Firefox 4, Safari 4, Chrome 14, Opera 10, IE 9 (and newer).

/*
* This decorates Handlebars.js with the ability to load
* templates from an external source, with light caching.
*
* To render a template, pass a closure that will receive the
* template as a function parameter, eg,
* T.render('templateName', function(t) {
* $('#somediv').html( t() );
* });
* Source: https://github.com/wycats/handlebars.js/issues/82
function autocomplete(text, div, callback){
var results = [], selected = null;
text.addEventListener('focus', function(){
if(results.length) div.style.display = '';
}, true);
text.addEventListener('input', function(){
div.innerHTML = '';
results = callback(text.value).map(function(text){
var result = document.createElement('div');
result.className = 'item';