Skip to content

Instantly share code, notes, and snippets.

View nabakdev's full-sized avatar
💭
need vacation

nabak nabakdev

💭
need vacation
View GitHub Profile
@nabakdev
nabakdev / Optimizations_Artix.md
Created January 10, 2023 06:01 — forked from themagicalmammal/Optimizations_Artix.md
Set of optimizations, I use on my Artix Setup
@nabakdev
nabakdev / almalinux.md
Last active February 11, 2023 14:15
alma linux notes

Create user

useradd -m <name>

Add password to user

passwd <name>

Add user to wheel

usermod -aG wheel <name>

Install git

Update forker repository

Add the main repository

git remote add upstream https://github.com/{repo-owner}/{repo-name}.git

Fetch the main repository changes

@nabakdev
nabakdev / postgrest-trigger.md
Created February 16, 2023 08:19
database triggers collections

Validate Name

create or replace function validate_name_length()
returns trigger as $$
begin
    if length(new.name) < 3 then
        raise exception 'Name must be at least 3 characters long';
    end if;
    return new;
end;
@nabakdev
nabakdev / flash-os-images-to-usb-drives.md
Created March 8, 2023 07:05
Flash OS Images to USB Drives or SD CARD in linux
Image without compression
sudo dd if=openwrt_official_xxx.img of=/dev/sdX conv=fsync bs=1M status=progress
Image with gzip compression
zcat openwrt_official_xxx.img.gz | sudo dd of=/dev/sdX conv=fsync bs=1M status=progress
@nabakdev
nabakdev / reboot-openwrt.sh
Created March 30, 2023 08:20
Reboot openwrt based router with curl
#!/bin/bash
curl -X POST http://192.168.1.1/cgi-bin/luci/;stok=<SESSION_TOKEN>/admin/system/reboot \
-H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
--data 'reboot=1&sessionid=<SESSION_TOKEN>'
@nabakdev
nabakdev / boot.md
Last active June 25, 2023 12:59
Disable "Reboot into firmware interface" on boot with systemd-boot
sudo echo 'auto-firmware 0' >> /boot/loader/loader.conf
@nabakdev
nabakdev / torrent.md
Last active May 29, 2023 05:55
download via torrent using transmission-cli on linux

Install transmission-cli

Install Transmission if it's not already installed on your system

Arch Linux

sudo pacman -S transmission-cli

Download torrents

@nabakdev
nabakdev / disable-ipv6-openwrt.md
Created June 6, 2023 13:56
disable IPV6 openwrt
uci set 'network.lan.ipv6=0'
uci set 'network.wan.ipv6=0'
uci set 'dhcp.lan.dhcpv6=disabled'

# Disable RA and DHCPv6 so no IPv6 IPs are handed out
uci -q delete dhcp.lan.dhcpv6
uci -q delete dhcp.lan.ra

# Disable the LAN delegation