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 / vault.md
Last active June 29, 2024 21:18
Create an encrypted file vault on Linux using LUKS

Install Luks

sudo apt install cryptsetup

Create an empty file, size 512 Mb

cd ~/
dd if=/dev/urandom of=vaultfile.img bs=1M count=512

Create Luks Volume

@arvati
arvati / flatpak.md
Created June 23, 2024 22:13
Install Linux Alpine flatpak working inside WSL
@arvati
arvati / mount.md
Last active June 23, 2024 20:17
Using USB devices under WSL with usbipd-win and mount Disks

Mount Windows Disk under WSL:

sudo mount -t drvfs D: /mnt/d

Mount generic disk under WSL

Identify your disk

GET-CimInstance -query "SELECT * from Win32_DiskDrive"
@arvati
arvati / month.md
Last active April 28, 2024 19:55
Move files with date in file name to directories
#!/bin/bash

declare -a months=("01 - Janeiro" "02 - Fevereiro" "03 - Março" "04 - Abril" "05 - Maio" "06 - Junho" "07 - Julho" "08 - Agosto" "09 - Setembro" "10 - Outubro" "11 - Novembro" "12 - Dezembro")

for ano in /mnt/data/media/Pictures/Dropbox/video/*; do
    if [  -d "${ano}" ] && [ $((10#$(basename "${ano}"))) -le 2024 ]; then
        for folder in "${ano}"/*; do
            pasta=$(basename "${folder}")
 nro=$((10#${pasta}))
@arvati
arvati / reboot.md
Last active April 20, 2024 19:26
Reboot Openwrt
@arvati
arvati / javascript.md
Created November 26, 2023 01:39
PDF to TEXT OCR online

site: https://www.newocr.com/

step 1 = only one time

$('#page').val("1");$('#form-ocr').submit();$('#ocr').click();

step 2 = 343 times

localStorage.setItem($('#page option:selected').text(),$('#result2-container').contents().find('pre').text());$('#page').val(String(parseInt($('#page option:selected').text(), 10) + 1));$('#form-ocr').submit();$('#ocr').click();
@arvati
arvati / w10 hacks.md
Last active November 2, 2023 16:20
Windows 10 Hacks

Make command prompt available at logon screen:

c:
cd windows/system32
ren utilman.exe utilman_bkp.exe
copy cmd.exe utilman.exe
shutdown -f -r
exit
@arvati
arvati / alpine.md
Last active September 7, 2023 19:05
Install Alpine Linux on sdcard

Mount Destination partition on sdcard

lsblk -f
sudo fdisk /dev/sda
sudo mkfs -t ext4 /dev/sda1
sudo mount -t auto /dev/sda1 /mnt
cd /mnt
sudo su

mkdir -p ./etc/apk
@arvati
arvati / lxc.ipynb
Last active June 8, 2023 12:04
Install Lxc on Debian
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arvati
arvati / omada.ipynb
Last active June 4, 2023 17:47
Docker Omada Controller
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.