This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bs = require('nodestalker'), | |
client = bs.Client('mq-aws-us-east-1.iron.io:11300'); | |
token = 'my token'; | |
projectId = 'my project ID'; | |
// authenticate | |
client.put('oauth ' + token + ' ' + projectId); | |
client.use('queue-name').onSuccess(function(data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Timestamp int64 | |
func (ts *Timestamp) UnmarshalJSON(data []byte) os.Error { | |
if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' { | |
return os.NewError("cannot unmarshal non-string into timestamp") | |
} | |
data = data[1 : len(data)-1] | |
t, err := time.Parse(time.RFC3339, string(data)) | |
if err != nil { | |
return err |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"archive/tar" | |
"io" | |
"os" | |
) | |
func main() { | |
f, _ := os.Open("archive.tar") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From c15dece9122aa25831459cfeb5ed110aa5881b7c Mon Sep 17 00:00:00 2001 | |
From: Evan Shaw <edsrzf@gmail.com> | |
Date: Fri, 25 Feb 2011 17:55:36 +1300 | |
Subject: [PATCH] Fix typo in doc links | |
--- | |
web/doc/en/bytecode-compiler/generator.markdown | 2 +- | |
web/doc/en/bytecode-compiler/writer.markdown | 2 +- | |
2 files changed, 2 insertions(+), 2 deletions(-) |
NewerOlder