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
# Raspberry PI Version herausfinden: | |
cat /etc/issue | |
# -> Debian GNU/Linux 7 \n \l | |
oder: | |
cat /etc/*-release | |
# -> PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)" | |
# install node.js on raspberry pi (wheezy) |
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
package com.intesso.commons; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.util.Properties; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
/** | |
* Generic Application Properties class that reads the properties file from the |
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
var cheerio = require('cheerio'); | |
var multiline = require('multiline'); | |
var domify = require('domify'); | |
var tmpl = multiline(function() {/* | |
<body> | |
<header> | |
<hgroup> | |
<h1>Header in h1</h1> |
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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Rebuild to run it on the right | |
var level = require('level-browserify') | |
// 1) Create our database, supply location and options. | |
// This will create or open the underlying LevelDB store/Indexedb Database | |
var db = window.levelDB = level('./mydb') | |
// 2) put a key & value | |
db.put('name', 'Level', function (err) { |
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
// test | |
var els = document.querySelectorAll('[data-block]'); | |
// make blocks global for testing purposes | |
blocks = Array.prototype.slice.call(els); | |
var obj = blocks; | |
Object.keys(obj).forEach(function(key) { | |
console.log(key, obj[key], obj[key].classList); | |
}); |
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
var a = 1; | |
//undefined | |
function showA () { var a = 2; console.log(a);} | |
//undefined | |
a | |
//1 | |
showA() | |
//2 | |
a | |
//1 |
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
function echo(input) { console.log(input);} | |
undefined | |
echo('hallo') | |
VM304:2 hallo | |
undefined | |
// you can add an attribute to a function | |
echo.prop = 'echooo' | |
"echooo" | |
echo.prop | |
"echooo" |
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
# add `git check ` alias for git add ALL dry-run | |
git config --global alias.check '!git add -A -n' |
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
// turn function arguments into an array | |
var args = [].slice.apply(arguments) |
OlderNewer