Skip to content

Instantly share code, notes, and snippets.

View hitchhooker's full-sized avatar
🌴

Tom Mi hitchhooker

🌴
View GitHub Profile
@hitchhooker
hitchhooker / keybase.md
Created February 13, 2018 14:52
keybase.md

Keybase proof

I hereby claim:

  • I am hitchhooker on github.
  • I am hitchhooker (https://keybase.io/hitchhooker) on keybase.
  • I have a public key ASC6oeiZUZzxqPIQ-vVohMYlIkGH6mTHPwDJJFBK04_jSAo

To claim this, I am signing this object:

@hitchhooker
hitchhooker / dk_update.sh
Last active April 17, 2023 08:54
defi kingdom update script
#!/bin/bash
PUBLIC_IP=$(curl -s https://api.ipify.org)
USER=$(whoami)
HOME_DIR=/opt/avalanche
AVA_VERSION=1.10.0
DK_VERSION=0.4.12
GO_VERSION=1.20.3
PRUNING=false
STATESYNC=true
@hitchhooker
hitchhooker / glogin
Created March 16, 2023 10:38
Usage: glogin /path/to/your_service_account.json
#!/bin/bash
function print_usage() {
echo "Usage: "$0" /path/to/your_service_account.json"
echo "Example: "$0" /root/fiery.json"
}
if [ "$#" -eq 0 ] || [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
print_usage
exit 0
@hitchhooker
hitchhooker / chainbench
Last active February 1, 2024 13:30
chainbench
#!/bin/bash
set -e # Exit if any command fails
# Variables for repeated values
fio_testfile="fio_testfile"
fio_output="fio_output.json"
polkadot_bin="polkadot"
# Function to install required tools
@hitchhooker
hitchhooker / clean-install-windows.ps1
Last active May 17, 2023 13:07
clean install windows without usb
# Set the execution policy to allow the script to run.
Set-ExecutionPolicy Bypass -Scope Process -Force
# Download the ISO
$username = [Environment]::UserName
$url = "https://software.download.prss.microsoft.com/dbazure/Win11_22H2_English_x64v1.iso?t=c76bca01-b0fb-45c9-9db9-8db77cf2bca7&e=1684414447&h=e86aeb549973bdf6ebb321c1516ef6194c60ac77a20925beeadf770960f81e7c"
$output = "$([Environment]::GetFolderPath('MyDocuments'))\..\Downloads\windows11.iso"
Invoke-WebRequest -Uri $url -OutFile $output
# Mount the ISO file

Current networks

Network # of Nodes Raw Storage (TB)
Avalanche 2 10.2
Defikingdom 2 7
Evmos 2 14
Evmos (pruned) 1 1.3
Ethereum (erigon) 1 2.5
Ethereum (geth) 1 15.5
Binance (geth full) 2 0.8
@hitchhooker
hitchhooker / carnaval365.sh
Last active June 6, 2023 16:34
certified
# Set VM instance name and zone
VM_NAME=evmos-ganache
ZONE=us-central1-a
DOMAIN=evmos.test.romenet.io
DNS_NAME=romenet-io-zone
VM_IP=your-vm-ip
# Create a managed DNS zone
gcloud dns managed-zones create $DNS_NAME --description="DNS zone for $DOMAIN" --dns-name="$DOMAIN."
Read Latency Statistics in nanoseconds:
-------------------------
Minimum: 480 ns
Maximum: 33820 ns
Mean: 946.457747 ns
Standard Deviation: 239.01481 ns
99.99th Percentile Read Latency: 362 ns
The read latency meets the 2000 ns and lower QoS requirement
@hitchhooker
hitchhooker / ai.com redirector
Created August 4, 2023 18:28
to provide solution against elon musk tyranny of buying my muscle memory. install caddy to your operatiing system and write these config to redirect ai.com without issues to chat.openai.com in your system
#!/bin/bash
# Create a backup of the existing /etc/hosts file
cp /etc/hosts /etc/hosts.backup
# Add the ai.com entry to the /etc/hosts file
echo "127.0.0.1 ai.com" >> /etc/hosts
# Create a Caddyfile with the desired configuration
cat > /etc/caddy/Caddyfile << EOL
@hitchhooker
hitchhooker / alarm.cron
Created August 9, 2023 23:53
crontab alarm clock
# alarm 7.20
20 7 * * * /bin/bash -c 'echo -e "main(i){for(i=0;;i++)putchar(((i*(i>>8|i>>9)&46&i>>8))^(i&i>>13|i>>6));}" | gcc -x c - && ./a.out | aplay'