... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
| // | |
| // toplevel.js | |
| // | |
| // TopLevel enables you to template your HTML, CSS, and Javascript at the Top Level | |
| // (c) 2014 chris mckenzie. see LICENSE for more details. | |
| // https://github.com/kristopolous/TopLevel for the latest version. | |
| // | |
| // Parts of this code use Jeremy Ashkenas' underscore library, available at | |
| // https://github.com/jashkenas/underscore and protected by the license specified | |
| // therein. |
| // Use absolute URLs to navigate to anything not in your Router. | |
| // Only need this for pushState enabled browsers | |
| if (Backbone.history && Backbone.history._hasPushState) { | |
| // Use delegation to avoid initial DOM selection and allow all matching elements to bubble | |
| $(document).delegate("a", "click", function(evt) { | |
| // Get the anchor href and protcol | |
| var href = $(this).attr("href"); | |
| var protocol = this.protocol + "//"; |
| // Node.js CheatSheet. | |
| // Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
| // Download: http://nodejs.org/download/ | |
| // More: http://nodejs.org/api/all.html | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
| <?php | |
| define('START_TIME', microtime(TRUE)); | |
| register_shutdown_function(function() { | |
| print dump(round(microtime(TRUE) - START_TIME, 3) . ' seconds'); | |
| print dump(round(memory_get_peak_usage() / 1024) . " kb peak usage"); | |
| print dump(DB::$q); | |
| }); |
| // https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works | |
| package main | |
| import ( | |
| "fmt" | |
| "golang.org/x/crypto/ssh" | |
| ) | |
| const privateKey = `content of id_rsa` |
| Here is a list of scopes to use in Sublime Text 2 snippets - | |
| ActionScript: source.actionscript.2 | |
| AppleScript: source.applescript | |
| ASP: source.asp | |
| Batch FIle: source.dosbatch | |
| C#: source.cs | |
| C++: source.c++ | |
| Clojure: source.clojure | |
| CoffeeScript: source.coffee |
Visit my blog or connect with me on Twitter
git init
or
| // Named constants with unique integer values | |
| var C = {}; | |
| // Tokenizer States | |
| var START = C.START = 0x11; | |
| var TRUE1 = C.TRUE1 = 0x21; | |
| var TRUE2 = C.TRUE2 = 0x22; | |
| var TRUE3 = C.TRUE3 = 0x23; | |
| var FALSE1 = C.FALSE1 = 0x31; | |
| var FALSE2 = C.FALSE2 = 0x32; | |
| var FALSE3 = C.FALSE3 = 0x33; |