Take a match block and add routes to a RouteRecognizer:
match("/posts").to("posts", function(match) {
match("/").to("postIndex")
match("/:id").to("showPost");
match("/edit").to("editPost");| module.exports = ms15(); | |
| function ms15() { | |
| var fs = require('fs') | |
| , n = 50; | |
| //fs.mkdirSync('./tmp'); | |
| for (var i = 0; i < n; i++) { | |
| fs.writeFileSync('./tmp/' + i + '.js', '// js!'); |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
| jsbin.settings.editor.theme = "monokai"; | |
| jsbin.settings.editor.indentUnit = 4; | |
| jsbin.settings.editor.smartIndent = true; | |
| jsbin.settings.editor.tabSize = 4; | |
| jsbin.settings.editor.indentWithTabs = true; | |
| jsbin.settings.editor.autoClearEmptyLines = true; | |
| jsbin.settings.editor.lineWrapping = true; | |
| jsbin.settings.editor.lineNumbers = true; | |
| jsbin.settings.editor.matchBrackets = true; |
| :;while [ $? -eq 0 ];do nc -vlp 8080 -c'(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b|sed 's/[^a-z0-9_.-]//gi'`;h="HTTP/1.0";o="$h 200 OK\r\n";c="Content";if [ -z $f ];then($e $o;ls|(while $r n;do if [ -f "$n" ]; then $e "<a href=\"/$n\">`ls -gh $n`</a><br>";fi;done););elif [ -f $f ];then $e "$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`";$e;cat $f;else $e -e "$h 404 Not Found\n\n404\n";fi)';done |
| <?php | |
| /** | |
| * @copyright 2012 TheHydroImpulse, Daniel Fagnan | |
| * @version 0.1 | |
| * @todo Add an overwite ability. Among other things. | |
| * @note Use this as you wish. Extend it, Mash it. Enjoy it. | |
| */ |
| passport = require 'passport' | |
| googOID = require('passport-google').Strategy | |
| steamOID = require('passport-steam').Strategy | |
| passport.use new steamOID | |
| returnURL: 'http://localhost:3000/auth/steam/return' | |
| , realm: 'http://localhost:3000' | |
| , () -> console.log arguments | |
| passport.use new googOID |
| ### INSTALLATION NOTES ### | |
| # 1. Install Homebrew (https://github.com/mxcl/homebrew) | |
| # 2. brew install zsh | |
| # 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh) | |
| # 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace | |
| # 5. Install iTerm2 | |
| # 6. In iTerm2 preferences for your profile set: | |
| # Character Encoding: Unicode (UTF-8) | |
| # Report Terminal Type: xterm-256color | |
| # 7. Put itunesartist and itunestrack into PATH |
| <?php | |
| /** | |
| * SplClassLoader implementation that implements the technical interoperability | |
| * standards for PHP 5.3 namespaces and class names. | |
| * | |
| * http://groups.google.com/group/php-standards/web/final-proposal | |
| * | |
| * // Example which loads classes for the Doctrine Common package in the | |
| * // Doctrine\Common namespace. |