Skip to content

Instantly share code, notes, and snippets.

View heapwolf's full-sized avatar
🕷️
Vault of the Black Spiders

heapwolf heapwolf

🕷️
Vault of the Black Spiders
View GitHub Profile
@heapwolf
heapwolf / realtime.js
Created January 27, 2024 15:41
socket runtime realtime demo
import { network, Encryption } from 'socket:network'
import process from 'socket:process'
import Buffer from 'socket:buffer'
import fs from 'socket:fs'
window.onload = async () => {
const peerId = await Encryption.createId()
const signingKeys = await Encryption.createKeyPair()
const clusterId = await Encryption.createClusterId('asdfasdfasdfasdfas') // change this!

Hey Kyle, enjoyed the discussion, especially the stuff you're doing at socket supply.

I'm definitely a fan of decentralization. Building the decentralized internet is one of the main plot points of HBO's Silicon Valley, and even though it's comedy, it definitely resonated as a good idea.

In this decentralized model, how do you replicate some of the advantages of the cloud though? Redundancy, reliability, latency improvements from having multiple cloud regions? The decentralized social network example, that puts a huge amount of responsibility on the users, most of whom are not tech savvy, to maintain multiple backups of their data to prevent loss of say their photos, which is presently solved for them by having them backed up to icloud or Instagram or whatever.

I think in the silicon valley show, they built the decentralized internet by essentially making the entire p2p network a fault tolerant, redundant distributed data store. It would need some smart solutions for identity and access manageme

@heapwolf
heapwolf / evented-p2p.js
Created April 15, 2023 20:20
real time streaming p2p demo with socket runtime
import { Peer } from 'socket:peer'
import process from 'socket:process'
import Buffer from 'socket:buffer'
import fs from 'socket:fs'
window.onload = async () => {
const clusterId = '14ecd42...' // truncated, make your own clusterId
const publicKeyHex = 'c43c1ddd...' // truncated, make your own hex encoded key
const privateKeyHex = '46adc2f8e9077c72...' // truncated, make your own hex encoded key
@heapwolf
heapwolf / 2.md
Last active February 2, 2023 08:06
Install node.js using wget

Socket Runtime is like a next-generation Electron.

It runs on Linux, Mac, and Window, but also iOS and Android!

It produces 200% smaller binaries and uses half the memory.

Build one codebase with html, css and javascript and run it anywhere.

Check it out here - https://github.com/socketsupply/socket

@heapwolf
heapwolf / gfl-interview.md
Created November 17, 2022 15:47
Interview with gfl

1. Can you share a quick summary of who you are and a bit about your background?

In 2010 I left MIT to found my first startup, a Platform-As-A-Service called Nodejitsu. Since then i've had some interesting successes and failures. But I've been working on infrastructure and developer tools for over a decade. But i've been involved in P2P communities for over 15 years.

2. What founder do you look up to the most and why? (Choose 1 - it can’t be Elon Musk).

I avoid that sort of thing. I try to listen to people objectively and decide if what they're doing and saying makes sense. But at the end of the day, founders are just contributors. And a founder is nothing without a team. So if I can say what teams I look up to, I think Tailscale, Oxide Computer. These are remarkable teams. I definitely get inspired by their work. They're solving hard, meaningful problems that drive the field of computing forward.

STRIP(1)		     General Commands Manual			STRIP(1)



NAME
       strip - remove symbols

SYNOPSIS
       strip [ option ] name ...
@heapwolf
heapwolf / top.html.md
Created December 27, 2021 15:08
The quick and simple http server

Get top from http://localhost:8081 (on linux use top -n 1).

while :; do nc -l 8081 <<EOF
HTTP/1.1 200 OK
Content-Type: text/html

<pre>`top -l 1`</pre>
EOF
@heapwolf
heapwolf / tmux.conf
Created December 4, 2021 19:19
tmux conf
set -g default-shell /bin/zsh
set -g prefix C-a
unbind-key C-b
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
#
# New splits should start with the same cwd
@heapwolf
heapwolf / base16-grayscale-dark.vim
Created December 4, 2021 18:52
base16-grayscale-dark
" vi:syntax=vim
" base16-vim (https://github.com/chriskempson/base16-vim)
" by Chris Kempson (http://chriskempson.com)
" Grayscale Dark scheme by Alexandre Gavioli (https://github.com/Alexx2/)
" This enables the coresponding base16-shell script to run so that
" :colorscheme works in terminals supported by base16-shell scripts
" User must set this variable in .vimrc
" let g:base16_shell_path=base16-builder/output/shell/
@heapwolf
heapwolf / init.vim
Created December 4, 2021 18:31
neovim
" / __
" / / \/ / / . \/ / /\/\
"
"
" GENERAL
" -------
"
set autoread " check for changes automatically
au CursorHold * checktime " reload the changes once idle