Skip to content

Instantly share code, notes, and snippets.

Steven Allen Stebalien

Block or report user

Report or block Stebalien

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 emacs-ox-hugo.el
#!/usr/bin/env -S emacs --script
;; Sandbox
(setq
user-emacs-directory (concat (file-name-directory load-file-name) ".emacs/")
package-user-dir (concat user-emacs-directory "elpa/")
use-package-always-ensure t
inhibit-message t) ; if there are errors, remove this.
; debug-on-error t) ; if there are errors, add this.
View interface.go
package fs
import (
"context"
"errors"
"io"
"os"
"sync"
"github.com/ipfs/go-unixfs"
View gist:942c98b497554f52f4a26f4bfa39fbfb
diff --git a/go.mod b/go.mod
index 54baad7..d1a2acd 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,7 @@
module github.com/libp2p/go-libp2p-transport-upgrader
require (
+ github.com/Stebalien/go-dbuf v0.0.0-20190510190534-6db3381d14ea
github.com/ipfs/go-log v0.0.1
View gist:1bea0391eec09889a3bb3b31643b8e4b
github.com/ipfs/go-ipfs@(devel)
bazil.org/fuse@v0.0.0-20180421153158-65cc252bf669
github.com/AndreasBriese/bbloom@v0.0.0-20180913140656-343706a395b7
github.com/Kubuxu/go-os-helper@v0.0.1
github.com/Stebalien/go-bitfield@v0.0.0-20180330043415-076a62f9ce6e
github.com/beorn7/perks@v0.0.0-20180321164747-3a771d992973
github.com/bren2010/proquint@v0.0.0-20160323162903-38337c27106d
github.com/btcsuite/btcd@v0.0.0-20190213025234-306aecffea32
github.com/cenkalti/backoff@v2.1.1+incompatible
github.com/cheekybits/genny@v1.0.0
View gist:8683bd8c0f79862348e6d3ca04f0993b
goroutine 17142691 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:311 fp=0xc038400850 sp=0xc038400848 pc=0x96fbf0
runtime.(*mheap).alloc(0x2649a60, 0x1, 0x7f9b58010006, 0x4)
/usr/local/go/src/runtime/mheap.go:1047 +0x8a fp=0xc0384008a0 sp=0xc038400850 pc=0x9388da
runtime.(*mcentral).grow(0x2649f60, 0x0)
/usr/local/go/src/runtime/mcentral.go:256 +0x95 fp=0xc0384008e8 sp=0xc0384008a0 pc=0x92b815
runtime.(*mcentral).cacheSpan(0x2649f60, 0x30)
/usr/local/go/src/runtime/mcentral.go:106 +0x2ff fp=0xc038400948 sp=0xc0384008e8 pc=0x92b31f
runtime.(*mcache).refill(0x7f9b7e09c008, 0x106)
View gist:5e59cf3a2837438cba31e6befbd210f9
diff --git a/mount/mount.go b/mount/mount.go
index 9d26f46..561a943 100644
--- a/mount/mount.go
+++ b/mount/mount.go
@@ -122,22 +122,36 @@ func (d *Datastore) Delete(key ds.Key) error {
}
func (d *Datastore) Query(q query.Query) (query.Results, error) {
- if len(q.Filters) > 0 ||
- len(q.Orders) > 0 ||
View gw-latency.sh
#!/bin/bash
REPO="$(mktemp -d)"
IPFS_PATH="$REPO"
cleanup() {
rm -rf "$REPO"
wait
}
View gw-latency.sh
#!/bin/bash
REPO="$(mktemp -d)"
IPFS_PATH="$REPO"
trap "$(printf 'rm -rf "%s"' "$REPO")" INT EXIT
ipfs init >/dev/null
ipfs daemon --routing=dhtclient >&2 &
View gw-latency.sh
#!/bin/bash
REPO="$(mktemp -d)"
IPFS_PATH="$REPO"
trap "$(printf 'rm -rf "%s"' "$REPO")" INT EXIT
ipfs init --profile=randomports >/dev/null
ipfs daemon --routing=dhtclient >&2 &
View gw-latency.sh
#!/bin/bash
REPO="$(mktemp -d)"
IPFS_PATH="$REPO"
trap "$(printf 'rm -rf "%s"' "$REPO")" INT EXIT
ipfs init --profile=randomports >/dev/null
ipfs config Addresses.API "/ip4/127.0.0.1/tcp/0" # random API port.
You can’t perform that action at this time.