Skip to content

Instantly share code, notes, and snippets.

View cecton's full-sized avatar
🦀

Cecile Tonglet cecton

🦀
View GitHub Profile
@cecton
cecton / mount_qcow2.md
Created July 31, 2020 09:23 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@cecton
cecton / git-reset-author.sh
Created July 28, 2020 16:13 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD
@cecton
cecton / consul.service
Last active May 31, 2017 14:11 — forked from yunano/consul.service
/lib/systemd/system/consul.service
[Unit]
Description=consul agent
Requires=network-online.target
After=network-online.target
[Service]
EnvironmentFile=/etc/environment
Environment=GOMAXPROCS=2
Restart=on-failure
ExecStart=/usr/local/sbin/consul agent $CONSUL_OPTS -data-dir=/var/lib/consul