(This is the kind of thing I should put on my hypothetical blog.)
I'm a Node.js user... on Windows. (Gasp!) And here are some of the issues I face every day:
In order of most-violated to least-violated:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
;; This example shows how to create a single producer and multiple consumers. | |
;; Each consumer will receive the message. I'm not sure if internally it's handled in a round-robin manner, | |
;; but when queue does not listen for messages (e.q. it's processing them), it won't receive one. | |
;; | |
;; In order to run it, use: | |
;; | |
;; lein2 run --mode consumer | |
;; | |
;; And in other window: | |
;; |
// arcfour aka RC4 enc/decrypt function | |
// see: http://en.wikipedia.org/wiki/RC4 | |
arcfour = (function () { | |
"use strict"; | |
var swap = function (a, i, j) { | |
var tmp = a[i]; | |
a[i] = a[j]; | |
a[j] = tmp; | |
}; | |
/* | |
* Fair License (Fair) | |
* | |
* Copyright (c) 2012, IWAMURO Motonori | |
* | |
* Usage of the works is permitted provided that this instrument is | |
* retained with the works, so that any entity that uses the works is | |
* notified of this instrument. | |
* | |
* DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. |
function getCodePoint(array) { | |
/*----------------------------------------------------------------------------------------- | |
[UCS-2 (UCS-4)] [bit pattern] [1st byte] [2nd byte] [3rd byte] [4th byte] | |
U+ 0000.. U+007F 00000000-0xxxxxxx 0xxxxxxx | |
U+ 0080.. U+07FF 00000xxx-xxyyyyyy 110xxxxx 10yyyyyy | |
U+ 0800.. U+FFFF xxxxyyyy-yyzzzzzz 1110xxxx 10yyyyyy 10zzzzzz | |
U+10000..U+1FFFFF 00000000-000wwwxx 11110www 10xxxxxx 10yyyyyy 10zzzzzz | |
-xxxxyyyy-yyzzzzzzz | |
------------------------------------------------------------------------------------------*/ |
/** | |
* Function to fix native charCodeAt() | |
* | |
* Now, we can use fixedCharCodeAt("foo€", 3); for multibyte (non-bmp) chars too. | |
* | |
* @access public | |
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/charCodeAt | |
* @note If you hit a non-bmp surrogate, the function will return false | |
* @param str String Mixed string to get charcodes | |
* @param idx Integer Position of the char to get |
" Vim syntax file | |
" Language: SQL, PGSQL (postgres 9.1) | |
" Last Change: 2012 May 21st | |
" Maintainer: Grégoire Hubert <greg DOT hubert AT gmail DOT com> | |
" Based on the work of Paul Moore <pf_moore AT yahoo.co.uk> | |
" For version 5.x: Clear all syntax items | |
" For version 6.x: Quit when a syntax file was already loaded | |
if version < 600 | |
syntax clear |
foo { | |
animation-name: spin; | |
animation-duration: 3s; | |
animation-timing-function: ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps(10,start | end) | cubic-bezier(<number>, <number>, <number>, <number>); | |
animation-delay: 3s; | |
animation-iteration-count: infinite | 10; | |
animation-direction: alternate | normal; | |
animation-fill-mode: forward | backwards | both | none; | |
animation-play-state: running | paused; | |
} |