Skip to content

Instantly share code, notes, and snippets.

$ npm install docco
npm info it worked if it ends with ok
npm info using npm@0.3.7
npm info using node@v0.4.0
npm ERR! Error parsing json /usr/local/lib/node/.npm/docco/0.3.0/package/package.json
npm ERR! parse error SyntaxError: Unexpected token }
npm ERR! parse error at Object.parse (native)
npm ERR! parse error at /usr/local/lib/node/.npm/npm/0.3.7/package/lib/utils/read-json.js:71:17
npm ERR! parse error at P (/usr/local/lib/node/.npm/npm/0.3.7/package/lib/utils/read-json.js:62:40)
# client = ...
class User
constructor: (call_when_created) ->
m = client.multi()
m.incr "user_id"
m.get "user_id", (e, r) ->
@id = parseInt r, 10
XYZ_to_CAT02 = (XYZ) ->
[X, Y, Z] = XYZ
return [
.7328 * X + .4296 * Y - .1624 * Z, # R
- .7036 * X + 1.6975 * Y + .0061 * Z, # G
.0030 * X + .0136 * Y + .9834 * Z] # B
XYZ_to_CAT02 = ([X, Y, Z]) ->
[
$("#pickcity").hover(
(-> $("#drop").show()),
(-> $("#drop").hide()))
@andrewschaaf
andrewschaaf / gist:866762
Created March 11, 2011 23:04
ubuntu postfix
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
import smtplib
import time
fromaddr = "postmark.test@andrewschaaf.com"
toaddrs = ["andrew@andrewschaaf.com"]
subject = "Test %f" % (time.time() - 1298766542.8057871 + 200)
@andrewschaaf
andrewschaaf / gist:871082
Created March 15, 2011 17:25
node sign/verify test
###
openssl genrsa 4096 > x.pem
openssl req -new -key x.pem -out x.csr
openssl x509 -req -days 365 -in x.csr -signkey x.pem -out x.crt
###
test = (private_key, cert) ->
bitcoin-details
wiki: docs
repo: test data
libbitcoin (C + OpenSSL)
node-bitcoin-lib

[[Stuff]]


[[Messages]]