Skip to content

Instantly share code, notes, and snippets.

View zakkak's full-sized avatar
:octocat:
Gitting

Foivos zakkak

:octocat:
Gitting
View GitHub Profile
@zakkak
zakkak / gist:ab08672ff9d137bbc0b2d0792a73b7d2
Created March 24, 2020 23:25
Resizing a filesystem using qemu-img and fdisk

Occasionally we will deploy a virtual instance into our KVM infrastructure and realize after the fact that we need more local disk space available. This is the process we use to expand the disk image. This process assumes the following:

  • You're using legacy disk partitions. The process for LVM is similar and I will describe that in another post.
  • The partition you need to resize is the last partition on the disk.

This process will work with either a qcow2 or raw disk image. For

@zakkak
zakkak / .git-commit-template
Last active March 21, 2024 14:26 — forked from adeekshith/.git-commit-template.txt
This commit message template that helps you write great commit messages and enforce it across your team.
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char)
# |<---- Preferably using up to 50 chars --->|<------------------->|
# Example:
# [feat] Implement automated commit messages
# (Optional) Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# (Optional) Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@zakkak
zakkak / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Created May 29, 2017 19:35 — forked from whizzzkid/XPS-15 9560 Getting Nvidia To Work on KDE Neon
Making Nvidia Drivers + CUDA 8 + Bumblebee work together on XPS 15 Early 2017 9560 kabylake. Ubuntu, KDE Neon, Linux Mint, debian.
# As of writing this, 4.11 kernel fails, 4.10.15 fails, 4.11rc8 seems to be working. Apply the graphics patches first.
# Install Intel Graphics Patch Firmwares (This should reboot your system):
bash -c "$(curl -fsSL http://bit.ly/IGFWL-install)"
# Update to 4.11.2 kernel. nvidia-375 compiles fine >=4.11.1
cd /tmp
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.2/linux-headers-4.11.2-041102_4.11.2-041102.201705201036_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.2/linux-headers-4.11.2-041102-generic_4.11.2-041102.201705201036_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.2/linux-image-4.11.2-041102-generic_4.11.2-041102.201705201036_amd64.deb
@zakkak
zakkak / disable_panel_shadow.sh
Created April 11, 2017 08:55 — forked from alibitek/disable_panel_shadow.sh
Disable KDE panel shadow. Script to be placed in ~/.kde/Autostart/disable_panel_shadow.sh https://forum.kde.org/viewtopic.php?f=285&t=121592
for WID in `xwininfo -root -tree | sed '/"plasma-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'`; do
xprop -id $WID -remove _KDE_NET_WM_SHADOW
done
# or
for WID in `xwininfo -root -tree | sed '/"Plasma": ("plasmashell" "plasmashell")/!d; s/^ *\([^ ]*\) .*/\1/g'`; do
xprop -id $WID -remove _KDE_NET_WM_SHADOW
done