start new:
tmux
start new with session name:
tmux new -s myname
| var cluster = require('cluster'); | |
| var m = 10000000; | |
| function bounce(msg, out) { | |
| if (msg < m) { | |
| out.send(msg + 1); | |
| return null; | |
| } else { | |
| console.log("Finished with", msg); |
| library MIME; | |
| // get MIME type (returns null if there is no such extension) | |
| String mimeType(String extension) => _mimeMaps[extension]; | |
| // default MIME type mappings | |
| Map _mimeMaps = const { | |
| 'abs': 'audio/x-mpeg', | |
| 'ai': 'application/postscript', | |
| 'aif': 'audio/x-aiff', |
| /* | |
| Dart code sample : Simple tool for HTTP server development | |
| Returns contents of the HTTP request to the client | |
| 1. Save these files into a folder named DumpHttpRequest. | |
| 2. From Dart editor, File > Open Folder and select this DumpHttpRequest folder. | |
| 3. Run DumpHttpRequest.dart as server. | |
| 4. Access the DumpHttpRequest.html file from your browser such as : file:///C:/ … /DumpHttpRequest/DumpHttpRequest.html | |
| 5. Enter some text to the text areas and click “Submit using POST” or “Submit using GET” button. | |
| 6. This server will return available data from the request. This data is also available on the Dart editor’s console. | |
| Ref: www.cresc.co.jp/tech/java/Google_Dart/DartLanguageGuide.pdf (in Japanese) |
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "fmt" | |
| "io" | |
| "log" | |
| ) |
| #gitback 0.1 | |
| #usage: sudo ruby gitback.rb | |
| #credits: walter white, minor changes: addy osmani | |
| #!/usr/bin/env ruby | |
| # dependencies | |
| require "yaml" | |
| require "open-uri" | |
| time = Time.new |
As configured in my dotfiles.
start new:
tmux
start new with session name:
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| # First install tmux | |
| brew install tmux | |
| # For mouse support (for switching panes and windows) | |
| # Only needed if you are using Terminal.app (iTerm has mouse support) | |
| Install http://www.culater.net/software/SIMBL/SIMBL.php | |
| Then install https://bitheap.org/mouseterm/ | |
| # More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |