Some exercises from the Falsy Values workshops.
The good parts:
- HTTP server and client in same script
- Express cookies example
- Express routing example
- Express error handling
- Express middlewares example
- Simple HTTP proxy
/* | |
The code for the bookmarklet: | |
You create bookmarklets with a href javascript: links. | |
If you don't know how to do this, simply copy/paste one you might already have in your toolbar and | |
then edit the url properies with this long line below: | |
*/ | |
javascript:(function(){var%20included%20=%20false,openbar%20=%20false,src%20=%20"http://YOUR_DOMAIN/YOUR_SCRIPT.JS";var%20isIncluded%20=%20(function(){var%20scripts%20=%20document.getElementsByTagName('script');for(var%20i=0;i<scripts.length;i++){if(scripts[i].src%20==%20src){bar_toggle();%20return%20true;}}return%20false;})();if(isIncluded){%20%20}else{if(included){return%20false;}included%20=%20true;var%20head%20=%20document.getElementsByTagName("head")[0]%20||%20document.documentElement,script%20=%20document.createElement("script");script.type%20=%20"text/javascript";script.async%20=%20true;script.src%20=%20src;head.insertBefore(%20script,%20head.firstChild%20);}})(); |
Some exercises from the Falsy Values workshops.
The good parts:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
// ==UserScript== | |
// @name UTM param stripper | |
// @author Paul Irish | |
// @namespace http://github.com/paulirish | |
// @version 1.1 | |
// @description Drop the UTM params from a URL when the page loads. | |
// @extra Cuz you know they're all ugly n shit. | |
// @include http://* | |
// ==/UserScript== |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
// A simple JavaScript app that runs on Tropo. | |
var letters = 'abcdefghijklmnopqrstuvwxyz'; | |
var letterArray = letters.split(''); | |
var start = new Date(); | |
say('Hello, and welcome to Tropo.'); | |
for(var i = 0; i < letterArray.length; i++) { | |
say(letterArray[i] + '.'); |
.mouse, #preview{ | |
position: absolute; | |
background-repeat: no-repeat; | |
height: 22px; | |
min-width: 15px; | |
z-index: 100; | |
} | |
.mouse{ | |
background-image: url('../images/cursor.png'); |
var r1 = 0; | |
var ycenter = 0; | |
var xcenter = 0; | |
var cameraX = 0; | |
var cameraY = 0; | |
var cameraZ = 0; | |
var cop = 500; | |
var pta = []; | |
var quats = []; | |
var points = []; |
function define(name, fn) { | |
if (!defs) { defs = {}; } | |
defs[name] = fn; | |
} | |
function require(name) { | |
console.log("Loading " + name); | |
if (modules && modules.hasOwnProperty(name)) return modules[name]; | |
if (defs && defs.hasOwnProperty(name)) { | |
if (!modules) { modules = {}; } | |
var fn = defs[name]; |