Skip to content

Instantly share code, notes, and snippets.

/*
sample to try control led from open hab
*/
// constants won't change. They're used here to
// set pin numbers:
const int switchPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
@maxistar
maxistar / gist:4646d1d4c8d44de5d98f
Created October 17, 2014 11:27
copy public key to server
cat ~/.ssh/id_rsa.pub | ssh -i user@servername.com 'cat >> .ssh/authorized_keys'
@maxistar
maxistar / gist:04f9e0311b51ca4dcf78
Created August 23, 2014 04:04
Installing Oracle Java
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
@maxistar
maxistar / gist:1196ac119bf8d1615f01
Created May 15, 2014 06:22
Simple class to get the idea where is the bottlenecks on the code
class Microtimer {
static $start;
static $count = 0;
static $activated = false;
static function init(){
self::$start = microtime(true);
}
static function show($label=''){
$stop = microtime(true);
print "*".(self::$count++).":".($stop-self::$start).":".$label."*";