Skip to content

Instantly share code, notes, and snippets.

Avatar

Juan Benet jbenet

View GitHub Profile
View emacs-ox-hugo.el
#!/usr/bin/env emacs -Q --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.
@jbenet
jbenet / large-docs-comments.css
Last active Feb 4, 2019
Large google docs comments
View large-docs-comments.css
/*
large google docs comments
add this to a user stylesheet
like https://github.com/openstyles/stylus
*/
/* make comment boxes large */
@media only screen and (min-width: 1400px) {
.docos-layout-anchored
.docos-anchoreddocoview {
@jbenet
jbenet / inst.md
Last active Dec 3, 2018
instructions to install dig's riot-web theme
View inst.md
@jbenet
jbenet / dht-interface.go
Created Jul 11, 2018
libp2p dht interface
View dht-interface.go
import "context"
type Key interface {}
// concrete type likely a []byte or string
type Record interface {}
// concrete type is a struct
// (in libp2p, will be ipld -- see iprs)
// mitting here for clairty and avoiding distraction
// for now, let's assume it's an opaque value.
View keybase.md

Keybase proof

I hereby claim:

  • I am jbenet on github.
  • I am jbenet (https://keybase.io/jbenet) on keybase.
  • I have a public key ASAEBwJK1_z8s2R5Pxgl1wteFS85Kaz748RvCh3h8Y9WjQo

To claim this, I am signing this object:

@jbenet
jbenet / ipfs-archive
Created Jan 7, 2018
ipfs-archive shell script for adding files, urls, stdin and pinning
View ipfs-archive
#!/bin/bash
# install into your path, as 'ipfs-archive', 'static' or something like that
# OPTIONS
# use this ipfs api
# this is an ipfs cluster for me :)
ipfsApi="/ip4/127.0.0.1/tcp/9095"
# gateway URLs. for printing, and automatic open
View gist:8f000606f2009495c56177f6ca2c19b7

When people come up with ideas, they often assume that:

  • coming up with an idea is the same thing as coming up with an idea first (it isn't, read existing literature)
  • coming up with an idea first is dramatically more special than coming up with an idea (it isn't)
  • the wealth of existing literature does not include their idea (almost always it does)
  • unpublished ideas do not count (they do, lots of important discoveries happen verbally, and unfortunately sometimes only verbally :( )
  • coming up with it first is more important than fleshing out a body of work (it isn't)

And these assumptions tend to make people very unhappy. I repeatedly see people succumbing to sadness over multiple discovery. It shouldn't be sad, it should be a happy event, as it confirms our thoughts and presents an opportunity for collaborations.

View 1-ipfscluster-panic
ipfscluster status
runtime/cgo: pthread_create failed: Resource temporarily unavailable
SIGABRT: abort
PC=0x7fc965b63cc9 m=0
goroutine 0 [idle]:
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
@jbenet
jbenet / ipfs-cluster-addr.go
Created Dec 30, 2016
ipfs-cluster-addr.go
View ipfs-cluster-addr.go
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"os"
"os/user"
@jbenet
jbenet / propose-ipfs-pack.md
Created Dec 23, 2016
ipfs-pack and friends
View propose-ipfs-pack.md

IPFS Tooling for datasets

Background

We need some tooling for a certain set of use cases around archival and dataset management. This tooling is for fitting how people work with large files and large datasets.

Grounding Assumptions

Basic grounding assumptions here:

  • datasets are "large" (From GB to EB in size)
You can’t perform that action at this time.