Skip to content

Instantly share code, notes, and snippets.

View filviu's full-sized avatar

Silviu Vulcan filviu

View GitHub Profile
filviu / 90-kensington-expert-trackball-remap.hwdb
Last active May 15, 2024 06:10 — forked from dnlvgl/90-kensington-expert-trackball-remap.hwdb
Remapping Kensington Expert Trackball Buttons with wayland
# Button remap for Kensington Expert Wireless Trackball to:
# O
# save this file under '/etc/udev/hwdb.d/90-kensington-expert-trackball-remap.hwdb'
# run `sudo systemd-hwdb update` and reboot
# source:
# and:

On CentOS 7, the last command doesn't support the --since option to filter users who have logged in within the past two weeks. However, you can use some other commands and scripts to achieve this. Here's a Bash script that can help you find users who have logged in within the past two weeks.

Save this script to a file, for example,, and make it executable with the following command:

chmod +x

Then, you can run the script to display users who have logged in within the past two weeks.

filviu /
Last active July 11, 2023 14:13
Karabiner / Synergy Integration
  • Add ~/bin/ to General -> Login Items

Do note that if you sleep and resume on a new wifi network the script is still running. I should really implement a python mini-daemon for this :)

The script calls on two profiles:

  • mac which has all my customizations
  • disabled a blank profile with no customizations


filviu / gist:5ba69474cfbd31c7d20d339bf3a983a9
Created March 31, 2023 05:31
Multiple 9p folder mounts with proxmox
In `/etc/pve/qemu-server/NNN.conf`
args: -fsdev local,security_model=passthrough,id=fsdev0,path=/some/path/folder1 -device virtio-9p-pci,id=fs0,fsdev=fsdev0,addr=0x4,mount_tag=9p_folder1 -fsdev local,security_model=passthrough,id=fsdev1,path=/some/path/folder2 -device virtio-9p-pci,id=fs1,fsdev=fsdev1,addr=0x1a,mount_tag=folder2
Then inside the VM inside `/etc/fstab`
folder1 /mnt/folder1 9p trans=virtio,rw,_netdev,nobootwait 0 0
filviu / .bashrc-bookmarks
Last active March 31, 2023 05:17
Shell bookmarks in bash
if [ -d "$HOME/.bookmarks" ]; then
export CDPATH=".:$HOME/.bookmarks:/"
alias {g,go,goto}="cd -P"
local IFS=$'\n'
COMPREPLY=( $( compgen -W "$(/bin/ls ~/.bookmarks)" -- ${COMP_WORDS[COMP_CWORD]}))
} && complete -F _goto goto go g
filviu / cloud-init.cfg
Created March 14, 2023 13:07 — forked from berkant/cloud-init.cfg
Cloud-init config to set up my Ubuntu dev machine.
## template: jinja
{% if v1.distro_release == 'focal' %}
- name: berkant
shell: /usr/bin/bash
ssh_import_id: gh:berkant
filviu / openssl-notes.txt
Created January 28, 2022 11:16 — forked from tsaarni/openssl-notes.txt
Generate self-signed certs with different key types
*** RSA
# Generate self-signed certificate with RSA 4096 key-pair
openssl req -x509 -nodes -days 3650 -newkey rsa:4096 -keyout rsakey.pem -out rsacert.pem
# print private and public key
openssl rsa -in rsakey.pem -text -noout
# print certificate
openssl x509 -in rsacert.pem -text -noout
filviu /
Created November 2, 2021 11:49
Process uptime
ps -eo comm,etime,user | grep PROCESS
filviu / Microsoft.PowerShell_profile.ps1
Last active November 2, 2021 11:50
Powershell CTRL+D to exit terminal.
# drop in Documents\WindowsPowerShell
# Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Set-PSReadlineKeyHandler -Key ctrl+d -Function ViExit
filviu /
Created November 2, 2021 11:15
Options for mplayer on Nokia N800 to get decent playback. Last time checked ~2012
mplayer -lavdopts lowres=1 <videofile>
mplayer quiet-file -af volume=10