Skip to content

Instantly share code, notes, and snippets.

View jbenet's full-sized avatar

Juan Benet jbenet

View GitHub Profile

Here is an essay version of my class notes from Class 1 of CS183: Startup. Errors and omissions are my own. Credit for good stuff is Peter’s entirely.

CS183: Startup—Notes Essay—The Challenge of the Future

Purpose and Preamble

#!/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.

sftp user

So you want to configure an sftp only user?

Setup a group for sftp only users

groupadd sftponly

Make chroot jail directory

@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 / propose-ipfs-pack.md
Created December 23, 2016 11:47
ipfs-pack and friends

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)
@jbenet
jbenet / inst.md
Last active December 3, 2018 15:14
instructions to install dig's riot-web theme
@jbenet
jbenet / UIControl+CaptureUIControlEvents.h
Created August 8, 2010 09:00
UIControl Category to capture and save UIControlEvents flag to its own tag
// The MIT License
//
// Copyright (c) 2010 Juan Batiz-Benet
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@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-cluster-addr.go
Created December 30, 2016 23:02
ipfs-cluster-addr.go
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"os"
"os/user"