Skip to content

Instantly share code, notes, and snippets.

@magicstone1412
magicstone1412 / format.hdd
Created October 4, 2021 10:12
Format new HDD drive using command line
# fdisk /dev/sda
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
The size of this disk is 3.7 TiB (4000787030016 bytes). DOS partition table format cannot be used on drives for volumes larger than 2199023255040 bytes for 512-byte sectors. Use GUID partition table format (GPT).
Created a new DOS disklabel with disk identifier 0x5644fbf2.
name: Build & Deploy Hugo Static Site to Backblaze B2
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
deploy:
runs-on: ubuntu-latest
// from https://maltechx.de/en/2020/06/host-static-page-on-backblaze-with-cloudflare-workers/
// Backblaze Url
const baseURL = "https://f000.backblazeb2.com/file/skywirex"
addEventListener('fetch', event => {
event.respondWith(handleRequest(event))
})
async function handleRequest(event) {
{
"version": "v1.0.1",
"sk": "cae32fbbe5429d1b6e98965a1cf73e1534606f5b6b1eebdda49ef1a2e5a435f7",
"pk": "03f89b7d5749cffed7fca691478ac846076e45925c8bc0aad609ffad40e640ee6a",
"dmsg": {
"discovery": "http://dmsgd.skywire.skycoin.com",
"sessions_count": 1
},
"dmsgpty": {
"port": 22,
{
"version": "v1.0.1",
"sk": "aa329ebbf739befbdf702721247844f756fd20cf617ce42374c5aa296d66a95b",
"pk": "03c6de10e5453a93298e2968c7175dac7ff583d29406277161b6519e0851e277f3",
"dmsg": {
"discovery": "http://dmsgd.skywire.skycoin.com",
"sessions_count": 1
},
"dmsgpty": {
"port": 22,
@magicstone1412
magicstone1412 / akash-query-market-lease-list.json
Created June 26, 2021 08:09
Results of akash command "akash-query-market-lease-list"
leases:
- escrow_payment:
account_id:
scope: deployment
xid: akash1he4e66pt83cx4vk4ecyr0vnwpg8k8jnlxtw2dh/1496015
balance:
amount: "0"
denom: uakt
owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7
payment_id: 1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7
@magicstone1412
magicstone1412 / docker-compose.yml
Created June 13, 2021 15:27
Handshake dns resolver with adguardhome
version: "3"
services:
hsd:
container_name: hsd
image: skywirex/hsd:<tag> # see tags at https://hub.docker.com/r/skywirex/hsd/tags
volumes:
- '/home/ubuntu/docker_data/hsd:/root/.hsd' # change your path </home/ubuntu/docker_data/hsd>
network_mode: "host"
command:
@magicstone1412
magicstone1412 / UFW_ban_country.md
Created June 2, 2021 15:19 — forked from jasonruyle/UFW_ban_country.md
UFW to block countries
@magicstone1412
magicstone1412 / wireguard
Last active December 12, 2021 23:17
Start all wireguard tunnels with wg-quick
#!/sbin/openrc-run
# Nico Schottelius, 2020-07-02
# Start all wireguard tunnels with wg-quick
# Copying: GPLv2 or later
do_wireguard() {
action=$1
[ -d /etc/wireguard ] || exit 0

Upgrade nodejs to v12.x.x

$ sudo npm install -g n
$ sudo n lts

Install hsd