Slick Knowledge Base brings you dozens of articles from various topics. Web design, programming, operating systems, software, hardware. Explore and enjoy!
Knowledge is the biggest treasure of humanity. I believe that by sharing my experience from IT sector and big passion to it, I will be able to wake up creativity inside you.
Several days ago I found, that my WordPress site was under attack. From two previous days, the whole site was very slow when loading but still reachable. I thought that optimizing it by disabling unnecessary plugins, minifying CSS and JS files, creating sprites instead of multiple images will solve the problem but I was wrong.… read more
To prevent from stealing our bandwidth and server resources, we can easily disable hotlinking any image from our site using .htaccess file. All you have to do, is to paste into .htaccess file the following code: Now, when someone will try to fetch an image or a photo located on your website (by inserting BBCode… read more
Sometimes your scripts will consume a lot of memory. Lack of it may cause in PHP throwing a fatal error with something like this below: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 103 bytes) The amount of bytes may be different but rest will be the same. To prevent it,… read more
There are many opinions about content of robots.txt, that should be included to your WordPress site. One of the optimal content is presented below: Save this code as a file called robots.txt and copy it to the root directory where your wp-config.php file is located.
You can easily synchronize time of your server or local machine using ntpdate command. Open terminal and type: You can change the address of time server (pool.ntp.org) to a different one that suits you. If you don’t have ntpdate installed, do I with below command:
Sublime Text 2 comes with various colour themes. One of the best theme (in my humble opinion) unfortunately is not included so you have do download it and activate manually. This theme is called Tomorrow Night (with my favourite Blue edition). All Tomorrow themes are made my Chris Kempson and you can obtain them from… read more
If your Debian doesn’t have Software Center installed, you can easily do it by entering following command into terminal: For Gnome: For KDE:
For example – you want to know how many Mondays, Tuesdays etc. are in a specific month and year? Here’s a simple code that returns an array with desired values. As you can see, all you have to set are two variables your_date_month and your_date_year. When you’ll dump days_of_week_array you’ll see for example: Example shown… read more
First step is to be sure that your Squeeze is up to date: Next step is to have proper entries in sources.list file. Edit file by typing: and replace the whole content with: You can change country code to a different one if needed. I’ve used servers from Poland. Now update sources: Than upgrade packages:… read more