fetchyahoo 2.14.0 deb package for Ubuntu 10.10 Maverick

On Nov. 16th, fetchyahoo 2.14.0 was released, and I did not find any deb package available for it on the Launchpad PPA’s. And I used to package it before, so it took me not very long to update the package to the newest version.

Fetchyahoo is a script written in Perl which fetches your email from Yahoo! Mail and either saves it in your mbox or can also send it to an IMAP folder. It pulls email using the web interface which is very useful for those with Yahoo Mail who do not have POP3 or IMAP access, since POP3 access for Yahoo Mail seems to be a paid service.

The deb package for fetchyahoo 2.14.0 is available from my PPA. You can either add it to your sources.list:

sudo add-apt-repository ppa:weboide

or you can directly download it from launchpad:
fetchyahoo_2.14.0-0ubuntu1_all.deb

How to restrict a specific package from installing (apt pinning)

I tend to be very picky so there are a couple of packages which I do not want installed on my machines:

  • msttcorefonts: the Microsoft-like fonts. If you have those installed, Firefox will use them and you will get ugly windows-like font on most websites which I personally hate.
  • wine: Application to run windows programs on linux. For security reasons.
  • postfix: a mail server. Just because I do not want to run a mail server on my netbook.
  • …and some other

The best way to restrict those packages from being installed is through Apt Pinning.

Apt pinning

It is very easy to pin packages and restrict them from being installed.
You will need to edit /etc/apt/preferences and add something like this:

Package: msttcorefonts
Pin: version  0.0
Pin-Priority: -1

Package: ttf-liberation
Pin: version  0.0
Pin-Priority: -1

Package: ttf-mscorefonts-installer
Pin: version  0.0
Pin-Priority: -1

Package: wine
Pin: version  0.0
Pin-Priority: -1

Package: postfix
Pin: version  0.0
Pin-Priority: -1

Pin-Priority: -1 restricts the given version from being installed, and the version 0.0 does not exist and should be a lower version than any versions of the given packages. As a conclusion, they will never be installed.

Be careful what you pin, though, as you might be too restrictive and could prevent installing or upgrading other useful packages.

How to set up Expires header with Apache2 on Ubuntu Lucid 10.04

A very good way to reduce page load time on your website is to tell your visitors’ browser it can cache some specific files and save a copy on the disk.
This process is done by your web-server which is sending an Expires header and a max-age header during the HTTP response, e.g.:

200 OK
Cache-Control: max-age=604800
Connection: close
Date: Tue, 27 Jul 2010 22:31:03 GMT
Accept-Ranges: bytes
ETag: "2c956-376b-4696cb8b385c0"
Server: Apache/2.2.14 (Ubuntu)
Content-Length: 14187
Content-Type: image/gif
Expires: Tue, 03 Aug 2010 22:31:03 GMT
Last-Modified: Fri, 08 May 2009 20:46:23 GMT
Client-Date: Tue, 27 Jul 2010 22:31:02 GMT
Client-Peer: 127.217.30.5:80
Client-Response-Num: 1

Apache2 offers this feature through its mod_expires module. Note that this module is usually disabled by default, meaning your visitors would download all the files over again each time they change the page.

Continue reading “How to set up Expires header with Apache2 on Ubuntu Lucid 10.04”

How to backup MySQL users except root on Ubuntu

When you want to backup your mysql databases, you usually do mysqldump … –all-databases or mysqldump … –databases mysql … but you end up with the whole mysql table which is a pain to insert back when you need it because it can mess up the root password or the debian-sys-maint user…

If you wish to just backup all the users and privileges other than root and debian-sys-maint, you can use this command:

mysqldump -nt -uroot -p -w"User NOT LIKE 'root' AND User NOT LIKE 'debian%'" mysql user db > users_privs.sql

Here’s an explanation of each of the options:

  • -nt: Do not add “drop table” and “create table”.
  • -uroot -p: Connect as root and ask for a password
  • -w…: Add a “WHERE” condition to each query. We exclude everything related to root and debian-sys-maint.
  • mysql user db: Dump the user and db tables from the mysql database.
  • > users_privs.sql: Store the sql dump into the users_privs.sql file.

Things to remember to backup or copy when migrating servers

A new version of your operating system just got released and you want to have a fresh new install, or you want to migrate all of your data to another machine. There are so much stuff to backup that you don’t even know where to start?
I will try to list the most common stuff (on a web-server) to backup or copy somewhere when you want to do a server migration.

Continue reading “Things to remember to backup or copy when migrating servers”

[ubuntu] Smasher 1.1.1 deb package for Jaunty

Smasher is an easy to use and lightweight audio loop slicer for Linux and Windows. I decided I would give it a try and that I should package it for Ubuntu (see Download section below).

It might need a little time before you figure out how this thing works. First you need to understand the Patterns (upper-right part); Smasher divided the file you’ve given him into slices, and each slice gets a number and that’s the numbers you see on the left. From there, you can select in which order to play the slices.
Below the pattern area, there is the effects area, that’s where you can apply an effect to each slice (first column for first slice being played). Then it is very easy to understand the rest of how it works.

Important: Smasher doesn’t seem to support (or struggles with) files that are relatively big. I suggest you stick with mp3’s that are less than 1mb, or Wav files are less than 2 or 3mb. Otherwise you’ll see your Ram memory go up and your computer will start freezing.

Here are some of the features it offers (from official website):

  • slice loops in seconds
  • load MP3, WAV, FLAC and AIFF
  • save as WAV
  • resonant filters
  • effects
  • share presets online
  • sample packs
  • free and open source

Screenshots:
smasher-1
Continue reading “[ubuntu] Smasher 1.1.1 deb package for Jaunty”

[Ubuntu] Spell-check from command-line using hunspell

If you are a developer or simply a command-line geek/fan, there are times where you type some documents using the command line, like for README’s or for documentation. It is also important to have a very good writing in English if you wish to distribute those files.

Hunspell can help you with spell-checking. It is based on MySpell and contains a nice terminal interface to spell-check your files.
Continue reading “[Ubuntu] Spell-check from command-line using hunspell”

Nature knows what’s best!

My wife and I recently went to Fort Wayne, Indiana and we enjoyed it a lot. Amongst all the things we’ve visited, we went to a flower conservatory and they had butterflies there. A couple of them really seemed to like the Ubuntu logo on my T-shirt. …And everyone knows that nature knows what’s best!

See for yourself.

Butterfly on Ubuntu logo (shirt)

Full size image.

The two pictures are also licensed under CC BY-SA.