Skip to content

Instantly share code, notes, and snippets.

@laineantti
laineantti / invidious_maximized_video_fixes.user.js
Last active February 21, 2024 11:20
Invidious userscripts for Violentmonkey
// ==UserScript==
// @name Invidious maximized video (+ fixes)
// @namespace http://tampermonkey.net/
// @version 0.3.1
// @description Maximizes the video in Insidous for YouTube to use the entire width of the browser window. (+ fixes)
// @author Magusbear
// @license MIT
// @match *://*/watch?v=*
// @icon https://www.google.com/s2/favicons?sz=64&domain=vern.cc
// @grant none
@laineantti
laineantti / README.md
Last active October 4, 2023 12:42
Autologin with Dinit + Xorg/X11/xinit + dwm
  • cp ~/.xinitrc ~/.xinitrc_original
  • cp /etc/X11/xinit/xinitrc ~/.xinitrc
  • add exec dwm to end of the file ~/.xinitrc
  • replace command = /usr/lib/dinit/agetty-default tty1 with command = /usr/lib/dinit/agetty-default --autologin your_username tty1 in /etc/dinit.d/tty1

Add

if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
        exec startx
fi

Create service and autoload

  • save service file to /etc/dinit.d/input-remapper
  • sudo chmod +x /etc/dinit.d/input-remapper
  • sudo dinitctl enable input-remapper
  • add input-remapper-control --command autoload to ~/.xinitrc (to autostart)

Check if everything is good

  • sudo dinitctl status input-remapper
  • sudo dinitctl list
  • nano /var/log/dinit/input-remapper.log
@laineantti
laineantti / breezedark_foot.ini
Last active May 27, 2023 15:16
Breeze Dark color theme for foot terminal emulator ( colors scheme linux kde plasma config foot.ini ini ) Created using colors from here: https://github.com/franekjel/st-breeze/blob/695070324d0d38e28537074885cb6b9d3ef9496c/st-breeze-20190222-4ed8bbc.diff
# Breeze Dark - 8 normal colors
regular0=31363b # black
regular1=ed1515 # red
regular2=11d116 # green
regular3=f1fa8c # yellow
regular4=1d99f3 # blue
regular5=9b59b6 # magenta
regular6=1abc9c # cyan
regular7=eff0f1 # white
@laineantti
laineantti / nfs.md
Last active October 15, 2021 20:01
Mounting NFSv3 share on Windows (This method will work for v3 as Chewbakka-Wakka said in comments.)

For NFSv4 support you can try to use NFSv4.1 Client for Windows ( https://github.com/cbodley/ms-nfs41-client ). I never tested that myself and i don't even use windows anymore so i also don't use these instructions anymore.

  1. On Windows 7: (You must be running Windows 7 Ultimate/Pro or Windows 10 Pro/Enterprise which supports Client for NFS)
  2. Install "Client for NFS" feature (Control Panel / Programs and Features / Services for NFS / Client for NFS)
  3. Disable Windows Firewall or other local firewall (open all required ports later)
  4. Use "Regedit" and add anonymous UID and GID to 1000 (or whatever user ID you want to have access on Linux-server)
HKEY_LOCAL_MACHINESOFTWAREMicrosoftClientForNFSCurrentVersionDefaultAnonymousGid  (new DWORD 32)
HKEY_LOCAL_MACHINESOFTWAREMicrosoftClientForNFSCurrentVersionDefaultAnonymousUid  (new DWORD 32)
@laineantti
laineantti / .._for_Linux.md
Last active February 29, 2024 22:31
🖲️ Elecom DEFT PRO M-DPT1MRBK function buttons for Linux and Windows
@laineantti
laineantti / openvpn_pia
Created November 6, 2018 19:07
How to setup headless (No GUI/CLI Only) ubuntu openvpn pia
## Install OpenVPN
# Now we install and configure OpenVPN, do the following commands:
sudo apt-get install openvpn
cd /etc/openvpn
sudo wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
@laineantti
laineantti / proxmox_resize_pve-root
Created November 4, 2018 22:37
Proxmox - Resize pve-root
# Check disk space before
df -h
# Delete local-lvm storage in gui
lvremove /dev/pve/data
lvresize -l +100%FREE /dev/pve/root
resize2fs /dev/mapper/pve-root
# Install if lshw not found
apt install lshw
# Check disk info
lshw -class disk -class storage
# Do this again for every disk
qm set <disk_id> -virtio<number from 2 to 999, remember that you cannot use 1!> /dev/disk/by-id/<disk_long_id>
# (this prints: update VM <disk_id> -virtio2 /dev/disk/by-id/<disk_long_id>)