Skip to content

Instantly share code, notes, and snippets.

View arno01's full-sized avatar
🎯
Focusing

Andrey Arapov arno01

🎯
Focusing
View GitHub Profile
---
version: "2.0"

services:
  ssh:
    image: ubuntu:22.04
    env:
      - 'SSH_PUBKEY=ssh-rsa AAAAB3Nza......'
    command:

List all regions

$ akash query provider list --limit 1000 -o json | jq -r '.providers[] | (.attributes[] | select(.key == "region") | .value)' | sort | uniq -c | sort -n
      1 ap-northeast-1
      1 ap-southeast
      1 australia-east-akash-provider
      1 Chicago
      1 cz-prague
      1 cz-prague2
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x15380b3]

goroutine 112 [running]:
github.com/cosmos/cosmos-sdk/x/upgrade.BeginBlocker({{0xc00013ab80, 0xc}, 0xc00113fda0, {0x308b7f0, 0xc00131ef60}, {0x311ffd8, 0xc00131f110}, 0xc001380f90, {0x3070bc0, 0xc001185520}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.1/x/upgrade/abci.go:38 +0x1093
github.com/cosmos/cosmos-sdk/x/upgrade.AppModule.BeginBlock(...)
	github.com/cosmos/cosmos-sdk@v0.45.1/x/upgrade/module.go:130
github.com/cosmos/cosmos-sdk/types/module.(*Manager).BeginBlock(_, {{0x30d4468, 0xc0000520c0}, {0x3127000, 0xc004213900}, {{0xb, 0x0}, {0xc003ae5060, 0xa}, 0x5548a6, ...}, ...}, ...)

Simple VPN over SSH with shuttle in Akash

ssh server

  • deploy.yaml:
---
version: "2.0"
@arno01
arno01 / trying-SoftEtherVPN.md
Last active April 3, 2022 11:23
Trying SoftEtherVPN

Still errors. I believe python3.5 is way too old for the Ansible. I suggest latest stable Ubuntu version.

sudo apt update
sudo apt -y install git python3-venv locales gcc libffi-dev libssl-dev python3-dev
sudo locale-gen en_US.UTF-8

export LC_ALL=en_US.UTF-8
curl -k -X GET \
-H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \
https://$KUBERNETES_PORT_443_TCP_ADDR:$KUBERNETES_SERVICE_PORT_HTTPS
---
version: "2.0"

services:
  sshd:
    image: ubuntu:21.10
    env:
      - 'SSH_PUBKEY=ssh-rsa AAAAB3...YOUR_PUBLIC_SSH_KEY ogp8='
    command:
$ akash query bank total | jq -r '.supply[] | [.denom, .amount] | @tsv' | while read denom amount; do [ ${denom:0:3} = "ibc" ] && { buf=$(akash query ibc-transfer denom-trace ${denom:4}); r_denom=$(echo "$buf" | jq -r '.denom_trace.base_denom'); path=$(echo "$buf" | jq -r '.denom_trace.path'); } || r_denom=$denom; echo $r_denom $amount $path; done | column -t
uakt                                                                  1000000              transfer/channel-17/transfer/channel-192/transfer/channel-2
uakt                                                                  360234656            transfer/channel-17/transfer/channel-141/transfer/channel-1
ujuno                                                                 100000               transfer/channel-24/transfer/channel-14
uakt                                                                  10000000             transfer/channel-26/transfer/channel-1
ujuno                                                                 1128                 tran