Skip to content

Instantly share code, notes, and snippets.

@adeelx
adeelx / purge.sh
Created October 2, 2018 18:04 — forked from vmassuchetto/purge.sh
Script to clean a Vagrant box before packaging it. Updated to work with Debian and some additional directories. It's also less general and does not remove any system packages at all.
#!/bin/sh
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
# - https://gist.github.com/adrienbrault/3775253
# Unmount project
umount /vagrant

Delete the last commit, if it hasn't been pushed.

git reset --soft HEAD~1

Delete the last commit, if it has been pushed.

git reset --hard HEAD~1
git push origin HEAD --force

Temporarily ignore local changes to a file

@adeelx
adeelx / keybase.md
Last active June 13, 2017 14:24
Keybase.io Proof

Keybase proof

I hereby claim:

  • I am adeelx on github.
  • I am adeelx (https://keybase.io/adeelx) on keybase.
  • I have a public key whose fingerprint is 9B33 7120 4DA2 7392 1C99 78EC 722D 8851 A21E 56D3

To claim this, I am signing this object: