Skip to content

Instantly share code, notes, and snippets.

Fuck blockchain?

I worked at cryptovoxels for a few months late last year. I quit because I couldn't live with myself after looking into cryptocurrencies. I went into it skeptical, but with an open mind. We put into my contract that my contract would end after 1 year if Etherium hadn't moved from proof of work to proof of stake. At the time, Ben said that would happen in a few months. Now that I've read more I don't think it will ever happen.

Ben Nolan, the founder of cryptovoxels just tweeted this and it's spurred me to respond.

I love all the people that tell me to get fucked because we're in the crypto / NFT space.

  1. We're into user sovereignty
  2. We hate speculation

Bamboo CLI

Setup

  • Clone https://github.com/pietgeursen/bamboo-rs
  • Checkout branch bamboo-commit-388bafe
  • $ cd bamboo-cli
  • cargo build --release
  • Maybe copy the binary into your bin folder so it's on your path and easier to use. $ cp ../target/release/bamboo-cli <somewhere>
use base64::{decode, DecodeError};
use regex::Regex;
use snafu::{OptionExt, ResultExt, Snafu};
use ssb_multiformats::multikey::Multikey;
use std::net::{AddrParseError, IpAddr};
use std::num::ParseIntError;
use std::str::FromStr;
use url::{ParseError, Url};
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
use std::net::*;
use std::io;
const SEND_PORT: u16 = 24254;
const RECEIVE_PORT: u16 = 24255;
fn main() {
let send_address = format!("255.255.255.255:{}", SEND_PORT);
let receive_address = format!("255.255.255.255:{}", RECEIVE_PORT);

Install Rust + VS Code + Plugins

Get the rust toolchain installer

Go to rustup download the installer for windows (not the curl script)

When the installer runs, it tells you to add the cargo path to your PATH env. Make sure you do that!

You should now be able to run these commands in your terminal:

{
"forms": [
{
"enabled": true,
"fields": [
{
"allowMultiple": false,
"dataRef": "entityType",
"errors": {
"required": "This field is required"
@pietgeursen
pietgeursen / quadrature_decoder.c
Created October 23, 2017 07:08
Quadrature decoder function.
int32_t get_quad_direction(uint32_t prev, uint32_t latest){
return ((prev >> 1) ^ (latest & 0b01)) == 1 ? -1 : 1;
}

Connect

Start gdb server

JLinkGDBServer -device NRF51 -if SWD

Start gdb

arm-none-eabi-gdb /*.out 
@pietgeursen
pietgeursen / test-bay.md
Created April 7, 2017 10:27
How to spin up a dev version of patchbay

Make the temp directory and copy the sbot plugins + config

mkdir ~/.test
cp ~/.ssb/config ~/.test/config
cp ~/.ssb/node_modules ~/.test/node_modules

Start the server ssb_appname=test sbot server

'use strict';
const dotenv = require('dotenv')
const geocoder = require('geocoder');
const Rx = require('rx')
const {Observable} = Rx
const {create, fromEvent, fromNodeCallback} = Observable
// load environment variables
dotenv.load()