View gist:5ba69474cfbd31c7d20d339bf3a983a9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
View .bashrc-bookmarks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -d "$HOME/.bookmarks" ]; then | |
export CDPATH=".:$HOME/.bookmarks:/" | |
alias {g,go,goto}="cd -P" | |
_goto() | |
{ | |
local IFS=$'\n' | |
COMPREPLY=( $( compgen -W "$(/bin/ls ~/.bookmarks)" -- ${COMP_WORDS[COMP_CWORD]})) | |
} && complete -F _goto goto go g |
View cloud-init.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## template: jinja | |
#cloud-config | |
{% if v1.distro_release == 'focal' %} | |
users: | |
- name: berkant | |
shell: /usr/bin/bash | |
ssh_import_id: gh:berkant | |
sudo: ALL=(ALL:ALL) NOPASSWD:ALL |
View openssl-notes.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** 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 |
View ps.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps -eo comm,etime,user | grep PROCESS |
View Microsoft.PowerShell_profile.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# drop in Documents\WindowsPowerShell | |
# Set-ExecutionPolicy RemoteSigned -Scope CurrentUser | |
Set-PSReadlineKeyHandler -Key ctrl+d -Function ViExit |
View n800-video.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mplayer -lavdopts lowres=1 <videofile> | |
mplayer quiet-file -af volume=10 |
View .bashrc.local
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure your .bashrc actually loads a .bashrc.local | |
if [ "$TERM_PROGRAM" != "vscode" ]; then | |
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock | |
fi |
View get-hugo.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tempdir=$(mktemp -d) | |
cd $tempdir | |
curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "browser_download_url.*Linux-64bit.tar.gz"|grep -v extended | cut -d : -f 2,3 | tr -d \" | wget -qi - | |
tar -xf $(ls -1 *.tar.gz) | |
mv hugo ~/bin/ | |
cd - | |
rm -rf $tempdir |
View update-rclone.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CURDIR="$(pwd)" | |
TMPDIR="$(mktemp -d)" | |
cd $TMPDIR | |
wget https://downloads.rclone.org/rclone-current-linux-amd64.deb | |
dpkg -i rclone-current-linux-amd64.deb | |
cd "${CURDIR}" | |
rm -rf "${TMPDIR}" |
NewerOlder