Archive

Archive for February, 2011

Backup your Gmail messages

February 28, 2011 Leave a comment

You must have heard about the Gmail incident that occurred today. 150,000 users found their e-mail accounts reset.

Remember the motto: “Shit happens.” Gmail is not an exception, so make regular backups of your mails.

Short version

Install Thunderbird, link it with your Gmail account with IMAP, and let Thunderbird synchronize your mails regularly.

Longer version

  • install Mozilla Thunderbird
  • Thunderbird 3.x has built-in support for Gmail, so it’s very easy to set up an account that links Thunderbird with your Gmail account. Create an IMAP account, not a POP3. You can also refer to this post for more info.
  • Don’t be greedy, don’t try to download all your mails in one session. Give it some days, otherwise you risk that Google shuts your account down because of the high load. Download about max. 1 GB a day.

More security

If you make a local backup of your mails, you should protect it. If someone gets to your machine, (s)he can read your mails, right? I suggest storing this backup on a TrueCrypt volume [more info here]. On my laptop, I have an encrypted partition of 20 GB, and I keep my backups there.

Another advantage

If you download your mails with Thunderbird, it has another advantage. As pointed out in this post, with Thunderbird you can sort your messages in descending order by size, thus you can remove messages with large attachments easily. If your Gmail account is 90% full, consider this method.

Categories: google Tags: , , , ,

Conceptual drawings for Star Wars

February 26, 2011 Leave a comment

Here is a nice video with the conceptual drawings of Ralph McQuarrie. “Ralph McQuarrie (born June 13, 1929) is a conceptual designer and illustrator who designed Star Wars (all of the original trilogy), the original Battlestar Galactica (TV), E.T. the Extra-Terrestrial and Cocoon, for which he won an Academy Award.” (from wikipedia)

 

Home page of the artist: http://www.ralphmcquarrie.com.

I found this video in this post (in Hungarian).

Categories: movie Tags:

mp3 tag editor

February 26, 2011 Leave a comment

EasyTAG is a utility for viewing and editing tags for MP3, MP2, MP4/AAC, FLAC, Ogg Vorbis, MusePack, Monkey’s Audio and WavPack files. Its simple and nice GTK+ interface makes tagging easier under GNU/Linux or Windows.” (source)

Installation:

sudo apt-get install easytag

With EasyTAG you can process your mp3 files in batch mode. For instance, you can set the album name for several files with just one click.

Tip: if you want to edit the MP3s in the current directory, launch the application with “easytag .“.

Categories: ubuntu, windows Tags: , , ,

Hide the sidebar on wordpress.com

February 25, 2011 2 comments

Problem

You want to hide the sidebar(s) on your wordpress.com blog.

Solution

Refer to the post Widgets on static pages or single posts by Panos, everything is detailed there.

Lessons learned for me: My current theme (iNove) is a good choice as it supports the possibility to deactivate the sidebar (under Appearance -> Theme Options; this option applies to the blog in general – all dynamic and static pages). Extra for me: the pages without the sidebar become large, I prefer that. There are some themes listed under the link above that have no sidebars but the text is very narrow.

I also posted this question to the forum.

Categories: wordpress Tags: , , ,

Copy and paste the output of a program

February 24, 2011 Leave a comment

It is a common task to copy the output of a program/script and paste it somewhere else. If the output is short (just some lines), we can select the text easily with the mouse. What about longer outputs?

Old method

Until now I’ve been using the following method:

  • ./produce-long-output >a (redirect the output to a temporary file)
  • gedit a (open the temp file with a text editor)
  • CTRL+A (select the whole text)
  • copy selected text to the clipboard
  • paste text to somewhere else
  • rm a (remove the temp file)

New method

Recently, I discovered some tools (xclip and xsel) that can copy a text to the clipboard. With them, it is unnecessary to use a temporary file.

./produce-long-output | xsel

It’ll copy the text to the “primary” clipboard that you can paste with the middle mouse button. If you prefer pasting with Shift + Insert, then copy texts to the 3rd clipboard (it is simply called “clipboard”).

./produce-long-output | xsel -b

Life has become a little bit less complicated :)

Categories: bash Tags: , , , ,

Copy string to X clipboard in shell

February 24, 2011 6 comments

This entry is based on the post Copy Shell Prompt Output To Linux / UNIX X Clipboard Directly.

Problem

Under Linux, you want to copy a given text to the X clipboard. How to do that?

Three different clipboards

First of all, we should know that under X there are three clipboards :)

  • “primary”: The primary one’s paste operation is usually accessed with the middle mouse button.
  • “secondary”: This one didn’t really work for me…
  • “clipboard”: Its paste operation is accessed with Shift + Insert (or right mouse click and Paste in popup menus).

The xclip command

Reads from standard in, or from one or more files, and makes the data available as an X selection for pasting into X applications. Prints current X selection to standard out.

Installation:

sudo apt-get install xclip

Copy a string to the clipboard. By default, xclip copies to the “primary” clipboard.

echo "this is a test" | xclip
echo "this is a test" | xclip -selection primary
echo "this is a test" | xclip -selection p

The three variations are equivalent.

Copy a string to the “clipboard” (3rd clipboard).

echo "another test" | xclip -selection clipboard
echo "another test" | xclip -selection c

The two variations are equivalent.

Copy the contents of a file to the clipboard.

cat file.txt | xclip

Print the contents of the clipboard to the standard output.

xclip -o

Of course, you can use redirection.

xclip -o > out.txt

The xsel command

Retrieve and set the X selection.

xsel is similar to xclip, but it offers some additional features like append, clear, etc.

Installation:

sudo apt-get install xsel

Copy a string to the primary clipboard (default).

echo "1" | xsel
echo "1" | xsel -p

The two variations are equivalent.

Copy a string to “clipboard” (3rd clipboard).

echo "1" | xsel -b

Copy the contents of a file to the clipboard.

cat file.txt | xsel

Print the contents of the clipboard to the standard output.

xsel -o

Homework

Find a solution to copy a string to the “primary” and “clipboard” clipboards, i.e. on both. Hint: “echo homework | xsel -p -b” and “echo homework | xclip -selection p -selection c” won’t work. Post your solution in the comments.

Categories: bash Tags: , , ,

Archives List Generator for wordpress.com

February 23, 2011 2 comments

Problem

I wanted to have an “Archives” page that lists the titles of my posts. This way, I could find the post I’m looking for much easier. Unfortunately I didn’t find this functionality on wordpress.com. I was searching for a solution and I found WordPress ListMaker v2. However, the author provides an EXE only and his program requires your username. This is something I would never give out… On the other hand, I use Linux, so I prefer open source solutions.

So I’ve decided to write a Python script that produces an HTML output, similar to WordPress ListMaker v2.

Demo

You can see my Archives list here. It was generated with my script.

Download

Visit https://github.com/jabbalaci/Archives-List-Generator. Source code is here.

Solution

In a previous post I showed how to get the list of your blog posts. This script is an extended version, it simply produces a formatted HTML output.

Usage:

Modify the beginning of the script: precise the address of your blog, your username, password, etc. Then just simply execute the script. You can redirect the output to a file, then paste the contents of the file to your wordpress.com blog.

[ @reddit ]

Categories: project, python, wordpress Tags: ,
Follow

Get every new post delivered to your Inbox.

Join 72 other followers