Skip to content

Instantly share code, notes, and snippets.

@paweljasinski
paweljasinski / resize-home
Created February 4, 2023 14:37
upgrade (new bigger disk) lvm on LUKS encrypted /home
# references
# https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#LVM_on_LUKS
# https://wiki.archlinux.org/title/LVM
# /home mounted on logical volume which resides in LUKS encrypted partition
nvme1n1 259:0 0 1.8T 0 disk
└─nvme1n1p1 259:1 0 1.8T 0 part
└─crypthome 254:3 0 1.8T 0 crypt
└─vg1-home 254:4 0 1.8T 0 lvm /home
@paweljasinski
paweljasinski / armbian-qemu
Last active November 13, 2022 12:47
running armbian under arch linux
# download generic image from armbian
wget https://de.mirrors.naho.moe/armbian/dl/uefi-arm64/archive/Armbian_22.08.7_Uefi-arm64_bullseye_current_5.15.74_xfce_desktop.img.xz
# decompress
zx -d Armbian_22.08.7_Uefi-arm64_bullseye_current_5.15.74_xfce_desktop.img.xz
# create loopback devices for the image
sudo kpartx -v -a Armbian_22.08.7_Uefi-arm64_bullseye_current_5.15.74_xfce_desktop.img
# extract kernel and initrd (watch out for device name from previous step)
@paweljasinski
paweljasinski / hp-power-ohm.txt
Created October 13, 2022 14:06
HP Smart-pin power connector resistor values
45W 500kΩ
65w 370KΩ
90W 300kΩ
120W 220kΩ
150W 120kΩ
230W 100kΩ
@paweljasinski
paweljasinski / readme.txt
Last active November 24, 2021 08:33
pcengines-apu2-3-port
install freebsd 12.2, on the installation media modify /etc/loader.conf
### from /boot/loader.conf
comconsole_speed="115200"
console="comconsole"
once installed
### /boot/loader.conf
@paweljasinski
paweljasinski / plank-autorandr.txt
Created January 31, 2021 16:32
notes on plank and autorandr
Plank out of the box did not follow the primary display when switching between mobile and docked profile.
This is happennig on arch, as of Jan 2021, xfce, nvidia, zbook g15 g5
.config/autorandr/postswitch
!/bin/sh
/usr/bin/notify-send -i display "Display profile" "$AUTORANDR_CURRENT_PROFILE"
plank&
.config/autorandr/preswitch
!/bin/sh
# get my favourite background
sudo apt-get install gutsy-wallpapers
cd /usr/share/xfce4/backdrops/
sudo ln -s ../../backgrounds/gutsy-elephant-skin.jpg
# Adjust desktop background with gui
# plank
sudo apt-get install plank
plank --preferences
@paweljasinski
paweljasinski / .minttyrc
Created October 28, 2018 10:00
.minttyrc
ForegroundColour=101,123,131
BackgroundColour=253,246,227
CursorColour=220,50,47
Black=7,54,66
BoldBlack=0,43,54
Red=220,50,47
BoldRed=203,75,22
Green=133,153,0
BoldGreen=88,110,117
Yellow=181,137,0
@paweljasinski
paweljasinski / dp-reset
Last active October 28, 2018 09:58
restore my laptop display settngs to a reasonable shape
#!/bin/sh
# Bring back displays to reasonable shape after sleep/wakeup.
# This is for ZBook G2 which notoriously turns all displays blank
# and/or makes panning size cover all displays.
# When facing black screens after X11 logon, press Ctrl-Alt-F1, logon on the terminal console and invoke
# Assumes DP-3 is main laptop display
# If invoked as dp-mini-reset - cleans up DP-5 (mini display port)
@paweljasinski
paweljasinski / rdp-cycle.ahk
Last active July 10, 2026 15:59
autohotkey script to cycle through remote desktop client windows in full screen mode
; When working with more than one remote desktop on windows
; switching between the remote desktop windows in full screen mode is a horror.
; This scripts let you change the remote desktop window in a Ctrl-Tab or better Cmd-` way
; Ctrl-Shift-Tab switches to local desktop (minimizes all remote desktop windows)
;
; The key combination is Ctrl-CapsLock and due to nature of remote desktop difficult to change
; inspired by http://superuser.com/a/305788
^Capslock:: ; Ctrl+Caps Lock cycles through active remote desktop clients
@paweljasinski
paweljasinski / ast
Created June 24, 2014 21:58
ipy -c 'print __name__'
.Extension<IronPython.Compiler.Ast.PythonAst> {
.Extension<Microsoft.Scripting.Ast.LightExpression`1[IronPython.Compiler.LookupCompilationDelegate]> {
.Lambda <unnamed><IronPython.Compiler.LookupCompilationDelegate>
}
}
.Lambda <unnamed><IronPython.Compiler.LookupCompilationDelegate>(
IronPython.Runtime.CodeContext $$globalContext,
IronPython.Runtime.FunctionCode $$functionCode) {
.Label