Skip to content

Instantly share code, notes, and snippets.

# /etc/systemd/system/shovel.service
ExecStart=/bin/bash -c 'source /home/ubuntu/shovel.env; /home/ubuntu/shovel -config /home/ubuntu/shovel.json -l :8546'
ryandotsmith /
Created January 14, 2023 08:29
Setting up Ubuntu LVM Raid 0 with 4 NVMe M.2 Drives
lslbk # find drives to add (eg /dev/nvmeXn1)
pvcreate /dev/nvme1n1
pvcreate /dev/nvme2n1
pvcreate /dev/nvme3n1
pvcreate /dev/nvme4n1
vgcreate vg1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1 /dev/nvme4n1
lvcreate --type=raid0 -l100%FREE -n rd1 vg1
mkfs.ext4 /dev/vg1/rd1
mkdir /storage #customize your mount point
echo '/dev/vg1/rd1 /storage ext4 defaults 0 0' >> /etc/fstab
package ens
import (
func Namehash(name string) common.Hash {
ryandotsmith / .vimrc
Created December 6, 2016 22:47
My Vim Config
syntax off
ryandotsmith /
Last active March 2, 2016 01:24
A simple example of Chain's Java SDK
import com.chain.*;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
public class Main {
private static String projectID = "proj0ACRX7YMG091G";
ryandotsmith / limiter.go
Created July 31, 2015 18:30
HTTP token bucket rate limiting
package main
import (
ryandotsmith /
Last active October 22, 2015 20:14
Chain's Asset Wallet - Creating, Issuing, and Transferring Assets

Tutorial - Creating, Issuing, and Transferring Assets


In this tutorial, we will do the following:

  1. Create an App Wallet
  2. Add the App Wallet Details to the Chain SDK
  3. Create a new Asset in the App Wallet called "Gold Stars"
  4. Create Buckets in the App Wallet for the Treasury and two users - Devon and Ryan
  5. Issue 10 Gold Stars into the Treasury
ryandotsmith / payload.json
Created March 18, 2015 21:15
Chain Notifications Webhook Payload
"id": "94d50194-05c8-48bb-94d1-588edf3d286c",
"sequence": 163201,
"created_at": "2015-03-18T18:18:18.446537Z",
"delivery_attempt": 1,
"notification_id": "2d2f54c4-73c8-415f-88b7-2b13452f6851",
"type": "webhook",
"block_chain": "bitcoin",
"transaction": {
"hash": "da02037c03337c24439be90ff6cab0e4b9dec03cc4dbe08d8863763a52dcc0ef",
ryandotsmith / x.html
Created March 17, 2015 21:11
Sending a transaction in the browser
<!doctype html>
<script src="//"></script>
<p>Balance: <span id="balance"></span></p>
ryandotsmith / ok-http.rb
Created March 17, 2015 03:26
OK, net/http!
require 'json'
require 'net/http'
require 'thread'
require 'openssl'
require 'uri'
module Okhttp
class Conn
def initialize(url)