Skip to content

Instantly share code, notes, and snippets.

@klkvsk
klkvsk / wslrsync.php
Last active November 17, 2023 20:48
Rsync wrapper for IDEA to fix rsync deployment from wsl
#!/usr/bin/env php
<?php
/**
* Rsync wrapper for IDEA to fix rsync deployment from wsl
* In "Rsync settings" set:
* - Rsync executable path: "c:\windows\system32\wsl.exe"
* - Rsync options: "/path/where/you/saved/wslrsync.php -zar"
* - Shell executable path: "ssh"
*/
$verbose = true;
@pshchelo
pshchelo / mount-qcow2-lvm-image.sh
Last active July 2, 2024 17:48
List of commands to mount/unmount a qcow2 image conatining LVM partitions.
# kudos to dzaku at consolechars.wordpress.com
### MOUNT qcow2 image with lvm partitions
# ensure nbd can handle that many partitions
sudo modprobe nbd max_part=8
# present image as block device through NBD
sudo qemu-nbd --connect=/dev/nbd0 <image.qcow2>