Skip to content

Instantly share code, notes, and snippets.

@grumpysi
grumpysi / Install Imagemagick PHP 7.0
Last active January 28, 2020 13:58
Install Imagemagick on Laravel Homestead box Ubuntu 14 + PHP 7.0
sudo apt-get update && sudo apt-get install -y imagemagick php-imagick && sudo service php7.0-fpm restart && sudo service apache2 restart
@olavmrk
olavmrk / removeexcept.sh
Last active August 23, 2021 21:33
git filter-branch command to remove all files except those of interest
# Remove every file except "./somefile.txt" and the directory "./somedir".
# --prune-empty to remove empty commits.
git filter-branch --tree-filter "find . -not -path './.git' -not -path './.git/*' -not -path './somefile.txt' -not -path './somedir/*' -not -path './somedir' -delete" --prune-empty