Skip to content

Instantly share code, notes, and snippets.

Testing on Umbrel OS (Raspberry Pi 4)

1. We'll first install and run Umbrel OS on a Raspberry Pi 4. Full instructions can be found here. After installation, we'll set it up on http://umbrel.local, and then SSH into the Pi:

ssh umbrel@umbrel.local

(SSH password is the same as your Umbrel's dashboard password)

@d0peman
d0peman / Namebase Bookmarklets.js
Last active October 7, 2023 14:21
Namebase JavaScript Bookmarklets
// Bear in mind these are still not perfect and may not work 100% of the time.
// I set them up to use personally as a quick way to navigate Namebase
// How to use:
// Create a new bookmark, set the name to the comments below
// Set the URL to the javascript
// Go to the appropriate page and try clicking the corresponding bookmarklet. All going well, it should take you to the specified page.
// Domain Page/Listing > Domain Manager
javascript: (() => {const url = window.location.href.split("/"); url.splice(3, 1, "domain-manager"); let new_url = url.join("/"); window.location.assign(new_url)})();
@adilanchian
adilanchian / WavePortal.sol
Last active November 2, 2023 06:07
Section 2: Write and deploy your WavePortal smart contract to a local Ethereum network
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "hardhat/console.sol";
contract WavePortal {
uint256 totalWaves;
constructor() {
@buffrr
buffrr / x509-dane.md
Last active May 24, 2024 19:28
Generate an x509 certificate and a TLSA record with openssl

Creating a self-signed certificate for example.com (if you already have a certificate you can skip this step):

openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes \
  -keyout cert.key -out cert.crt -extensions ext  -config \
  <(echo "[req]"; 
    echo distinguished_name=req; 
    echo "[ext]";
 echo "keyUsage=critical,digitalSignature,keyEncipherment";
const fs = require('fs');
const crypto = require('crypto');
const decB64 = b64 => Buffer.from(b64, 'base64').toString('ascii');
const encB64 = ascii => Buffer.from(ascii).toString('base64');
const saveKeyToFile = (filename, key) =>
fs.writeFileSync(filename, key.export({ type: 'pkcs8', format: 'pem' }));
const loadKeyFromFile = filename => loadRawKey(fs.readFileSync(filename));
const loadRawKey = raw => crypto.createPrivateKey(raw);
@Falci
Falci / parking.js
Last active December 3, 2021 20:44
This script parks a list of domain in parking.sinpapeles. It requires Bob Wallet.
const { WalletClient } = require('hs-client');
const { Network } = require('hsd');
const network = Network.get('main');
// Important: Bob needs to be running
// This is the phrase you use to unlock Bob Wallet.
const passphrase = 'MY PASSPPHASE';
// The list of domains you want to park;
@benjamine
benjamine / README.md
Last active December 9, 2021 22:46
Delete your fork master branch, useful when using feature branches

When working with feature branches, the master branch on your fork becomes useless (you probably base your branches on upstream/master). As a result you fork's master gets outdated, and can lead to mistakes.

Deleting it is a good idea, but github needs a "default branch" to show on website, this script will create an orphan "_default" branch with just an explanatory README.md on it, and set that as default for github (you'll be asked your github password).

DISCLAIMER: This script will delete your master branch locally and remotely, be sure you don't need it anymore before running this!