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
# nodejs http server | |
```javascript | |
var http = require('http'); | |
var path = require('path'); | |
var url = require('url'); | |
var fs = require('fs'); | |
var port = 4020; | |
var extensions = { |
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
#!/usr/bin/env node | |
console.log('this is a growl test script to play with node and growl'); | |
if (process.argv[3]) { | |
// how to grab arguments from the command line | |
console.log('The arguments are: ', process.argv); | |
} else { | |
console.log('No arguments. Try running growlfun with some 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
#!/usr/bin/env node | |
var Qs = require('qs'), | |
params = 'params=goHere', | |
parse = Qs.parse(params); | |
console.log(parse); |
You can set up a server on a VPS somewhere, or run one on your own network on a VM.
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<body> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> | |
<tspan x="0" y="0em">I was promised cookies</tspan> | |
</label> | |
<actor t="translate(131,49)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-18,59|-6,79|-1,59"> |
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 velocity = function (el, header) { | |
var wWidth = $(window).width(), | |
spacing = $(header).height(), | |
offset = $(el).offset(); | |
// Create consistent velocity! | |
// Perfect velocity = 2550px per 3000milliseconds = .85 you know, since v = d/t | |
var current = window.pageYOffset; |
OlderNewer