Skip to content

Instantly share code, notes, and snippets.

Zachary Gramana zgramana

Block or report user

Report or block zgramana

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
zgramana /
Created Jan 7, 2017 — forked from chirag04/
compile rocksdb as backend for asyncstorage


All credit to @sahrens for sharing fb's internal implementation.


  • clone rocksdb from

  • edit MakeFile inside rocksdb. Search for Platform-specific compilation around line 1122. Make th next few lines to look like this:

ifeq ($(PLATFORM), IOS)
# For iOS, create universal object files to be used on both the simulator and
View word2vec.fsx
#I "../packages/"
#r @"FSharp.Data/lib/net40/FSharp.Data.dll"
#r @"StemmersNet/lib/net20/StemmersNet.dll"
#r @"FSharp.Collections.ParallelSeq/lib/net40/FSharp.Collections.ParallelSeq.dll"
#load "Utilities.fs"
open FSharp.Data
zgramana / LICENSE
Created Jul 12, 2016 — forked from kerryrodden/.block
Sequences sunburst
Copyright 2013 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
zgramana / auto-merge.cs
Created Apr 12, 2016
Auto-merging conflicting revisions in C# using LINQ
View auto-merge.cs
Dictionary<string, object> mergedProps;
mergedProps = doc.ConflictingRevisions
.SelectMany(rev => rev.UserProperties)
kvp => kvp.Key,
kvp => kvp.Value
zgramana / swagger.json
Last active Jan 26, 2016
Init POC of generated Swagger spec
View swagger.json
"consumes": [
"produces": [
"schemes": [
zgramana /
Created Aug 11, 2015
Creates a standalone OSX executable of our cp-replicate .NET app.
export AS="as -arch i386”
export CC="cc -framework CoreFoundation -lobjc -liconv -arch i386”
mkbundle --deps --static -o cb-replicate cbreplicate.exe *.dll
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig
export LD_LIBRARY_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/
cd /Users/zgramana/Source/cb-replicate/bin/Release/
mkbundle--deps --static -o cb-replicate cbreplicate.exe *.dll
zgramana / get_changes.go
Created May 23, 2015
Gets the changes feed and prints the results.
View get_changes.go
package main
import "fmt"
import "io/ioutil"
import "net/http"
func main() {
// Changes Feed (GET
zgramana / couchbase-lite-demo.csx
Last active Aug 29, 2015
Simple first script to create a bunch of docs and replicate them.
View couchbase-lite-demo.csx
// Run `scriptcs -install Couchbase.Lite` to fetch Couchbase Lite from Nuget.
#r Couchbase.Lite.dll
using Couchbase.Lite;
var db = Manager.SharedInstance.GetDatabase("scriptcs");
zgramana / TaskExtensions.cs
Last active Aug 29, 2015
Task.Delay backport
View TaskExtensions.cs
using System;
using System.Threading.Tasks;
using System.Threading;
namespace Couchbase.Lite.Shared
public static class TaskExtensions
static int CheckTimeout (TimeSpan timeout)
zgramana / info_swap.js
Created Dec 9, 2014
Sync Function Snippets
View info_swap.js
if (doc.type == "contactexchange") {
// trade access to each user's contact channel
access(doc.userId, "contact-" + doc.localUserId);
access(doc.localUserId, "contact-" + doc.userId);
You can’t perform that action at this time.