Skip to content

Instantly share code, notes, and snippets.

View arbal's full-sized avatar
👌
new Adaptor(this); // new Adaptor(_humans[].Behavior);

Arbal arbal

👌
new Adaptor(this); // new Adaptor(_humans[].Behavior);
  • Los Angeles, CA
  • 11:32 (UTC -07:00)
View GitHub Profile

Mount Volumes into Proxmox VMs with Virtio-fs

Part of collection: Hyper-converged Homelab with Proxmox

Virtio-fs is a shared file system that lets virtual machines access a directory tree on the host. Unlike existing approaches, it is designed to offer local file system semantics and performance. The new virtiofsd-rs Rust daemon Proxmox 8 uses, is receiving the most attention for new feature development.

Performance is very good (while testing, almost the same as on the Proxmox host)

VM Migration is not possible yet, but it's being worked on!

@arbal
arbal / job_control_zsh_bash.md
Created October 27, 2023 20:38 — forked from CMCDragonkai/job_control_zsh_bash.md
CLI: Job Control in ZSH and Bash

Job Control in ZSH and Bash

All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.

# run command in the foreground
command
# run commend in the background
@arbal
arbal / skeleton-daemon.sh
Created October 6, 2023 07:49 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"
@arbal
arbal / install_node.sh
Created October 5, 2023 16:39
Install node
#!/usr/bin/env bash
set -euo pipefail
# confirm the version of Ubuntu is supported
lsb_release -a
# should show Ubuntu version 20 or higher
# Update APT
sudo apt-get update
@arbal
arbal / retry.sh
Created September 18, 2023 15:32 — forked from reacocard/retry.sh
Bash retry function with exponential backoff.
#!/usr/bin/env bash
# This software is freely available under the Apache 2.0 license.
# Full license available here: https://www.apache.org/licenses/LICENSE-2.0.txt
set -o errexit
set -o nounset
set -o pipefail
# Retry a command on a particular exit code, up to a max number of attempts,
#!/bin/sh
# /etc/config/show_wifi_clients.sh
# Shows MAC, IP address and any hostname info for all connected wifi devices
# written for openwrt 12.09 Attitude Adjustment
echo "# All connected wifi devices, with IP address,"
echo "# hostname (if available), and MAC address."
echo -e "# IP address\tname\tMAC address"
@arbal
arbal / show_wifi_clients.sh
Created September 6, 2023 21:07 — forked from c4mx/show_wifi_clients.sh
OpenWrt show connected clients
#!/bin/sh
# show_wifi_clients.sh
# Shows MAC, IP address and any hostname info for all connected wifi devices
# modification based on https://openwrt.org/faq/how_to_get_a_list_of_connected_clients
echo "# All connected wifi devices, with IP address,"
echo "# hostname (if available), and MAC address."
printf "%-15s %-15s %15s\n" "IP address" "Host" "MAC"
@arbal
arbal / hung.m
Created July 27, 2023 16:01 — forked from kkirby/hung.m
Updated NonResponding
/**
* compile using this:
* gcc -framework Carbon -framework Foundation ./hung.m -o hung
*
* Referenced from https://apple.stackexchange.com/a/424763/260619
* Original source code https://github.com/jksoegaard/NonResponding
* Original Author: jksoegaard
**/
#import <Foundation/Foundation.h>
@arbal
arbal / README.md
Created June 23, 2023 06:52 — forked from HosseyNJF/README.md
Delete data from exported time-series from Prometheus / VictoriaMetrics in a time range.

Usage

Note that the response cache must be deleted after these steps in order to remove previously cached results - see more details here.

@arbal
arbal / bitcoin_fast_sync_ideas.md
Created June 22, 2023 23:30 — forked from bensig/bitcoin_fast_sync_ideas.md
Fast Sync Bitcoin Node - 3 Options

Option 1 - Use This Bitcoin Fast Sync Command

There is no torrent which would be faster than just using the Bitcoin network "hive" - which is huge. There may be a way to sync using local or low-latency nodes nearby, but any time you specify which nodes you sync from - it introduces risk.

Very good to have a fast CPU and lots of RAM, SSD is not as important as RAM.

With this command I was able to download the entire blockchain and create all indices in almost exactly 24 hours:

bitcoind --datadir=<path-to-external-ssd> -blockfilterindex=1 -txindex=1 -coinstatsindex=1 -dbcache=16384 -daemon If you have 32GB of RAM, you can use 32768 for dbcache