This file contains hidden or 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 t = require('./t'); | |
| t.app(8888, { | |
| routes: { | |
| '^/$': function(req, res) { | |
| t.respond("something something"); | |
| }, | |
| '^/test/$': function() { | |
| } | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | /* | |
| Usage: | |
| $ node chat.js | |
| $ curl http://127.0.0.1:8124/say?one | |
| // say! | |
| $ curl http://127.0.0.1:8124/say?two | |
| // say! | |
| $ curl http://127.0.0.1:8124/ask | |
| // ["one", "two"] | |
| */ | 
  
    
      This file contains hidden or 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 sys = require('sys'); | |
| var createObject = function (obj) { | |
| function F () {}; | |
| F.prototype = obj; | |
| return new F; | |
| }; | |
| var button = (function () { | 
  
    
      This file contains hidden or 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 sys = require('sys'); | |
| var print = function print(list) { | |
| for (var i = 0; i < list.length; i++) { | |
| var item = list[i]; | |
| if (item.length) { | |
| print(item); | |
| } | |
| else { | |
| sys.puts(item); | 
  
    
      This file contains hidden or 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
    
  
  
    
  | git config --global color.diff always | 
  
    
      This file contains hidden or 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
    
  
  
    
  | for i in $(seq 1 10); do echo -n $(tput setaf ${i}) ${i}; done | 
  
    
      This file contains hidden or 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 a = 1; | |
| b = 3; | |
| var s = 1; | |
| (function () { | |
| a = 2; | |
| b = 4; | |
| var c = 3; | |
| d = 1; | |
| s = 2; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | // Kjør med noe ala disse | |
| // $ node proxy.js www.google.no 80 | |
| // $ node proxy.js www.vg.no 80 | |
| // og sjekk localhost:3000 | |
| var http = require('http') | |
| , args = process.argv.splice(2, 2); | |
| http.createServer(function (req, res) { | |
| var options = { | |
| host: args[0] || 'www.google.no' | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #!/bin/sh | |
| # Opens a git repo for people to pull/push | |
| git daemon --reuseaddr --base-path=/ --export-all --verbose --enable=receive-pack | 
OlderNewer