Skip to content

Instantly share code, notes, and snippets.

View arvati's full-sized avatar
💭
Studying online

Ademar Arvati arvati

💭
Studying online
View GitHub Profile
@arvati
arvati / .mosquitto.md
Last active December 25, 2025 05:52
Config mosquitto openwrt mqtt broker
opkg update
Collected errors:
 * opkg_conf_load: Could not lock /var/lock/opkg.lock: Resource temporarily unavailable.
echo "nameserver 8.8.8.8">/tmp/resolv.conf
rm -f /var/lock/opkg.lock
@arvati
arvati / Transferir WSL de uma máquina para outra.md
Last active September 9, 2024 19:08
Transferir WSL de uma máquina para outra
@arvati
arvati / wsl2-hacks.md
Last active September 13, 2020 18:05
wsl2-hacks

Auto-start/services (systemd and snap support)

from: https://github.com/shayne/wsl2-hacks/blob/master/README.md

I've done a few methods that have had various levels of success. My goal was to make it feel seamless for my workflow and have commands work as expected. What's below is the current version of the setup I use. It allows me to use the MS Terminal as well as VSCode's Remote WSL plugin.

With this setup your shells will be able to run systemctl commands, have auto-starting services, as well as be able to run snaps.

  1. Install deps
@arvati
arvati / data-table-display.ipynb
Last active September 2, 2020 02:35
Data Table Display
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arvati
arvati / Install Alpine into Raspberry Pi 2 Model B Rev 1.1.md
Last active December 19, 2025 18:35
Install Alpine into Raspberry Pi 2 Model B Rev 1.1
@arvati
arvati / raspberry pi digi dac.md
Last active July 28, 2020 00:31
Config raspberry hifiberry digital hat

Use hifiberry dac digital

You don’t have to edit /etc/modules anymore, but need to load the correct device tree file. To do this, you must edit /boot/config.txt and add the following line dtoverlay=hifiberry-digi

cat /boot/config.txt
cat /boot/config.txt

Alpine chroot install Emulation

Simulate an instalation using chroot on an Qemu machine

Start Qemu machine

See this Qemu script to start an virtual machine on windows 10 with one disk to boot, 4 disks to simulate an RAID and 1 usbdisk, and 2 nic devices

Initial setup

Start Alpine from iso file and setup to save config into usbdisk
Hint: first user is root with no password
OBS: Do not setup disks yet

echo -e "/dev/sdf1\t/media/usb\tvfat\trw\t0\t0" > /etc/fstab

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@arvati
arvati / .config pass tools browserpass and qtpass using windows wsl wrappers.md
Last active June 27, 2023 01:05 — forked from christian-weiss/passInWslBashWrapper.bat
pass tools browserpass and qtpass using windows wsl wrappers

pass tools browserpass and qtpass using windows wsl wrappers

Inside wsl Alpine v3.12

sudo apk update
sudo apk add browserpass pass nano
cd ~/
wget https://gist.github.com/arvati/1d9ae3091017e3ba1209fd76552cd344/raw/44c4af0f86e056e94954580943d2980741f02ff5/pinentry-wsl-ps1.sh
chmod ug=rx pinentry-wsl-ps1.sh
#echo "pinentry-program /home/$USER/pinentry-wsl-ps1.sh" >> ~/.gnupg/gpg-agent.conf
echo "pinentry-program \"/mnt/c/Program Files/Git/usr/bin/pinentry.exe\"" >> ~/.gnupg/gpg-agent.conf