Skip to content

Instantly share code, notes, and snippets.

@antgel
antgel / restic-excludes
Last active November 11, 2022 16:41
restic exclude file
/dev
/media
/mnt
/proc
/run
/sys
/tmp
/var/tmp
.android/avd
@antgel
antgel / gist:5b71a36c57d77af0c563b62ed30b2f7a
Created June 17, 2022 22:04
Ubuntu 20.04 chroot from live USB
sudo su
mount /dev/nvme0n1p3 /mnt
mount /dev/nvme0n1p1 /mnt/boot/efi/
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount -o bind /run /mnt/run
mkdir /run/resolvconf
echo 'nameserver 8.8.4.4' | tee -a /etc/resolv.conf
#!/usr/bin/env python
# On Amazon Linux 2, when you ssh into an instance, the Elastic Beanstalk environment variables are
# not set. This is annoying when trying to reproduce production issues. I dug for a while, couldn't
# find any documentation on this, then rolled my own solution. NB AL2 has Python 2 not 3 *sigh*
# Usage:
# Save this file on the instance, I suggest the name eb-env-generator.py
#
# python eb-env-generator.py
#
GitHub without assign, mention, review requested
(from:notifications@github.com -cc:(assign@noreply.github.com OR mention@noreply.github.com OR review_requested@noreply.github.com))