Getting your e-mails back after upgrading Thunderbird to version 3
If you previously used version 2.x of Thunderbird and upgraded to 3.x (for example through an Ubuntu release upgrade) you might notice that Thunderbird will not show any of your old e-mails or settings.
This results from a different directory being used for storing profiles and configuration.
You can replace the blank profile with your old one like this:
cd ~
mv .thunderbird .thunderbird-invalid
cp -R .mozilla-thunderbird .thunderbird
Upon its next start, Thunderbird brings up the migration wizard introducing you to a few vers...
Linux: rename or change extension of multiple files
When you need to bulk rename files you can not call "mv *.foo *.bar
" to change the extension of all .foo
files to bar
(because bash resolves wildcards and replaces them with the list of matched files).
This works on linuxes who use the Perl version of the rename
command (like Ubuntu):
rename 's/\.foo$/\.bar/' *
You can also use this to rename other parts of the file, e.g. from flag_en.png
, flag_de.png
etc. to just en.png
or de.png
:
rename 's/^flag_//' *
Note that we used $
and ^
to explicitly look at the ...
ping with timestamps
Use this snippet by Achu from Ask Ubuntu:
ping hostname.tld | while read pong; do echo "$(date): $pong"; done
This gives you lines like:
Wed Nov 4 10:32:31 CET 2015: 64 bytes from 1.2.3.4: icmp_seq=298 ttl=61 time=0.673 ms
Wed Nov 4 10:32:32 CET 2015: 64 bytes from 1.2.3.4: icmp_seq=299 ttl=61 time=0.616 ms
Wed Nov 4 10:32:33 CET 2015: 64 bytes from 1.2.3.4: icmp_seq=300 ttl=61 time=1.04 ms
How to enable MySQL query logging
This will make MySQL log all received queries so you can see for yourself what happens on the database level.
Don't switch this on for production machines!
- Edit your
my.cnf
:
sudo vim /etc/mysql/my.cnf - In the
[mysqld]
section, add:
log=/var/log/mysql.log - Restart your MySQL daemon. On Ubuntu:
sudo service mysql restart
Note that your MySQL performance will suffer. But when you need to enable query logging for a debug fest, you probably don't care about that.
Ever wanted man pages that actually help? Here you go
Enter any command into explainshell and it will explain it to you: split into separate commands (if present), with each option explained.
About
Hello,
This site contains 29761 parsed manpages from sections 1 and 8 found in Ubuntu's manpage repository. A lot of heuristics were used to extract the arguments of each program, and there are errors here and there, especially in manpages that have a non-standard layout.
It is written in Python and uses bashlex, a bit of NLTK (to find the interesting parts of the manpage), a little d3....
Copy a file over SSH
Ubuntu lets you mount an SSH shell into Nautilus from Places -> Connect to server (select "SSH" as server type).
In order to copy a file over SSH from a shell:
scp filename username@remotehost:
The trailing ":" directs the file to username's home directory on the remote host.
You can also copy a file from the remote host to your local machine:
scp remotehost:remotepath localpath
Use the ALT key in a VirtualBox Windows VM
In Ubuntu your ALT key is locked when you're working in VirtualBox. There are two workarounds for this:
- Press the Windows key in addition to the ALT key
- Run the attached registry file and restart Windows. Your left Windows key is now the ALT key.
- If you'd like to map keys differently, here are further instructions
Sync confidential files between unixes using cloud storage and encfs
Note: You might also want to check out BoxCryptor which does pretty much the same, and is supported across many more platforms. I just didn't want to use Dropbox...
I use Ubuntu One to automatically sync confidential files between my machines. The encryption is done via encfs, which is a file-based encryption that simply puts encrypted versions of files from one folder into another. This is well-suited for cloud storage, since it allows syncing single files, not whole crypt containers.
Recipe
I'll ass...
Print large PDFs as a poster
Pdfposter is a Python script that allows to convert large PDFs into a PDF with multiple pages that can be printed and turned into one big poster.
In Ubuntu, you can install it with
sudo apt-get install pdfposter
Scaling to the desired size is a bit cumbersome. If you want to split large.pdf
, I suggest you run
pdfposter -vns 0.5 large.pdf larger.poster.pdf
which will tell you into how many pages the file would be split. Then simply tweak the -s
value till you get the desired number of pages, and remove the -n
to generate the r...
Resolve Aspell errors with your Rails application
If you get an error message like that you are missing the Aspell files a specific language:
No word lists can be found for the language "de"
Solve it by installing the proper package, e.g. on Ubuntu:
sudo apt-get install aspell-de
Heads up: "localhost" may be IPv6 on new linuxes
I've encountered a Ubuntu 16.04 today, where localhost
resolved to ::1
instead of 127.0.0.1
.
This will not usually make a difference, but could be relevant for firewall policies.
ReText
ReText is a cross-platform WYSIWYG-ish Markdown editor.
Toggle editor and preview layout with Ctrl+E
.\
Press Ctrl+L
to split the window for a live preview.
I use it to copy Pivotal Tracker story descriptions over, switch to the preview and have it as a small always-on-top window in a corner of one of my screens.
On Ubuntu, you can use a PPA to install:
sudo add-apt-repository ppa:mitya57/ppa
sudo apt-get update
sudo apt-get install retext
Mouse wheel + Shift key = horizontal scrolling
On Ubuntu, you can scroll horizontally with your mouse wheel when holding the Shift key while scrolling.
It does not work in all applications, but many support it.
How to fix "extconf.rb:8:in `require': no such file to load -- mkmf (LoadError)"
If you're on Ubuntu:
sudo apt-get install ruby-dev
On other platforms: Look for a package containing ruby header files. On Red Hat that's "ruby-devel" likely.
Keep Pidgin up to date
If your pidgin IM fails to connect to ICQ, you may need to update it. The ubuntu default sources are usually outdated.
Just follow the instructions 1-4 and 1-3 on the page linked below.
Making SSL connection work
If you can not connect using SSL, open up the account settings and enable "clientLogin". Also, your Server should be set to slogin.icq.com
.
Skype 4.3 for Linux fixes group chats
Skype has been updated to 4.3 on Linux. This fixes group chat issues with non-linux clients.
If you have previously installed skype via ubuntu packages, you need to remove those fist via
sudo apt-get remove skype skype-bin
Note
Try to install the 32 bit version. In serveral cases this was the way that worked out.
Grab the installer here:
Skype 4.0 for Linux
Promises unified window for all chat conversations, better call quality.
Upgrade seems to work fine. If you installed your old skype from a Ubuntu repository, you need to remove it first using:
sudo apt-get remove skype
Then simply install the .deb
from the official page. You won't lose any settings.
Rbenv: Alias a Ruby version
For newer Ubuntu versions we currently need to install the patch level version 1.8.7-p375, otherwise the dev dependencies from openssl
will cause the installation to fail.
For a project that specifies the Ruby version 1.8.7
in the .ruby-version
the rbenv autoswitch will not work. You have several options how you can solve this problem:
- Install rbenv-aliases, which will alias your Ruby 1.8.7-p375 ...
How to upgrade RubyMine
This card explains how to upgrade an existing RubyMine installation to a newer version. If you're installing RubyMine for the first time, see install RubyMine under Ubuntu. You might also consider installing RubyMine with snap, so it can receive automatic updates (also described in the install card).
This procedure ensures that an update does not totally break your IDE, as it allows you to keep both the previous and the new version of RubyMine:
- [Download the newest version](http://www.jetbrains.com/ruby...
Testing with IE6, IE7 and IE8 on VirtualBox | Shape Shed
I've recently moved from using Parallels for browser testing to Sun's Open Source VirtualBox. Here's a walkthrough on how to get a browser testing suite for free on OSX or Ubuntu.