Skip to content

Instantly share code, notes, and snippets.

Avatar

Traun Leyden tleyden

View GitHub Profile
View gist:64bd251b39c1e30a8b68106feb5beffc
New in Docker Hub: Personal Access Tokens. Learn more >
Explore
Repositories
Organizations
Repositories
tleyden5iwx / open-ocr-preprocessor
Builds
Using 0 of 1 private repositories. Get more
SUCCESS
View gist:7de181727c5ab843c87654c8054c6843
Building in Docker Cloud's infrastructure...
Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.
KernelVersion: 4.4.0-1060-aws
Components: [{u'Version': u'18.03.1-ee-3', u'Name': u'Engine', u'Details': {u'KernelVersion': u'4.4.0-1060-aws', u'Os': u'linux', u'BuildTime': u'2018-08-30T18:42:30.000000000+00:00', u'ApiVersion': u'1.37', u'MinAPIVersion': u'1.12', u'GitCommit': u'b9a5c95', u'Arch': u'amd64', u'Experimental': u'false', u'GoVersion': u'go1.10.2'}}]
Arch: amd64
BuildTime: 2018-08-30T18:42:30.000000000+00:00
ApiVersion: 1.37
View gist:3c8f1d88ef30d4cd57d6e03b2848e290
# VM for running Couchbase Server in a private network
#
# After starting:
#
# - vagrant ssh to get into the vm
# - wget http://latestbuilds.service.couchbase.com/builds/releases/5.0.1/couchbase-server-enterprise-5.0.1-centos7.x86_64.rpm (or from downloads page)
# - run "ip addr" to get eth1 ip address
# - on host machine, go to ip-address:8091 to setup Couchbase Server
View couchbase-db-todo.json
{
"interface":":4984",
"log": ["*", "BLIP", "BLIP+", "BLIP++"],
"databases": {
"todo": {
"server": "walrus:",
"users": {
"user1": {"password": "pass", "admin_channels": ["user1"]},
"user2": {"password": "pass", "admin_channels": ["user2"]},
"mod": {"password": "pass", "admin_roles": ["moderator"]},
@tleyden
tleyden / find_functions_w_error_params.go
Created Nov 14, 2017
Find all functions that take an "error" as a parameter using Go's AST parser
View find_functions_w_error_params.go
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
"log"
"strings"
)
@tleyden
tleyden / clobber_doc.go
Created Jul 8, 2017
openwhisk debugging
View clobber_doc.go
package main
import (
"context"
"fmt"
"encoding/json"
"github.com/flimzy/kivik"
_ "github.com/flimzy/kivik/driver/couchdb" // The CouchDB driver
"os"
@tleyden
tleyden / gist:806bad30c18b29f4e350adca5e2d91ef
Created Apr 10, 2017
The Code Not Taken (if Robert Frost were a coder and alive today)
View gist:806bad30c18b29f4e350adca5e2d91ef
Two branches diverged in a hairy func,
And sorry I could not setjmp both
And be one core, long I spun
And looked down one stack as deep I could
To where it bent in the memory bus
Then took the other, as just as fast,
And having perhaps the better metal,
Because it was cachey and wanted warmth,
Though as for that the executing there
View cbbootstrap-sequence-diagram.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View jq.md

JSON Input

{
  "rows": [
    {
      "key": "0-writer-user-0-a2dd54dc-3301-4a9e-af23-7eb0fb293b7e",
      "id": "0-writer-user-0-a2dd54dc-3301-4a9e-af23-7eb0fb293b7e",
      "value": {
        "rev": "1-eb773b445a2f94651e418fbaa670c8ef",
You can’t perform that action at this time.