- Install the Git webhook for Push to Deploy
- Custom headers (!!) NEEDS [ ] STATIC to be DISABLED even if static, example: https://github.com/WietseWind/iPubXahau-Homepage
- Make sure you have the nixpacks.toml and the .nix folder, the custom headers (nginx format) are in the .nix folder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE!! DO THIS ONE BY ONE, IT FAILS IF TWO NODES TRY TO JOIN AT THE SAME TIME! | |
# Clear join (back to standalone) | |
systemctl stop pve-cluster corosync | |
pmxcfs -l | |
rm /etc/corosync/* | |
rm /etc/pve/corosync.conf | |
killall pmxcfs | |
systemctl start pve-cluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Eg run @ https://www.programiz.com/java-programming/online-compiler/ | |
// data: 48 65 6C 6C 6F 20 57 6F 72 6C 64 | |
// CRC-16: 52 7B | |
class Main { | |
public static byte[] calculateCRC16(byte[] bytes) { | |
byte chBlock; | |
int wCRC = 0x6363; | |
int i = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PORT=12345 | |
RESULTS_DIR="udp_receiver_results_$(date +%Y%m%d_%H%M%S)" | |
mkdir -p "$RESULTS_DIR" | |
echo "Starting UDP fragmentation test - Receiver" | |
echo "----------------------------------------" | |
echo "Port: $PORT" | |
echo "Results directory: $RESULTS_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install | |
# sudo curl https://gist.githubusercontent.com/WietseWind/5ef71f7a26d9588a233f1d034762ac84/raw/dlvr.sh > /usr/local/bin/dlvr | |
# sudo chmod +x /usr/local/bin/dlvr | |
# Use: dlvr somefilename | |
DLVR_INIT=$(curl -i -s https://dlvr.cloud/api.php) | |
DLVR_SESSION=$(echo "$DLVR_INIT"|grep session|grep addr|grep domain|jq .session|cut -d '"' -f 2) | |
DLVR_ADDR=$(echo "$DLVR_INIT"|grep session|grep addr|grep domain|jq .addr|cut -d '"' -f 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetch from 'node-fetch' | |
import { XrplDefinitions, derive, sign } from 'xrpl-accountlib' | |
const now = new Date() | |
const Server = 'https://xahau-test.net' // can be testnet, xahau-test.net / xahau.network | |
const secret = '{sender secret}' // can be RK secret | |
const Account = derive.familySeed(secret) | |
Account.address = '{sender account r-address}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Access: http://{ip}/script/1/prtg | |
HTTPServer.registerEndpoint('prtg', function (request, response) { | |
response.headers = [ | |
['content-type', 'application/json'] | |
] | |
const em = Shelly.getComponentStatus('switch', 0) | |
const ip = Shelly.getComponentStatus('input', 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shelly: Scripts - create prtg.js with contents below - Start - Scripts main page: "Run on start" | |
// Call with (assuming the first script): http://{shellyip}/script/1/prtg | |
// PRTG: Import HTTP Data Advanced sensor. | |
HTTPServer.registerEndpoint('prtg', function (request, response) { | |
response.headers = [ | |
['content-type', 'application/json'] | |
] | |
const em = Shelly.getComponentStatus('em', 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetch from 'node-fetch' | |
import { hookStateXLFtoBigNumber } from './xfl.mjs' | |
// Credits: https://github.com/tequdev/xahau-reward-claim/blob/main/src/app/ClaimReward.tsx | |
const account = 'rTeLeproT3BVgjWoYrDYpKbBLXPaVMkge' | |
const RPC_ENDPOINT = 'https://xahau.network' | |
const toUnixTimestamp = ts => ts + 946684800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { getPubKey, xflHexToString } from "./statelib.mjs"; | |
const main = async () => { | |
console.log(getPubKey(process.argv[2])); | |
const options = { | |
method: "POST", | |
headers: { | |
"Content-Type": "application/json", | |
}, | |
body: JSON.stringify({ |
NewerOlder