Skip to content

Instantly share code, notes, and snippets.

@magicstone1412
magicstone1412 / keybase.md
Created September 25, 2017 05:38
keybase verification

Keybase proof

I hereby claim:

  • I am magicstone1412 on github.
  • I am magicstone1412 (https://keybase.io/magicstone1412) on keybase.
  • I have a public key ASAui19LWvgbkP3wR-7uvt7hX3CHsdXCvtlE3472P7NzmAo

To claim this, I am signing this object:

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@magicstone1412
magicstone1412 / README.md
Created March 4, 2019 15:49 — forked from lifehome/README.md
Cloudflare API v4 Dynamic DNS Update in Bash

Cloudflare DDNS bash client with systemd

This is a bash script to act as a Cloudflare DDNS client, useful replacement for ddclient.

How to use?

  1. Put the cfupdater files to /usr/local/bin
  • If you are using IPv4 for A record, append -v4 to cfupdater in the following systemd service unit.
  • If you are using IPv6 for AAAA record, append -v6 to cfupdater in the following systemd service unit.
  • If you prefer a dual-stack record, append -dualstack to cfupdater in the following systemd service unit.
  1. chmod +x /usr/local/bin/cfupdater
  2. Create a systemd service unit at /etc/systemd/system/, the cfupdate.service is shown as an example.

Upgrade nodejs to v12.x.x

$ sudo npm install -g n
$ sudo n lts

Install hsd

@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
@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 / 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 / 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
{
"version": "v1.0.1",
"sk": "aa329ebbf739befbdf702721247844f756fd20cf617ce42374c5aa296d66a95b",
"pk": "03c6de10e5453a93298e2968c7175dac7ff583d29406277161b6519e0851e277f3",
"dmsg": {
"discovery": "http://dmsgd.skywire.skycoin.com",
"sessions_count": 1
},
"dmsgpty": {
"port": 22,
{
"version": "v1.0.1",
"sk": "cae32fbbe5429d1b6e98965a1cf73e1534606f5b6b1eebdda49ef1a2e5a435f7",
"pk": "03f89b7d5749cffed7fca691478ac846076e45925c8bc0aad609ffad40e640ee6a",
"dmsg": {
"discovery": "http://dmsgd.skywire.skycoin.com",
"sessions_count": 1
},
"dmsgpty": {
"port": 22,