Skip to content

Instantly share code, notes, and snippets.

Tom Townsend RadioactiveMouse

  • UK
Block or report user

Report or block RadioactiveMouse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
RadioactiveMouse / curl.log
Last active Dec 14, 2015
Go gist to help explain issues with content parsing errors. NB: headers are going to be modified differently and handed into query function.
View curl.log
curl -v -d '{"":"testvalue"}' -H "Content-Type: application/json"
* About to connect() to port 8098 (#0)
* Trying connected
> POST /buckets/test/keys?returnbody=true HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/ libidn/1.23 librtmp/2.3
> Host:
> Accept: */*
> Content-Type: application/json
> Content-Length: 16
RadioactiveMouse / main.go
Created Mar 3, 2013
Golang Reference issue
View main.go
func (self *Client) Store(bucket string, returnBody bool, data *Data) (*Data, error) {
// check if the key exists for conditional put/post
path := ""
returnData := Data{}
resp := http.Response{}
// check if the key exists
if data.value == "" {
return &returnData, errors.New("RGO: no value defined for the key")
if data.key != "" {
View main.go
package main
import (
type Answer struct {

Struct Printing

Structs can be printed using the builtin print methods as they take advantage of the reflect package.

Print a struct as is with %v Print a struct with field names by %+v

Run the code here :

RadioactiveMouse /
Created Jun 19, 2012
Express key binding for get route
{ "keys": ["super+shift+r"],
  "command": "insert_snippet",
  "args" : {
  	"contents": "app.get(\"/${1:}$SELECTION\", routes.${1:}$SELECTION);${0}"
RadioactiveMouse /
Created Jun 19, 2012 — forked from harthur/
console.log() key binding for Sublime Text

Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:

    { "keys": ["super+shift+l"],
      "command": "insert_snippet",
      "args": {
        "contents": "console.log(${1:}$SELECTION);${0}"
You can’t perform that action at this time.