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| /** | |
| * @fileoverview Auto completes curly braces to start on a new line - experimental | |
| * @author Nathan Rijksen | |
| * @version 0.1 | |
| */ | |
| /** | |
| * Komodo Extensions Namespace. | |
| * This namespace was suggested by JeffG. More information is available at: | |
| * {@link http://community.activestate.com/forum-topic/extension-s-namespace} |
| eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9 |
| # install sysbench | |
| $ apt-get install sysbench | |
| # CPU benchmark, 1 thread | |
| $ sysbench --test=cpu --cpu-max-prime=20000 run | |
| # CPU benchmark, 64 threads | |
| $ sysbench --test=cpu --cpu-max-prime=20000 --num-threads=64 run | |
| # Disk benchmark, random read. See .fio files in this gist |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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 8000Find out which mouse button is which with:
xev | grep -i button
On my mouse, 6 and 7 are Back and Forward buttons.
Then add this lines ~/.xbindkeysrc
## Logitech mouse Back and Forward
| <?php | |
| /** | |
| * Usage: | |
| * Send the url you want to access url encoded in the url paramater, for example (This is with JS): | |
| * /twitter-proxy.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=MikeRogers0&count=2') | |
| */ | |
| // The tokens, keys and secrets from the app you created at https://dev.twitter.com/apps | |
| $config = array( |
| private void enableHTML5AppCache() { | |
| webView.getSettings().setDomStorageEnabled(true); | |
| // Set cache size to 8 mb by default. should be more than enough | |
| webView.getSettings().setAppCacheMaxSize(1024*1024*8); | |
| // This next one is crazy. It's the DEFAULT location for your app's cache | |
| // But it didn't work for me without this line | |
| webView.getSettings().setAppCachePath("/data/data/"+ getPackageName() +"/cache"); |
| ' Author: Rob W <gwnRob@gmail.com> | |
| ' License: Creative Commons 3.0 with attribution | |
| ' http://creativecommons.org/licenses/by/3.0/ | |
| ' | |
| ' My own use case: | |
| ' For browser-testing purposes, I've set up a Win XP Virtual Machine | |
| ' (http://stackoverflow.com/q/10541225). My Chrome installers are | |
| ' located in a virtual share, at \\VBOXSRV\WinShared\WinXPDev\Chrome\ | |
| ' When I need to test an old Chrome version, I launch this script, which | |
| ' automatically installs and configures Chrome. |
| /* | |
| * object.watch polyfill | |
| * | |
| * 2012-04-03 | |
| * | |
| * By Eli Grey, http://eligrey.com | |
| * Public Domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| */ |