This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat ~/.ssh/id_rsa.pub | ssh -i user@servername.com 'cat >> .ssh/authorized_keys' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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."*"; |
NewerOlder