Skip to content

Instantly share code, notes, and snippets.

View vasi's full-sized avatar

Dave Vasilevsky vasi

  • Montreal
View GitHub Profile
SUBSYSTEM!="pci", GOTO="gdm_pci_device_end"
ACTION!="bind", ACTION!="add", GOTO="gdm_pci_device_end"
# cirrus
ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
# virtio
ATTR{vendor}=="0x1af4", ATTR{device}=="0x1050", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
# qxl
ATTR{vendor}=="0x1b36", ATTR{device}=="0x0100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
# vga
@vasi
vasi / .bashrc
Created March 13, 2025 05:27
uBlue bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
com.discordapp.Discord
com.github.rafostar.Clapper
com.github.tchx84.Flatseal
com.google.Chrome
com.jeffser.Alpaca
com.mattjakeman.ExtensionManager
com.valvesoftware.Steam
io.github.dvlv.boxbuddyrs
io.github.flattool.Warehouse
io.missioncenter.MissionCenter
@vasi
vasi / gist:d8929ea7c94f9310c7bde9ec94a8ebcc
Created March 8, 2025 06:23
Building squashfuse against linuxbrew
export PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/lib/pkgconfig
export LDFLAGS=-L/home/linuxbrew/.linuxbrew/lib
export CPPFLAGS="-I/home/linuxbrew/.linuxbrew/opt/lzo/include -I/home/linuxbrew/.linuxbrew/opt/lz4/include"
@vasi
vasi / win11-bluefin41.xml
Created March 7, 2025 08:34
Windows 11 libvirt VM (on Bluefin 41)
<domain type='kvm'>
<name>win11</name>
<uuid>5656f744-8318-43f4-8762-cd38db8109df</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/11"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>8388608</currentMemory>
@vasi
vasi / .bashrc
Created March 7, 2025 02:20
Check for staged update in Bluefin
if [ -z "$STAGE_CHECKED" ]; then
export STAGE_CHECKED=1
if rpm-ostree status --json | jq -e '.deployments[].staged | select(.)' > /dev/null ; then
echo 'New upgrade staged! Reboot to install'
fi
fi
@vasi
vasi / packages.txt
Created March 6, 2025 06:11
Package list of bluefin-dx-nvidia stable-20250305.2
ImageMagick
ImageMagick-libs
Judy
LibRaw
ModemManager
ModemManager-glib
NetworkManager
NetworkManager-adsl
NetworkManager-bluetooth
NetworkManager-config-connectivity-fedora
@vasi
vasi / foster.rb
Created February 10, 2025 01:57
NetBSD orphan finding
#!/usr/bin/env ruby
keepers = IO.readlines(File.join(Dir.home, 'keepers'))
.map(&:chomp)
.map {|s| s.sub(/\s*#.*/, '')}
.reject(&:empty?)
installed = IO.popen(['pkg_info', '-u'])
.readlines
.map {|s| /^(\S+)-[^\s-]+\s/.match(s)[1] }
@vasi
vasi / mount_clonezilla.md
Last active February 18, 2025 01:27
Mounting Clonezilla images with FUSE

Mounting Clonezilla images with FUSE

I love to make backups with Clonezilla. But often, I'll back up my system, wipe my Linux partition and try another distro—only to realize that I need access to just one file from the old installation. For example, maybe I made an interesting change to my .zshrc or Samba configuration, which I want to re-use on the new system.

The obvious solutions aren't my favorites. It's easy to restore an image to a spare disk, but it takes a long time, and requires a spare disk I'm willing to wipe. I [could extract an entire image][extract_image], but that also takes lots of time and space. Wouldn't it be nice to just look inside my compressed Clonezilla image, just like I can do with a zip file or squashfs archive?

It turns out it's possible, with clever use of [user-space filesystems][fuse]!

[Desktop Entry]
Name=Mini vMac
Type=Application
Icon=/home/vasi/.local/share/icons/ICONAPPW.ico
Exec=/run/current-system/sw/bin/minivmac -r /home/vasi/macemu/ROMS/MacPlus.rom /home/vasi/macemu/Images/os6.img /home/vasi/macemu/Images/appsVMac.img