Skip to content

Instantly share code, notes, and snippets.

npm info it worked if it ends with ok
npm info using npm@0.2.8-1
npm info using node@v0.3.2
npm info fetch http://registry.npmjs.org/compress/-/compress-0.1.8.tgz
npm info preinstall compress@0.1.8
npm info install compress@0.1.8
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
@andrewschaaf
andrewschaaf / gist:767423
Created January 6, 2011 02:47
Account Hub: rough notes

CHCMF[H]: (coord to coord)-mapping format[, with hashes]

  • CCMF: (Closure's format)
  • CCMFH: (Closure's format) + (backward-compatible extras)

CCMF

Let json_encode be a JSON encoder such that no linebreaks occur in its output.

1 if x
2 else if y
3 else if z

-->

if x
  1
else if y

Installing NodeJS and NPM

Prereqs (Ubuntu)

sudo apt-get install

  • build-essential
  • libssl-dev
  • git-core
http = require 'http'
server = http.createServer (req, res) ->
res.writeHead 200, {'Content-Type': 'text/plain'}
res.end 'Hello World\n'
server.listen 8124, "127.0.0.1", () ->
console.log 'Server running at http://127.0.0.1:8124/'
((exports) ->
# ...
)(if exports? then exports else @mymodule = {})
((exports) ->
# ...
)(if exports? then exports else @mymodule = {})
# vs
((exports) ->
# ...
class Suite
constructor: (options={
foo: '...'
bar: '...'}) ->
if @constructor.instance
throw new Error 'Please use Suite.getInstance()'
else
@constructor.instance = this