Caching is one of the most important things to keep in mind when you are developing a website which is expected to get large amount of visitors. Most web developers neglect caching, some even don’t know correct ways to implement it. In this tutorial, I’ll show you how to enable browser cache of static files… Continue reading [HowTo] Add expires headers to cache static files using htaccess
[HowTo] Check your php and server information using phpinfo()
We can check the php configuration, apache’s loaded modules and all other kinds of PHP configuration using a simple function called phpinfo(). Create a file called infophp.php in your web’s root directory and put the following code in it: <? phpinfo(); ?> This would output all the php configuration info and apache information. You can… Continue reading [HowTo] Check your php and server information using phpinfo()
[Solved] vlc: missing mandatory argument `–user-agent=”VLC media player”‘
Yesterday after upgrading the packages VLC refused to start giving out following error message: VLC media player 1.1.1 The Luggage (revision exported) vlc: unknown option or missing mandatory argument `–user-agent=”VLC media player”‘ Try `vlc –help’ for more information. To solve the error, just reinstall vlc: sudo apt-get install vlc Cheers!
[HowTo] Block and Unblock friends on facebook
A lot of my friends have been asking this to me so I’ll just go ahead and make a blog post for everyone. According to facebook: If you block someone, they will not be able to find you in a Facebook search, see your profile, or interact with you through Facebook channels (such as Wall… Continue reading [HowTo] Block and Unblock friends on facebook
[HowTo] Use mutt with msmtp
Mutt is a small but very powerful text-based mail client for Unix operating systems. Msmtp is a smtp client which is available for Linux as well as windows. Configuring mutt to work with msmtp is fortunately quite easy. Here’s a tutorial teaching the same. Step 1: Find the executable path of msmtp: which msmtp Step 2: Just open… Continue reading [HowTo] Use mutt with msmtp
[HOWTO] Send emails(using mail function) from localhost in PHP through msmtp (using gmail account) on Linux
There’ve been lots of times when I wanted to use the mail() function on my local server. I am sure lots of you would’ve been wanting it too but most of you would’ve settled for PHPMailer or just used a web host to test the code instead. I myself had been doing the same until recently when I finally decided to… Continue reading [HOWTO] Send emails(using mail function) from localhost in PHP through msmtp (using gmail account) on Linux
[HowTo] Configure msmtp to work with gmail on linux
Msmtp is a small but powerful and highly customizable smtp client. You can access gmail smtp using msmtp, which is exactly what I’ll teach in this tutorial. Step by step instructions: Install msmtp and ca-certificates for use with SSL: sudo apt-get install msmtp ca-certificates We’ll create and edit the configuration file using Gedit: sudo gedit… Continue reading [HowTo] Configure msmtp to work with gmail on linux
[SOLVED] No module named gtkhtml2
I came across this error while trying to run BloGTK. I tried installing it from repositories but it failed: sudo apt-get install python-gtkhtml2 Reading package lists… Done Building dependency tree Reading state information… Done Package python-gtkhtml2 is not available, but is referred to by another package. This may mean that the package is missing, has been… Continue reading [SOLVED] No module named gtkhtml2
[HOWTO] Validate Email-address in PHP using Regular expressions (the correct way)
Here’s a function which thoroughly checks email-address and returns true for a valid email address and returns false for invalid one. I thought it was worth sharing so I posted it on my blog. You will find the source link at the bottom. 1 2 3 4 5 6 7 8 9 10 11 12… Continue reading [HOWTO] Validate Email-address in PHP using Regular expressions (the correct way)
Extract almost any archive through terminal using a single command in linux
I came across this simple script on ubuntuforums which I thought was really very useful and worth sharing it on my blog. You can either make a function out of it and put it in .bashrc file or make an executable script and put it in /usr/bin/. Method 1: Open your ~/.bashrc file using any editor. gedit… Continue reading Extract almost any archive through terminal using a single command in linux