Skip to content

Instantly share code, notes, and snippets.

View jbenet's full-sized avatar

Juan Benet jbenet

View GitHub Profile
@jbenet
jbenet / readme.md
Created August 4, 2022 20:08
Iceland Eruption
@jbenet
jbenet / fast-rd.md
Last active June 29, 2021 08:21
Fast Research & Development

Fast Research & Development

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

@jbenet
jbenet / filsend.md
Last active June 18, 2021 10:29
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

#!/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 February 4, 2019 10:23
Large google docs comments
/*
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 December 3, 2018 15:14
instructions to install dig's riot-web theme
@jbenet
jbenet / dht-interface.go
Created July 11, 2018 00:46
libp2p dht interface
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.
@jbenet
jbenet / keybase.md
Created January 18, 2018 06:15
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 January 7, 2018 21:49
ipfs-archive shell script for adding files, urls, stdin and pinning
#!/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
@jbenet
jbenet / gist:8f000606f2009495c56177f6ca2c19b7
Last active February 13, 2023 02:29
some notes on ideas

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.