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
const Realm = require('realm'); | |
const uuid = require('uuid').v4; | |
const process = require('process'); | |
const argv = process.argv.slice(2); | |
const STITCH_APP_ID = 'foo2-tqxot'; | |
Realm.Sync.setLogLevel('all'); | |
// Uncomment these instead to hit ROS | |
/* |
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
import fileinput | |
import re | |
goroutine_hdr = re.compile('^goroutine (\d+) \[([\w\s,]+)\]:$') | |
funccall_params = re.compile('(.*)\([^\)]*\)$') | |
def main(): | |
goroutines = [] | |
currentgoroutine = None |
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
void memLimitTest() { | |
Isolate::CreateParams create_params; | |
v8::ResourceConstraints constraints; | |
constraints.set_max_old_space_size(100); | |
create_params.constraints = constraints; | |
create_params.array_buffer_allocator = | |
v8::ArrayBuffer::Allocator::NewDefaultAllocator(); | |
Isolate *isolate = Isolate::New(create_params); | |
{ | |
Isolate::Scope isolate_scope(isolate); |
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
#!/bin/bash | |
set -u | |
DOC_DIR=godoc | |
PKG=github.com/10gen/baas | |
# Run a godoc server which we will scrape. Clobber the GOPATH to include | |
# only our dependencies.s | |
godoc -http=localhost:6060 & | |
DOC_PID=$! |
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 ( | |
"crypto/tls" | |
"log" | |
) | |
type OpCode int32 | |
const MsgHeaderLen = 16 |
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
tasks: | |
- name: compile | |
commands: | |
- command: git.get_project | |
params: | |
directory: src | |
- command: shell.exec | |
params: | |
script: | | |
echo "hello world!" |
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
$(document).ready(function() { | |
var fps = 30; | |
var fpsInterval = 1000 / fps; | |
var tokens = $('.bricks').text().split(/\s/g) | |
var out = $(".out") | |
$.each(tokens, function(i, v) { | |
var newNode = $('<span class="word"></span>').text(v); | |
out.append(newNode); | |
}) |
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
npm init -y | |
mkdir src | |
touch src/index.js | |
mkdir dist | |
npm install --save-dev react webpack webpack-dev-server react babel-core babel-loader babel-preset-es2015 babel-preset-react babel-preset-stage-2 react-dom | |
cat << EOF > dist/index.html | |
<!DOCTYPE html> | |
<html> | |
<body> | |
<div id="app"></div> |
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
digraph "mongotape" { | |
node [style=filled fillcolor="#f8f8f8"] | |
subgraph cluster_L { L [shape=box fontsize=32 label="File: mongotape\lType: cpu\l34.54s of 69.19s total (49.92%)\lDropped 322 nodes (cum <= 0.35s)\lDropped 63 edges (freq <= 0.07s)\lShowing top 80 nodes out of 192 (cum >= 1.61s)\l"] } | |
N1 [label="runtime.goexit\n0 of 59.74s(86.34%)" fontsize=8 shape=box tooltip="runtime.goexit (59.74s)"] | |
N2 [label="github.com/10gen/mongotape.(*StatCollector).Collect.func1.1\n0.02s(0.029%)\nof 25.68s(37.12%)" fontsize=9 shape=box tooltip="github.com/10gen/mongotape.(*StatCollector).Collect.func1.1 (25.68s)"] | |
N3 [label="github.com/10gen/mongotape.(*TerminalStatRecorder).RecordStat\n0.27s(0.39%)\nof 25.52s(36.88%)" fontsize=11 shape=box tooltip="github.com/10gen/mongotape.(*TerminalStatRecorder).RecordStat (25.52s)"] | |
N4 [label="github.com/10gen/mongotape.NewOpChanFromFile.func1.1\n0.10s(0.14%)\nof 15.93s(23.02%)" fontsize=10 shape=box tooltip="github.com/10gen/mongotape.NewOpChanFromFile.func1.1 (15.93s)"] | |
N5 [label="g |
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
function convertExtJson(o){ | |
// if it's an array, loop over each item | |
if(o.constructor == Array){ | |
out = [] | |
for(var i=0; i<o.length;i++){ | |
out.push(convertExtJson(o[i])) | |
} | |
return out | |
}else if(o.constructor == Object){ | |
// if it's an object, replace each key one by one |
NewerOlder