A tiny list of Plesk tips that we find useful. Most part of the shell commands muste be entered as root.
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
#!/bin/bash | |
################################################## | |
# | |
# DOWNLOAD WEBSITE LOCALLY USING WGET | |
# | |
# Usage: ./site-archiver.sh https://web6.fr/ | |
# | |
################################################## |
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
#!/bin/bash | |
######################################################################## | |
# | |
# Creates square thumbnails (100x100) from a folder of jpg images | |
# | |
######################################################################## | |
for i in *.jpg; do | |
if [ "$i" -nt "../thumbs/$i" ]; then |
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
#!/bin/bash | |
######################################################################## | |
# | |
# Creates a thumbnail extracted from a video | |
# | |
######################################################################## | |
ffmpeg -i VIDEO.mp4 -ss 00:00:05.000 -f image2 -vframes 1 VIDEO.png |
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
#!/bin/bash | |
# Based on https://gist.github.com/yellowled/1439610 & https://github.com/chuyskywalker/easy-web-video-encode/blob/master/encode.sh | |
CORES=$(grep -c ^processor /proc/cpuinfo) | |
if [ "$CORES" -gt "1" ]; then | |
CORES="$(($CORES - 1))" | |
fi | |
for filename in ./*.mp4; do |
List of commands I often need but never remember...
When there are functions shortcuts, I usualy put ththe code ~/.bash_functions
and source it in ~/.bash_rc
to make it globally available.
Search recursively in the folder ./
for files containing the pattern text
.
Page rules used for caching HTML output on edge servers (excluding admin & preview pages).
URL | Settings |
---|---|
www.domain.com/wp-admin* | Cache level : Bypass |
www.domain.com/*preview=true* | Cache level : Bypass |
www.domain.com/* | Cache Level: Cache Everything, Edge Cache TTL: a month |
CloudFlare's cache should be purged on website updates.
OlderNewer