Skip to content

Instantly share code, notes, and snippets.

@magicstone1412
magicstone1412 / format.hdd
Created Oct 4, 2021
Format new HDD drive using command line
View format.hdd
# 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.
View build-deploy-hugo-static-site-to-backblaze-b2
name: Build & Deploy Hugo Static Site to Backblaze B2
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
deploy:
runs-on: ubuntu-latest
View cloudflare-worker-for-backblaze-static-site
// 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) {
View hypervisor-config.json
{
"version": "v1.0.1",
"sk": "cae32fbbe5429d1b6e98965a1cf73e1534606f5b6b1eebdda49ef1a2e5a435f7",
"pk": "03f89b7d5749cffed7fca691478ac846076e45925c8bc0aad609ffad40e640ee6a",
"dmsg": {
"discovery": "http://dmsgd.skywire.skycoin.com",
"sessions_count": 1
},
"dmsgpty": {
"port": 22,
View visor-config.json
{
"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 Jun 26, 2021
Results of akash command "akash-query-market-lease-list"
View akash-query-market-lease-list.json
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 Jun 13, 2021
Handshake dns resolver with adguardhome
View docker-compose.yml
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:
View UFW_ban_country.md
@magicstone1412
magicstone1412 / wireguard
Last active May 20, 2021
Start all wireguard tunnels with wg-quick
View wireguard
#!/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
View hns-pi.md

Upgrade nodejs to v12.x.x

$ sudo npm install -g n
$ sudo n lts

Install hsd