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
def tip(msg); puts; puts msg; puts "-"*100; end | |
# | |
# 30 Ruby 1.9 Tips, Tricks & Features: | |
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
# | |
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
tip "Ruby 1.9 supports named captures in regular expressions!" |
if (typeof jQuery == 'undefined') { | |
var jQ = document.createElement('script'); | |
jQ.type = 'text/javascript'; | |
jQ.onload=loadDeps; | |
jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'; | |
document.body.appendChild(jQ); | |
} else { | |
loadDeps(); | |
} | |
function loadDeps() { |
javascript: (function () { | |
var n = null, | |
C = false; | |
function h(m) { | |
d(m, "jsgif_overlaid"); | |
m.removeEventListener("click", i, C) | |
} | |
function i(m) { | |
var o = this; |
javascript: (function () { | |
var n = null, | |
C = false; | |
function h(m) { | |
d(m, "jsgif_overlaid"); | |
m.removeEventListener("click", i, C) | |
} | |
function i(m) { | |
var o = this; |
<?php | |
/** | |
* Simple excel writer class with no external dependencies, drop it in and have fun | |
* @author Matt Nowack | |
* @license Unlicensed | |
* @version 1.0 | |
*/ | |
class Excel { | |
private $col; |
Some exercises from the Falsy Values workshops.
The good parts:
# app/assets/javascripts/application.js | |
//= require_tree . | |
# app/assets/javascripts/application.js.coffee | |
@application = | |
awesomeFunction: (params) -> | |
console.log(params) | |
# app/assets/javascripts/home.js.coffee | |
$ -> |
# load libraries | |
require 'coffee-script' | |
mongoose = require 'mongoose' | |
express = require 'express' | |
step = require "step" | |
# about oauth | |
OAuth = require('oauth').OAuth | |
oauth = new OAuth( | |
'https://api.twitter.com/oauth/request_token', |
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Mathieu 'p01' Henri http://www.p01.org/releases/ | |
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 |