🔥 Save unlimited web pages along with a full PDF snapshot of each page. Unlock Premium →
Today I will show you how to programatically clear cache in PrestaShop. For example, you can make a CRON task which will execute this little PHP script once or more per day – depending on your needs.
1. Create PHP file in your store root (main) directory and name it as you wish – in this example it'll be cache_clear.php 2. Open this file and paste
3. Change the string vBnmmP3218 to your random one (stronger is more secure). 4. Save the file. 5. Add script URL to your CRON task manager or execute it directly via your browser in format: http://{your_store_url}/cache_clear.php?token=vBnmmP3218
For example: http://example.com/cache_clear.php?token=vBnmmP3218
🔥 Save unlimited web pages along with a full PDF snapshot of each page. Unlock Premium →
Are you a Linux user and/or administrator? These 10 terminal tricks will show you some new and exciting ways you can enhance your workflow, shorten longer tasks, and even have a little fun along the way.
Commands used in this video
Simplify package installation
Use the alias command to create custom commands of your own, and feel free to get creative. In the video, an example is shown of simplifying package manager commands. For example, with Debian/Ubuntu:
alias install="sudo apt install"
With that alias in place, you can simply type install in order to install a package:
install tmux
Similarly, you can shorten that same alias down to just a single character:
alias i="sudo apt install"
And then, package management is much easier:
i tmux
Go ahead and create your own. Here's another one:
alias e="nano"
And that will shorten the command for your text editor.
In order to keep these aliases around, be sure to add the commands that create them to your ~/.bashrc file, so that way they're automatically recreated every time you open a terminal.
Checking your weather forecast
Believe it or not, you can check your local weather anytime right from within your terminal:
curl wttr.in
And there you go – you now know what your weather is like without even having to step outside. Check out the project that makes this possible here.
Running an Internet Speed Test (From Your Terminal)
What's your download and upload speed? This alias will let you know:
Save that file, and then open up your ~/.bashrc and place the following at the end of the file:
source ~/.bash_prompt
The next terminal window you open should use the new prompt.
View Linux command cheat sheets
Viewing man pages might be useful, but cheat sheets are simpler and more to the point. You can view a cheat sheet from cheat.sh by running a command like the following:
curl https://cheat.sh/ls
Replace the command name at the end with the command you want to see information on.
Want more?
Check out the video for even more terminal tips and tricks!