Skip to content

Instantly share code, notes, and snippets.

@topjor
topjor / output1.sh
Created January 28, 2020 10:46
Positional values
./test
test
Usage:
test [start] [positionalVar]
Positional Variables:
positionalVar A test positional flag (Required)
Subcommands:
start Start
Flags:
--version Displays the program version string.
@topjor
topjor / wg.sh
Created February 7, 2019 20:44
Wireguard firmware sustain script
#!/bin/bash -e
BOARD=e300
if [ ! $(dpkg-query --show wireguard) ]; then
tag=$(curl "https://api.github.com/repos/Lochnair/vyatta-wireguard/releases" | jq -r '.[0].tag_name')
deb_url="https://github.com/Lochnair/vyatta-wireguard/releases/download/$tag/wireguard-$BOARD-$tag-1.deb"
curl -L -o "/tmp/wireguard-$BOARD-$tag.deb" "$deb_url"
dpkg -i "/tmp/wireguard-$BOARD-$tag.deb"
rm "/tmp/wireguard-$BOARD-$tag.deb"
source /opt/vyatta/etc/functions/script-template
configure
@topjor
topjor / keybase.md
Last active August 29, 2015 14:15
keybase proof

Keybase proof

I hereby claim:

  • I am topjor on github.
  • I am topjor (https://keybase.io/topjor) on keybase.
  • I have a public key whose fingerprint is 6A04 8CA3 EF68 EB91 E2C3 2419 62DD 9B8D 2AEA FF72

To claim this, I am signing this object: