Skip to content

Instantly share code, notes, and snippets.

@buzzkillb
buzzkillb / installnode.txt
Last active April 28, 2023 00:25
install nodejs ubuntu ez
wget https://nodejs.org/dist/v20.0.0/node-v20.0.0-linux-x64.tar.xz
sudo apt-get install xz-utils
sudo tar -C /usr/local --strip-components 1 -xJf node-v20.0.0-linux-x64.tar.xz
echo "kill -9 denariusd"
ps -ef | grep 'denariusd' | grep -v grep | awk '{print $2}' | xargs -r kill -9
echo "sleep 2 seconds"
sleep 2
@buzzkillb
buzzkillb / getAnchorBalance.js
Created April 30, 2022 04:59 — forked from tstachl/getAnchorBalance.js
Google App Script to get Anchor Protocol Earn balance for a terra wallet address.
function getAnchorBalance(addr) {
const contract = 'terra1hzh9vpxhsk8253se0vv5jj6etdvxu3nv8z07zu';
const aUstBalance = JSON.parse(JSON.parse(UrlFetchApp.fetch("https://mantle.terra.dev/?cw20--balance=" + contract, {
method: 'post',
headers: { 'Accept-Encoding': 'gzip, deflate, br', 'Content-Type': 'application/json', 'Accept': 'application/json' },
payload: JSON.stringify({
operationName: null,
variables: {},
query: `{\n ${contract}: WasmContractsContractAddressStore(ContractAddress: \"${contract}\", QueryMsg: \"{\\\"balance\\\":{\\\"address\\\":\\\"${addr}\\\"}}\") {\n Height\n Result\n __typename\n }\n}\n`
})
#unifi controller installer for Proxmox Focal Ubuntu 20.04 Template Container
#https://help.ui.com/hc/en-us/articles/220066768-UniFi-How-to-Install-and-Update-via-APT-on-Debian-or-Ubuntu
#https://github.com/linuxserver/docker-unifi-controller/blob/master/Dockerfile
#Install
sudo apt-get update && sudo apt-get install ca-certificates apt-transport-https mongodb-server openjdk-8-jre-headless
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
sudo apt-mark hold openjdk-11-*
#Qubes OS - Asus Zephyrus or other similar PC that can't see Ledger since no default sys-usb Qube
#https://www.qubes-os.org/doc/how-to-use-usb-devices/#finding-the-right-usb-controller
#list devices
lsusb
#find ledger in list, shows on Bus 003
readlink /sys/bus/usb/devices/usb3
#look at ending 04:00.4/usb3
#use dom0:04_00.4
qvm-pci attach --persistent personal dom0:04_00.4
#If that doesn't work, go into Qube Personal appVM Qube Settings, advanced tab -> uncheck include in memory balancing, change Mode to HVM, Devices tab -> right arrow on the 04:00.4 USB controller

Reset plextraktsync token in UnRaid docker container

https://github.com/Taxel/PlexTraktSync#unraid-setup

I had my IP address of UnRaid server change as I setup a new router, and messed up the original token ip address of my plex server, breaking plextraktsync plex token. Probably an issue for those not using static IP on their UnRaid server. This may or may not work, worth a try if it stops working. =p

go to your plextraktsync container data path in Terminal, ssh, putty, etc.
cd /mnt/user/appdata/plextraktsync

move original token json file for backup, before starting the plextraktsync container
mv .pytrakt.json .pytrakt.JSON