List installed php packages with dpkg -l | grep php| awk '{print $2}' |tr "\n" " "
then remove unneeded packages with sudo aptitude purge your_packages_here or if you want to directly remove them all use:
sudo aptitude purge ``dpkg -l | grep php| awk '{print $2}' |tr "\n" " "``
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dpkg-reconfigure tzdata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -r --merged | grep -v master | sed 's/origin\///' | xargs -n 1 git push --delete origin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git archive INSERT_THE_COMMIT_HASH_HERE media|tar -x -C . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT engine, table_name FROM INFORMATION_SCHEMA.TABLES where table_schema='DB_NAME'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Resize images in a folder in place | |
find $1 -print0 -type f -and \( -iname '*.jpg' -or -iname '*.jpeg' -or -iname '*.gif' -or -iname '*.png' \) | xargs -0 -P 4 mogrify -verbose -filter Triangle -define filter:support=2 -thumbnail '2560x1440>' -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 75 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB | |
find . -print0 -type f -and \( -iname '*.jpg' -or -iname '*.jpeg' -or -iname '*.gif' -or -iname '*.png' \) | xargs -0 -P 4 mogrify -verbose -filter Triangle -define filter:support=2 -thumbnail '50%' -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 75 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* To force backgrounds to be printed (can be useful when you "print" a pdf), | |
* add this CSS (compatible with Safari and Chrome) */ | |
html { | |
-webkit-print-color-adjust: exact; | |
print-color-adjust: exact; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delete from wp_posts where post_type="revision"; | |
delete from wp_posts where post_type="booked_appointments"; | |
delete from wp_postmeta where post_id not in (select ID from wp_posts); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cut -d' ' -f 2- var/log/system.log |sort|uniq -c|sort -rn|head | |
grep exception var/log/exception.log |sort|uniq -c|sort -nr|head |