Skip to content

Instantly share code, notes, and snippets.

View rabin-io's full-sized avatar

Rabin Yasharzadehe rabin-io

View GitHub Profile
@rabin-io
rabin-io / gitkraken-install-update.sh
Last active April 16, 2019 18:28 — forked from seangtkelley/gitkraken-install.sh
Install Script for Gitkraken on Fedora 27 + Launcher Icon
#!/bin/bash
if [[ ${UID} -ne 0 ]];
then
echo 'This script need to be run with root permissions'
echo "(we assume you don't have write access to /opt)"
exit
fi
@rabin-io
rabin-io / virt-delete
Last active April 18, 2018 16:24 — forked from larsks/virt-delete
A shell script for deleting a libvirt domain and associated storage
#!/bin/sh
echo "Destroy: $1"
virsh destroy $1 2> /dev/null
for disk in $(virsh -q domblklist $1 | awk '{print $2}'); do
pool=$(virsh vol-pool $disk)
name=$(virsh vol-info $disk | awk '$1 == "Name:" {print $2}')
echo "Delete volume: $disk ($name in $pool)"