Recently apt-get update started throwing notices which read:
Ignoring file'opera.list.distUpgrade'in directory '/etc/apt/sources.list.d/'as it has an invalid filename extension
Ignoring file'opera.list.save'in directory '/etc/apt/sources.list.d/'as it has an invalid filename extension
It occured because sources.list.d directory isn’t supposed to contain files with .distupgrade and .save extensions, but since I upgraded my distribution from 10.04, backup copies of the source files were made with .distUpgrade appended to them. Similarly .save files were not supposed to be in the directory which made it throw this error. Fortunately you can suppress this error by executing the following command:
Tuxguitar stopped working after upgrading to Ubuntu 10.10 Alpha. Many people seem to be having this problem after a distribution upgrade.
The fix is simple. Install timidity and tuxguitar-jsa package.
sudoapt-getinstall timidity tuxguitar-jsa
After the install, run tuxguitar and play a file. You should hear the sound. If you still cannot hear it play, goto Tools->Settings->Sound In the MIDI Sequencer drop down list, select ‘Real Time Sequencer’. In the MIDI Port field, select ‘Gervill’ and click on Ok. Click on Yes when it asks for confirmation.
Try and play sound again, and you should here it this time.
Ubuntu 11.04, which is to be released in April 2011, has been named Natty Narwhal as mentioned on Mark Shuttleworth’s blog. Check out the entire blog post here.
Seems reasonable, as weird sounding as all previous names. Ubuntu, you never disappoint me!
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 simply using htaccess file. Basically server adds the Expires header to file-type you specify. Expires header will make sure the browser stores the file locally and use the same file until the time mentioned in expires header has passed.
Copy the following code and paste it into .htaccess file in your website’s root directory.
# Turn on the Expires engineExpiresActiveOn# Expires after a month client accesses the fileExpiresByType image/jpeg A2592000
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/x-icon A2592000
ExpiresByType text/plain A2592000
# Good for one weekExpiresByType application/x-javascript M604800
ExpiresByType text/css M604800
ExpiresByType text/html M604800
Explanation:
ExpiresActive On turns on the expires engine. ExpiresByType image/jpeg tells server to check if MIME-type of file is image/jpeg. If yes, set the expires header. Read the rest of this entry »
You can enable or disable any apache module using a2enmod and a2dismod. You don’t need to edit the conf file for that unless you are having some problem with this method. The syntax of these commands is really simple: To enable a module:
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 pass on an argument to phpinfo() to limit what information is displayed. You can checkout the phpinfo documentation here.
PS: This is a beginner tutorial for absolute beginners.
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'formore information.
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 posts, Poke, etc.). Any Facebook ties you currently have with a person you block will be broken (for example, friendship connections, Relationship Status, etc.). Note that blocking someone may not prevent all communications and interactions in third-party applications, and does not extend to elsewhere on the Internet.
So in essence you become invisible to that person and there is no way he/she can add you back or search for you unless he/she makes a new profile.
Blocking a friend:
The blocking process is fairly simple and most of you already know it: You just have to click on ‘Report/Block this Person‘ and check the “Block this person” and click on Submit.
Facebook - Block Friend
Unblocking a friend:
Unblocking friend is a little different and is a bit difficult to find at first. Thats why people have been asking about that to me. I’ll show you how to do it: Read the rest of this entry »
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 ~/.muttrc using a text editor and add the following code to it:
Replace PATH with the executable path of msmtp and replace fromaddress@example.com to the FROM address you want in your email address to appear. For me the code looks like the following (on Ubuntu 10.10):
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 do some research and get it to work.
Here are the steps in short for the geeks who like to do things on their own: All I did was used smtp client called msmtp, configured it to work with my gmail account and configured PHP to use msmtp to send emails.
This tutorial is only applicable for linux users. I’ll write another article for windows users soon when I get my hands on a windows box. All the commands used in the instructions are for Ubuntu, however you may use corresponding commands for your distro (for eg; you can use yum install instead of apt-get install on fedora, redhat, centos.