Listing posts

Displaying posts 1 - 5 of 359 in total
gitconfig global file and tools
person cloud · link
Last update
2026-02-12
2026
02-12
« — »
  • Setup a main config file in /etc/gitconfig or ~/.gitconfig:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
[alias]
  co = checkout
  ci = commit
  st = status
  df = diff --staged
  bd  = branch --edit-description
  bds = !GIT_EDITOR=cat git branch --edit-description | grep -v "^#"
  pom = push origin master
  lom = pull origin master
  logs = log --show-signature
  list-files  = ls-tree --name-only -r HEAD
  list-files2 = ls-tree --full-tree -r HEAD
  hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --date=short
  histg = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
  undoci = reset --soft HEAD^
  redoci = commit -c ORIG_HEAD
  undo-merge = reset --hard HEAD~1
  stash-unapply = !git stash show -p | git apply -R
  stash-diff = stash show -p
  # drop all local commits and align with origin/master
  reset-om = reset --hard origin/master
  # side-by-side diff commands (install ydiff command)
  dfs   = !git diff  --staged | ydiff -s -w 0 -t 2 --wrap
  diffs = !git diff           | ydiff -s -w 0 -t 2 --wrap
  # show root dir - https://stackoverflow.com/a/957978/13231285
  root = rev-parse --show-toplevel
[user]
  name  = Alberto Cavalin
  email = acavalin@users.noreply.github.com
[credential "https://github.com"]
  username = acavalin
[core]
  autocrlf = input
  safecrlf = true
  excludesfile = ~/.gitignore_global
  # https://stackoverflow.com/a/37293198/13231285
  hooksPath = ~/.git-hooks
[push]
  default = current
  autoSetupRemote = true
[color]
  ui = true
[pull]
  ff = only
  rebase = false
[init]
  defaultBranch = main
[diff]
  algorithm = histogram
  • Quick config commands
1
2
3
4
5
6
7
8
9
# Better diff algorithm
git config --global diff.algorithm histogram

# Auto set upstream on push
git config --global push.autoSetupRemote true

# Enable adding CR/LF files
git config --global core.autocrlf false
git config --global core.safecrlf false
  • Setup the ignore list in ~/.gitignore_global:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# jEdit temporary files
*.marks
\#Untitled-*#

# Rails files (db, log, temp, cfg)
/db/*.sqlite3
/db/*.sqlite3-journal
/log/*.log
/log/*.gz
/tmp
Gemfile.lock
/config/database.yml

.DS_Store
nohup.out
  • Use a side-by-side colored diff tool

  • Enhance the terminal experience:

    1
    2
    3
    [ -f "$HOME/.git-completion.bash" ] && source "$HOME/.git-completion.bash"
    [ -f "$HOME/.git-prompt.sh" ] && source "$HOME/.git-prompt.sh"
    export PROMPT_COMMAND='__git_ps1'
    
  • Install some good interfaces for git:

1
2
apt-get install tig  # ncurses-based text-mode interface
apt-get install gitg # gtk visual repository viewer
  • Look for a file in a project:
1
2
3
4
grep -E --color=always \
  --exclude-dir=".git" --exclude-dir="log" --exclude-dir="tmp" \
  --exclude="#*#" \
  -rin search_term . | less -R
  • Make a single file full backup
1
2
git bundle create project.bundle --all # backup
git clone project.bundle dir           # restore

On the first pull/push saves user/pass in plaintext in ~/.git-credentials.

1
2
# run this to configure the local repository
git config credential.helper store

Source: cache username/pass via StackOverflow and GitHub; dev.to git terminal, side-by-side diff, add CR/LF files, dev.to

See also: When to Use Git Reset, Git Revert & Git Checkout


~~~ * ~~~

Riso in vaporiera per microonde
person cloud · link
Last update
2026-02-10
2026
02-10
« — »

Ricetta per 2 porzioni:

  • 150gr riso
  • 250ml acqua + sale
  • 50ml aceto di riso mirin
  • 10 minuti a 800W

Links: amazon, sistema rice cooker


~~~ * ~~~

Framework 12 setup
Last update
2026-02-06
2026
02-06
«fw12»

0. Setup

  • Boot menu & BIOS: repeatly press F2 at boot time
  • Battery % cut-off: BIOS > Advanced> Battery charge limit = 85%
  • FN+Esc = swap Function/Multimedia keys (persistent across reboots)

1. Windows (see dedicated post)


2. Linux (Debian 13 release notes)

2.1 Initial setup

  • apt install git && cd /etc && git init .
    • echo /cups/subscriptions.conf* > .gitignore
    • git add . && git commit -m "initial setup"
  • apt install aptitude screen mc micro ncdu elinks curl
  • setup NetworkManager
  • generate ssh keys
  • copy micro configuration
  • copy /opt/bashrc.sh, ~/.gitconfig, ~/.screenrc
  • config X session for root & user
  • config grub:
    • echo "GRUB_TIMEOUT=3" >> /etc/default/grub.d/local.cfg
    • echo "GRUB_BACKGROUND=xxxx.png" >> /etc/default/grub.d/local.cfg
    • update-grub
  • install systemd-units:
    • tmpfs-folders + mkdir a && mount --bind / a & clean ondisk /tmp and /var/log
    • vc-mounter + apt install ruby linux-cpupower (see veracrypt post & hp)
  • config /etc/apt/sources.list:
    • disable deb-src rows
    • add backports deb http://deb.debian.org/debian/ trixie-backports main contrib non-free non-free-firmware
  • install chrome, vivaldi, firefox (hp)
1
2
3
4
5
6
apt purge firefox-esr ; apt install firefox
update-alternatives --config www-browser         # elinks
update-alternatives --config x-www-browser       # firefox
update-alternatives --config gnome-www-browser   # firefox
update-alternatives --config x-session-manager   # startxfce4
update-alternatives --config x-terminal-emulator # xfce4-terminal
1
2
3
4
5
6
7
8
9
10
key="95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7"
# download key via GPG...
gpg --keyserver keyserver.ubuntu.com --recv-key $key
# ...or via wget if command fails
wget -O - "http://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x#key" | gpg --import
# save key and add repo
gpg --armor --export $key > /etc/apt/trusted.gpg.d/r-cran.asc`
echo "deb [signed-by=/etc/apt/trusted.gpg.d/r-cran.asc]" \
  "http://cloud.r-project.org/bin/linux/debian trixie-cran40/" \
  > /etc/apt/sources.list.d/r-cran.list
  • config cryptsetup and disable hybernation
  • disable speech-dispatcher auto spawn:
    • sed -r -i 's/^# (DisableAutoSpawn)/\1/' /etc/speech-dispatcher/speechd.conf
  • config lightdm:

    • enable tap to click by adding Option "Tapping" "on" within the section containing Identifier "libinput touchpad catchall" in /etc/X11/xorg.conf.d/40-libinput.conf
    • set in /etc/lightdm/lightdm-gtk-greeter.conf`:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    background=/opt/wallpapers/moon.jpg
    xft-antialias=true
    xft-dpi=140
    xft-hintstyle=hintfull
    xft-rgba=none
    indicators=~spacer;~clock;~a11y;~spacer;~session;~power
    a11y-states=+keyboard
    keyboard=onboard -l Small -t Ambiance -s 1200x350
    clock-format=%A %d %B %Y | %H:%M
    position=43% 41%
    hide-user-image=true
    default-session=xfce4-session
    
    • set in /etc/lightdm/lightdm.conf:
    1
    2
    allow-user-switching=false
    allow-guest=false
    

2.2 Software

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# compression
apt install 7zip 7zip-rar brotli pigz pixz unrar-free unzip

# multimedia
apt install ffmpeg ogmtools mediainfo mencoder \
  mkvtoolnix mkvtoolnix-gui easytag id3v2 mp3gain mpg123 twolame \
  mplayer mpv sox asunder genisoimage audacity cuetools

# graphics
apt install geeqie mcomix dia gimp gimp-data-extras imagemagick \
  inkscape exiftran exiv2 jhead jpeginfo pngcrush webp xchm \
  zbar-tools flpsed pdftk-java foliate qpdfview unpaper

# shell
apt install fish peco cbonsai cmatrix pipes-sh tty-clock dialog duf \
  expect fdupes geoip-bin gftp hexedit mutt ncal parallel patchelf \
  strace htop pinfo pv ripgrep smemstat tidy tree units uuid yudit

# programming
apt install build-essential default-jdk kakasi libkakasi2-dev nodejs \
  npm gitg golang sqlite3 sqlitebrowser jq \
  geany geany-plugin-addons geany-plugin-autoclose geany-plugin-codenav \
  geany-plugin-lineoperations geany-plugin-miniscript geany-plugin-treebrowser

# services/daemons
apt install dnsmasq haveged nullmailer nfs-kernel-server \
  tigervnc-standalone-server tigervnc-viewer autocutsel

# networking (`ipcalc` replaces `gip`)
apt install mosh net-tools ncat netcat-openbsd netcat-traditional \
  netselect nmap openvpn wireguard openresolv? remmina swaks whois \
  mailutils mtr-tiny oathtool blueman bluetooth bluez ipcalc socat ufw

# disk
apt install gparted dos2unix tofrodos davfs2 ntfs-3g sshfs exfat-fuse \
  f2fs-tools iotop-c mtools gsmartcontrol mdadm pmount squashfs-tools

# x11/xorg, tools
apt install evtest xdotool zenity xloadimage xpdf galculator galternatives \
  keepassxc-full kpcli pwgen icewm caffeine

# fonts
apt install  ttf-mscorefonts-installer fonts-noto-cjk fonts-noto-color-emoji \
  fonts-cantarell fonts-cascadia-code fonts-clear-sans fonts-freefont-otf \
  fonts-inconsolata fonts-sil-gentium fonts-sil-gentium-basic \
  fonts-unifont xfonts-unifont

# office (use **aptitude** and EXCLUDE: fonts-noto-extra libreoffice-sdbc-*)
libreoffice hunspell-it hyphen-it

2.3 Configuration

  • accented letters
  • nullmailer (replaces exim4)
  • wireguard
  • dnsmasq + freeDNS
  • smartd
  • sudo
  • ufw firewall
  • XFCE autostart applets:
    • Settings > Session and startup > Application autostart: Blueman, Caffeine, Clipman, Remmina, caffeine-indicator
  • XFCE - disable light-locker + custom locking:
    • Settings > Session and startup > Application autostart > uncheck light-locker
    • apt install xfce4-screensaver & configure it to lock screen after 15' of inactivity
    • Settings > Power manager > System tab > Security: check Lock screen when system is going to sleep
  • XFCE font DPI: settings manager > appearance > fonts tab > check Custom DPI setting 110
  • TODO set display brightness on boot: archlinux, light, brightnessctl, systemd-backlight

2.4 Optional unpackaged 😢️ software

2.5 XFCE Tablet mode

1
2
3
xrandr --output eDP-1 --rotate normal
xrandr --output eDP-1 --rotate right
xrandr --output eDP-1 --rotate inverted
1
2
3
4
5
6
7
8
9
10
11
xinput | sort  # detect your device IDs
# PIXA3854:00 093A:0239 Touchpad
# ILIT2901:00 222A:5539

xinput set-prop 'Device ID' 'Coordinate Transformation Matrix' <bits>

# where <bits> depends on screen rotation mode:
#   normal  :  1  0  0  0  1  0  0  0  1
#   inverted: -1  0  1  0 -1  1  0  0  1
#   right   :  0  1  0 -1  0  1  0  0  1
#   left    :  0 -1  1  1  0  0  0  0  1
1
2
3
4
5
6
7
8
9
10
echo "\
/* Set thickness of scrollbars */
scrollbar.vertical   slider { min-width:  16px; }
scrollbar.horizontal slider { min-height: 16px; }\
" > ~/.config/gtk-3.0/gtk.css

echo "\
[Settings]
gtk-overlay-scrolling = false\
" > ~/.config/gtk-3.0/settings.ini

3. Miscellanea

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# systemd unit to be ran at boot
[Unit]
Description=Swap Fn and Meta with ectool
DefaultDependencies=no
After=local-fs.target
Before=sysinit.target

# Swap Fn and Meta keys on a Framework laptop
# Fn:   (2,2), scancode 0xFF
# Meta: (3,1), scancode 0xE01F
#   https://www.howett.net/data/framework_matrix
#   https://www.howett.net/posts/2021-12-framework-ec/#3e0c---keyboard-mapping
#   https://community.frame.work/t/exploring-the-embedded-controller/12846/9
[Service]
Type=oneshot
ExecStart=/usr/local/bin/ectool raw 0x3E0C d2,d1,b2,b2,wE01F,b3,b1,wFF
RemainAfterExit=yes

[Install]
WantedBy=sysinit.target

~~~ * ~~~

Android 📱️ apps
Last update
2026-02-04
2026
02-04
«a collection of must have android apps for many common needs
apps/addons/plugins»

Stores: Google Play, NeoStore, F-Droid, Droid-ify, Aurora (src)

To check

General

Media

Games

System

Home automation

Nova Launcher alternatives

From reddit & androidauthority: Smart Launcher, Lawnchair, Octopi, Hyperion, Niagara, Action, Kvaesitso, Pear

Svago


Other lists: Retrial, Finalboss77


~~~ * ~~~

Windows 11 pro setup
Last update
2025-12-28
2025
12-28
« — »

Settings

  • System > About > Advanced system settings:
    • Advanced tab > Performance > Settings > Visual effects > Adjust for best performance
    • Advanced tab > Performance > Settings > Advanced > Virtual memory > Change > No paging file
    • System protection > Off
    • Remote > Remote assistance > uncheck Allow
  • Disable bitlocker: Privacy and Security > Device Encryption > toggle to Off
  • Right click full menu:
    • reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve -- this empties the content of the key (previous value = C:\Windows\System32\Windows.UI.FileExplorer.dll)
    • open Task Manager (Ctrl+Shift+Esc) > right click on Windows Explorer > Restart
  • Taskbar:
    • hide Search
    • Other system tray icons: show Bluetooth, Eject media
    • Taskbar behaviours > Combine buttons and hide labels > Never
  • Time & language
    • Language & region > ... menu on English (UK) > Language options > Keyboards > keep US-QWERTY only
    • Typing > Advanced keyboard settings:
      • Override: English (UK) - US
      • Language bar options > Hidden
  • Personalization > Fonts > Related settings > Adjust ClearType text
  • Power & battery:
    • Power mode > Best power efficiency
    • Screen, sleep, ... > Plugged = 10/Never, Battery = 3/15
    • Energy saver > Turn on at 50%
    • Lid & power button > all sleep
  • Personalization > Background > Solid color = Cool blue
  • Personalization > Lock screen > Picture + uncheck Fun facts
  • Personalization > Lock screen > unchekc Show the lock screen background picture on the sign-in screen
  • Disable thumbnails cache:
    • reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v DisableThumbnailCache /t REG_DWORD /d 1
  • disable taskbar thumbnails:
    • reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v ExtendedUIHoverTime /t REG_DWORD /d 50 (previous value = 0)
    • reg.exe add "HKCU\Control Panel\Mouse /v MouseHoverTime /t REG_SZ /d 2000 /f (previous value = 400)
  • invert touchpad scrolling direction: Settings > Bluetooth & devices > Touchpad > Scroll & zoom > Scrolling direction = Down motion scrolls down

disable welcome experience, 3 possible ways:

  1. Settings > System > Notifications > Additional settings > uncheck all:
    • Show me the Windows welcome experience after updates and occasionally when I sign in to highlight what’s new and suggested
    • Suggest ways to get the most out of Windows and finish setting up the device
    • Offer suggestions on how I can set up my device.
  2. run regedit
    • HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager
    • create a new 32-bit DWORD SubscribedContent-310093Enabled = 0
  3. run gpedit.msc
    • Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Cloud Content > Turn off the Windows Welcome Experience
    • enable the policy, apply and restart

manual windows updates

  • run gpedit.msc:
  • Computer Configuration > Administrative Templates > Windows Components > Windows Update > Manage end user experience > Configure Automatic Updates
  • enable the policy, set Configure automatic updating: = 2- Notify for download and auto install, apply
  • run gpupdate /force, reboot

auto login

  1. run regedit
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device
    • set DevicePasswordLessBuildVersion = 0 (2=enable)
  2. run netplwiz
    • select your account
    • uncheck Users Must Enter A User Name and Password To Use This Computer, apply
    • enter username and password in the popup (if using a MS account to log in to Windows, insert the MS password)

Chocolatey package manager

  1. install
    • open admin powershell
    • Set-ExecutionPolicy AllSigned
    • Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
  2. install choco-cleaner:
    • choco install choco-cleaner --params "'/NOTASK:TRUE'"
  3. open admin cmd|powershell:
    1. don't ask confirmation: choco feature enable -n=allowGlobalConfirmation
    2. choco install open-shell WinDirStat irfanview irfanview-languages irfanviewplugins vlc sumatrapdf tightvnc
    3. choco install 7zip micro winscp wireguard pdftk
    4. choco install gimp InkScape mcomix libreoffice-still zoom
    5. choco install ffmpeg jhead
    6. choco-cleaner (clear chocolatey package cache files)
  4. pin/fix an app version
    • choco pin add -n mcomix
    • choco pin add -n libreoffice-still

Cygwin

desktop links

  • chocolatey - update all packages (admin link): cmd.exe /K "choco upgrade all & choco-cleaner"
  • cygwin - update all packages: setup-x86_64.exe -n -q
  • windows shutdown: cmd.exe /C "shutdown /s /f /t 0" open in minimized window
  • windows reboot: cmd.exe /C "shutdown /r /f /t 0" open in minimized window

convert an Existing Microsoft Account to a Local Account

Settings > Accounts > Your info > Account settings > Sign in with a local account instead

more privacy

tools

  • CompactGUI -- reduce disk space of programs via native Windows APIs