Skip to content

Instantly share code, notes, and snippets.

Daniel Cannon dancannon

Block or report user

Report or block dancannon

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
View emoji-data.json
[{"name":"COPYRIGHT SIGN","unified":"00A9","variations":["00A9-FE0F"],"docomo":"E731","au":"E558","softbank":"E24E","google":"FEB29","image":"00a9.png","sheet_x":0,"sheet_y":0,"short_name":"copyright","short_names":["copyright"],"text":null,"texts":null,"category":"Symbols","sort_order":198,"has_img_apple":true,"has_img_google":true,"has_img_twitter":false,"has_img_emojione":true},{"name":"REGISTERED SIGN","unified":"00AE","variations":["00AE-FE0F"],"docomo":"E736","au":"E559","softbank":"E24F","google":"FEB2D","image":"00ae.png","sheet_x":0,"sheet_y":1,"short_name":"registered","short_names":["registered"],"text":null,"texts":null,"category":"Symbols","sort_order":199,"has_img_apple":true,"has_img_google":true,"has_img_twitter":false,"has_img_emojione":true},{"name":"DOUBLE EXCLAMATION MARK","unified":"203C","variations":["203C-FE0F"],"docomo":"E704","au":"EB30","softbank":null,"google":"FEB06","image":"203c.png","sheet_x":0,"sheet_y":2,"short_name":"bangbang","short_names":["bangbang"],"text":null,"texts":n
View upsert_row.js
var id = 3;
r.branch(
r.table("test").get(id),
r.table("test").get(id).update({a: r.row("a").add(1)}),
r.table("test").insert({id: id, a: 1})
)
@dancannon
dancannon / listen.go
Created Mar 21, 2015
New channel based iterator in GoRethink v1.0
View listen.go
cursor, err := r.Expr([]int{1,2,3}).Run(session)
if err != nil {
panic(err)
}
ch := make(chan int)
cursor.Listen(ch)
<- ch // 1
<- ch // 2
<- ch // 3
View bench.go
package main
import (
"log"
"sync"
"testing"
gr "github.com/dancannon/gorethink"
)
You can’t perform that action at this time.