Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/usr/bin/env ruby | |
| # Jabber-SH — SH console via XMPP/Jabber (GTalk) | |
| # | |
| # Jabber-SH allows you to administrate a remote computer via a command line | |
| # through a Jabber client. It’s like SSH via GoogleTalk! :) | |
| # This is just a hack but it might be usefull sometime to run basic commands | |
| # on a machine that is not accessible via ssh. | |
| # | |
| # Philippe Creux. pcreux/AT/gmail/DOT/com |
| h scroll left | |
| j scroll down | |
| k scroll up | |
| l scroll right | |
| gg scroll to top of the page | |
| G scroll to bottom of the page | |
| f activate link hints mode to open in current tab | |
| F activate link hints mode to open in new tab | |
| r reload |
| Copyright (c) 2011 Eberhard Gräther, http://egraether.com | |
| Permission is hereby granted, free of charge, to any person obtaining | |
| a copy of this software and associated documentation files (the | |
| "Software"), to deal in the Software without restriction, including | |
| without limitation the rights to use, copy, modify, merge, publish, | |
| distribute, sublicense, and/or sell copies of the Software, and to | |
| permit persons to whom the Software is furnished to do so, subject to | |
| the following conditions: | |
| { | |
| "ad": [ | |
| "42.5000", | |
| "1.5000" | |
| ], | |
| "ae": [ | |
| "24.0000", | |
| "54.0000" | |
| ], | |
| "af": [ |
| function transpose(a) | |
| { | |
| return a[0].map(function (_, c) { return a.map(function (r) { return r[c]; }); }); | |
| // or in more modern dialect | |
| // return a[0].map((_, c) => a.map(r => r[c])); | |
| } |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 4x mutex op, 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns | |
| Send 2K bytes over 1 Gbps network 20,000 ns | |
| Read 1 MB sequentially from memory 250,000 ns |
| redis-cli EVAL "$(cat hello.lua)" 0 |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| -- Two dashes start a one-line comment. | |
| --[[ | |
| Adding two ['s and ]'s makes it a | |
| multi-line comment. | |
| --]] | |
| ---------------------------------------------------- | |
| -- 1. Variables and flow control. | |
| ---------------------------------------------------- |