Skip to content

Instantly share code, notes, and snippets.

@vldn-dev
vldn-dev / fzf-as-filemanager.sh
Last active Dec 8, 2021
bash script for running fzf as a filemanager
View fzf-as-filemanager.sh
RELOAD="pkill fzf && fzf" \
DEFAULT="ls -A --color=always" \
CLICOLOR_FORCE=1 \
FZF_DEFAULT_OPTS="
--bind='\
enter:execute(cd {} 2>/dev/null ; $RELOAD ),\
left:execute(cd .. 2>/dev/null ; $RELOAD ),\
right:execute(cd {} 2>/dev/null ; $RELOAD ),\
alt-1:execute(cd $HOME 2>/dev/null ; $RELOAD),\
alt-2:execute(cd $HOME/Downloads 2>/dev/null ; $RELOAD),\
@vldn-dev
vldn-dev / guix-infect.sh
Last active Dec 13, 2021
Guix in WSL2 (with busybox from 0xbadfca11/miniwsl) guix-infect
View guix-infect.sh
# wget https://github.com/0xbadfca11/miniwsl/releases/download/release3041562/rootfs.tgz
# wsl --import guix /guix rootfs.tgz --version 2
# wsl -d guix /bin/busybox sh -c "/mnt/c/sys/misc/guix-infect.sh"
mkdir -p /root /etc /tmp /var/run /run /home
chmod 1777 /tmp
rm /etc/passwd
cat <<EOM >> /etc/passwd
root:x:0:0:root:/root:/bin/bash
guixbuilder01:x:999:999:Guix build user 01:/var/empty:/usr/sbin/nologin