Skip to content

Instantly share code, notes, and snippets.


Juan Benet jbenet

View GitHub Profile
jbenet /
Created Aug 4, 2022
Iceland Eruption
jbenet /
Last active Jun 29, 2021
Fast Research & Development

Fast Research & Development

People tend to believe that R&D takes a long time.

jbenet /
Last active Jun 18, 2021
Sending a tx in filecoin w/ extra data

Messages in Filecoin allow sending arbitrary values through the params field.

Encoding data into params

  • data to send through transactions should be base64 encoded when using the message sending APIs.
  • note: you'll be sending to method: 0, which should be the default in your tools. method: 0 will ignore the params.

lotus-shed example

View emacs-ox-hugo.el
#!/usr/bin/env emacs -Q --script
;; Sandbox
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 / 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
/* make comment boxes large */
@media only screen and (min-width: 1400px) {
.docos-anchoreddocoview {
jbenet /
Last active Dec 3, 2018
instructions to install dig's riot-web theme
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.

Keybase proof

I hereby claim:

  • I am jbenet on github.
  • I am jbenet ( on keybase.
  • I have a public key ASAEBwJK1_z8s2R5Pxgl1wteFS85Kaz748RvCh3h8Y9WjQo

To claim this, I am signing this object:

jbenet / ipfs-archive
Created Jan 7, 2018
ipfs-archive shell script for adding files, urls, stdin and pinning
View ipfs-archive
# install into your path, as 'ipfs-archive', 'static' or something like that
# use this ipfs api
# this is an ipfs cluster for me :)
# 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.