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
/* usage: node inbox.js -u username@server.com -p hunter2 */ | |
var Q = require('q'); | |
var minimist = require('minimist'); | |
var inbox = require('inbox'); | |
var Five = require("johnny-five"); | |
function handleError(err){ | |
console.error(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
/** | |
* Übung Adaptives Layout | |
*/ | |
* { box-sizing: border-box; } | |
body { padding: 0 1%; font-family: Arial, sans-serif; line-height: 1.6; } | |
nav ul { list-style: none; margin: 0; padding: 0; } | |
nav ul a { display: block; float: left; width:12.5%; font-weight: bold; } | |
#main, footer { clear: both; padding: 1em 0; } | |
footer { border-top: 1px solid #999; } | |
#main > section { float: left; width: 65%; } |
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
/** | |
* Lösung Adaptives Layout | |
*/ | |
* { box-sizing: border-box; } | |
body { padding: 0 1%; font-family: Arial, sans-serif; line-height: 1.6; } | |
nav ul { list-style: none; margin: 0; padding: 0; } | |
nav ul a { display: block; float: left; width:12.5%; font-weight: bold; } | |
#main, footer { clear: both; padding: 1em 0; } | |
footer { border-top: 1px solid #999; } | |
#main > section { float: left; width: 65%; } |
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
// Benötigt PhantomJS. Benutzung: $ phantomjs grab.js | |
var page = require('webpage').create(); | |
page.viewportSize = { | |
width: 10000, // A0: 9933 | |
height: 15000 // A0: 14043 | |
}; | |
page.open('http://localhost/~peter/map/map.html', function(){ | |
setTimeout(function(){ |
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.prototype.curry = function(){ | |
if(arguments.length < 1) return this; | |
var args = Array.prototype.slice.call(arguments), | |
method = this; | |
return function(){ | |
return method.apply(this, args.concat(Array.prototype.slice.call(arguments))); | |
} | |
} |
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
<component lightWeight="true"> | |
<attach event="onpropertychange" onevent="checkPropertyChange()" /> | |
<attach event="ondetach" onevent="restore()" /> | |
<attach event="onresize" for="window" onevent="restore();init()" /> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
var viewportwidth = (typeof window.innerWidth != 'undefined' ? window.innerWidth : element.document.documentElement.clientWidth); | |
// Shortcut for the document object | |
var doc = element.document; |
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
// Kommentare | |
#KommentareListe | |
list-style none | |
counter-reset kommentare | |
&:not(:empty) | |
border-bottom 1px dotted $border | |
.comment | |
clear both | |
border-top 1px dotted $border | |
&:first-child |
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 stylus = require('stylus'), | |
connect = require('connect'), | |
nib = require('nib'); | |
var basepath = '/..'; | |
var compile = function(str, path){ | |
return stylus(str) | |
.set('filename', path) | |
.set('warn', true) |
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
// Quelle: http://www.quirksmode.org/js/findpos.html | |
function findPos(obj){ | |
var curleft = 0, curtop = 0; | |
if(obj.offsetParent){ | |
do { | |
curleft += obj.offsetLeft; | |
curtop += obj.offsetTop; | |
} while(obj = obj.offsetParent); | |
} | |
return [curleft, curtop]; |
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
# Git-Branch im Terminal anzeigen und den Lambda-Hacker raushängen lassen | |
underline=`tput smul` | |
nounderline=`tput rmul` | |
bold=`tput bold` | |
normal=`tput sgr0` | |
GIT_PS1_SHOWDIRTYSTATE=1 | |
PS1='${bold}λ ${normal}\w$(__git_ps1 " [${underline}%s${nounderline}]") \$ ' |
OlderNewer