Skip to content

Instantly share code, notes, and snippets.

@tyzbit
tyzbit / hosts
Last active August 6, 2023 13:16
Windows 10 Ad/Telemetry (for https://github.com/StevenBlack/hosts/)
127.0.0.1 a-0001.a-msedge.net
127.0.0.1 a-0001.dc-msedge.net
127.0.0.1 a-0002.a-msedge.net
127.0.0.1 a-0003.dc-msedge.net
127.0.0.1 a-0004.a-msedge.net
127.0.0.1 a-0005.a-msedge.net
127.0.0.1 a-0006.a-msedge.net
127.0.0.1 a-0007.a-msedge.net
127.0.0.1 a-0008.a-msedge.net
127.0.0.1 a-0009.a-msedge.net
@tyzbit
tyzbit / simnet-cluster.sh
Last active April 24, 2018 07:41
Create Simnet clusters
#!/bin/bash
export NETWORK="simnet"
topologies=(
"twonodes"
"threenodes"
"ninenodes"
)
nodenames=(
#!/bin/bash
nodenames=(
"alice"
"bob"
"charlie"
"derek"
"emily"
"frank"
"gina"
@tyzbit
tyzbit / Docker Style Guide.md
Created May 10, 2018 18:23
Docker Style Guide

Docker Style Guide

This is meant as a non-exhaustive set of tips to writing clean, usable Dockerfiles.

Before you start

It's assumed you're at least a little familiar with Docker's best practices document, especially using multi-stage builds. This is meant not to replace, but augment. I will reiterate some of these points to point out particularly useful or powerful conventions.

Minimize your layers as much as possible

@tyzbit
tyzbit / Dockerfile
Created February 24, 2019 22:31
Lightweight SCP/rsync Dockerfile
FROM debian:stable-slim
RUN apt-get update
RUN apt-get install -y openssh-server rssh rsync \
&& rm -f /etc/ssh/ssh_host_*
RUN useradd --uid 1000 --no-create-home --shell /usr/bin/rssh data \
&& mkdir /home/data \
&& chown data: /home/data \
&& chmod 0700 /home/data
2019-05-29 22:54:48.575 [INF] CRTR: Block 00000000000e9ffef52617b32890f73386d9ba664f83ca9a35974f29837469e5 (height=1518933) closed 0 channels
2019-05-29 22:54:48.579 [INF] NTFN: New block: height=1518933, sha=00000000000e9ffef52617b32890f73386d9ba664f83ca9a35974f29837469e5
2019-05-29 22:54:48.583 [INF] UTXN: Attempting to graduate height=1518933: num_kids=0, num_babies=0
2019-05-29 22:55:03.876 [INF] WTCL: Client stats: tasks(received=0 accepted=0 ineligible=0) sessions(acquired=0 exhausted=0)
2019-05-29 22:55:03.876 [INF] WTCL: Requesting new session.
2019-05-29 22:55:04.292 [INF] DISC: Broadcasting batch of 1 new announcements
2019-05-29 22:55:33.876 [INF] WTCL: Client stats: tasks(received=0 accepted=0 ineligible=0) sessions(acquired=0 exhausted=0)
2019-05-29 22:55:33.876 [INF] WTCL: Requesting new session.
2019-05-29 22:56:03.876 [INF] WTCL: Client stats: tasks(received=0 accepted=0 ineligible=0) sessions(acquired=0 exhausted=0)
2019-05-29 22:56:03.876 [INF] WTCL: Requesting new session.

I created channel with 2,000,000 locally between nodes 1 and 2

I sent 1,000,000 from node 1 to node 2

I then backed up node 2

Then I sent 1,000 from node 2 to node 1

{
    "channels": [

Keybase proof

I hereby claim:

  • I am tyzbit on github.
  • I am tyzbit (https://keybase.io/tyzbit) on keybase.
  • I have a public key ASDitFxNNtihhEtd0KEzr4NzJdLeNhEYsjCMS3lSdN-mYQo

To claim this, I am signing this object:

@tyzbit
tyzbit / browse_fwdinghistory.sh
Created June 29, 2019 03:37
Use arrow keys to browse through your LND's forwarding history
#!/bin/bash
## change if necessary to point to your node
lncli="lncli --rpcserver localhost:10009"
function fwdinghistory() {
$lncli fwdinghistory \
--start_time=$start \
--end_time=$end \
--index_offset=$offset \
@tyzbit
tyzbit / block-images-rbitcoin.json
Last active June 30, 2019 01:31
Block fluff content from /r/Bitcoin in RES. Import each line individually into RES.
{"note":"/r/Bitcoin: filter Reddit images","ver":3,"id":"customFilter-1561763481594","body":{"type":"group","op":"all","of":[{"type":"subreddit","patt":"Bitcoin"},{"type":"domain","patt":"i.redd.it"}]},"opts":{"ondemand":false,"name":""}}
{"note":"/r/Bitcoin: filter Reddit videos","ver":3,"id":"customFilter-1561766580976","body":{"type":"group","op":"all","of":[{"type":"subreddit","patt":"Bitcoin"},{"type":"domain","patt":"v.redd.it"}]},"opts":{"ondemand":false,"name":""}}
{"note":"/r/Bitcoin: filter Imgur images","ver":3,"id":"customFilter-1561763701851","body":{"type":"group","op":"all","of":[{"type":"subreddit","patt":"Bitcoin"},{"type":"domain","patt":"imgur.com"}]},"opts":{"ondemand":false,"name":""}}
{"note":"/r/Bitcoin: filter Gyazo images","ver":3,"id":"customFilter-1561822434623","body":{"type":"group","op":"all","of":[{"type":"subreddit","patt":"Bitcoin"},{"type":"domain","patt":"i.gyazo.com"}]},"opts":{"ondemand":false,"name":""}}