Skip to content

Instantly share code, notes, and snippets.

View voodootikigod's full-sized avatar
🚀
Changing the world

Chris Williams voodootikigod

🚀
Changing the world
View GitHub Profile
#define SERIAL_BAUDRATE 9600
void setup(){
Serial.begin(SERIAL_BAUDRATE);
};
int inByte = 0;
void loop(){
Serial.print(inByte);
npm ERR! Requires: node@>= 0.4.x
npm ERR! You have: node@v0.4.8
The following guidelines apply to the "Node.js" word trademark, the "node[cloud]js" graphic trademark (the “Trademarks”).
...
Examples of things which are not nominative fair use and not permitted without a license:
• Use of a trademark in a domain name (e.g., nodeconsultingservices.com)
• Confusingly similar software product names.
• Software service offerings that are for anything other than official software, as
distributed from nodejs.org.
setTimeout(function () {
var m = new Image(); m.src="images/modal.gif";
var trail = $("#trail"),
wagon = $("<img src=\"images/wagon.gif\" alt=\"It's an 8-bit wagon, motherfucker.\" class=\"wagon\"/>").appendTo(trail);
function westward() {
var l = trail.width();
wagon.css({ left: l }).animate({ left: -150 }, 20000, westward);
}
westward("Ho!");
var SerialPort = require("serialport").SerialPort
var serialPort = new SerialPort("/dev/tty-usbserial1", {baudrate: 9600});
<html>
<body>
<script>
function f() { document.write(this); };
f() // outputs [object Window] => global object
</script>
</body>
</html>
<html>
<body>
<script>
var o = {};
o.p = function () { document.write(this); };
o.p();
// outputs [object Object] => o
</script>
</body>
</html>
<html>
<body>
<script>
"use strict";
function f() { document.write(this); };
f();
// outputs undefined
</script>
</body>
</html>
function sm () { console.log("foo") }
function PrototypalWithHoisting() {}
PrototypalWithHoisting.prototype = {
someMethod: sm
}
var prototypalWithHoisting = new PrototypalWithHoisting();
function PrototypalPattern() {}
PrototypalPattern.prototype = {
someMethod: function () {
console.log('foo');
}
}
var prototypalPattern = new PrototypalPattern();