Archive
Android got damn slow
Problem
My Android phone got very slow. It started about a week ago. When I visit Gmail, for instance, I have to wait minutes until my new messages appear. If they appear at all… Often, messages are not updated. I click on “refresh”, I wait 2 minutes, but I still get the old messages. What da hell?
Solution
In this forum thread I found the following tip:
“EDIT: I found the solution… Go into the Market and install AdFree. Update the host file and reboot to clear DNS, everything back to normal. Myn’s is preloaded with the Adfree host file and it became outdated.“
AdFree requires root privileges. Doing the rooting process and installing AdFree, my phone got much faster :) I need a few more days/weeks to test it but it looks promising.
Locate big emails in Gmail
“Gmail supports an undocumented ‘size’ search operator that will let you quickly find all the big emails in the mailbox whose size exceeds a particular threshold. The search syntax is:
size:[size in bytes]
To give a real example, a Gmail search query like ‘size:5242880′ will list all big emails whose size is 5 MB or greater while ‘size:10485760′ list messages that are bigger than 10 MB.“
From here.
Check Why your Email was Delivered Late
Amit Agarwal wrote a great post on how to analyze why your email was delivered late.
In short:
- get the original email message (“show original”)
- copy the whole header and insert it in this application: MessageHeader Google Apps Toolbox
- it will analyze and show you where the delay occurred
Send email from command line
Problem
I wanted to send an email notification from command line. I launched a program on my desktop machine at my workplace that would require some days to finish. I want to know when it’s finished and I want to get the result too.
Solution
The email will be sent via gmail, it’s the easiest solution. Here, Sid explains nicely how to configure ssmtp on a desktop. Here I repeat the steps:
Step one:
Install ssmtp: “sudo apt-get install ssmtp“.
Step two:
Edit the file /etc/ssmtp/ssmtp.conf and add the following content:
root=username@gmail.com mailhub=smtp.gmail.com:465 rewriteDomain=gmail.com AuthUser=username AuthPass=password FromLineOverride=YES UseTLS=YES
For this purpose, I created a dedicated Gmail account.
Step three:
Test if it works: “ssmtp recipient@gmail.com < filename.txt“.
You can also send emails with the command “mail“:
mail -s "Subject of the mail" recipient@gmail.com < result.txt
Use Case
In the intro I mentioned that I want to get the result of a slow program. Here is how I did it: the program writes the result in a file called “result.txt“. When it’s finished, a shell script is called that sends the content of result.txt to me:
time ./pe_211.d && ./send-mail.sh
Where send-mail.sh looks like this:
#!/usr/bin/bash mail -s "PE 211" me@gmail.com < result.txt
Related links
- How to send email from the Linux command line (it didn’t work for me out of the box, I had to edit first
ssmtp.conf, as described above) - smtp-cli — command line SMTP client (a powerful SMTP command line client with a support for advanced features, written in Perl)
- How to send mail from the command line?
Mom’s Gmail account is at 98%
Problem
You create a Gmail account for your Mom and a year later she signals that it’s almost full. You told her to delete those “funny” Powerpoint presentations she received but she didn’t listen. How to help her out?
Solution
On my current machine I have lots of free space so I decided to save her mails here. I made a new account for her but I didn’t want to log out from mine while fetching her mails. Here is what I did:
- I made a new account for her (System Settings -> User Accounts, Add). Set her password.
sudo xhost local:mom(where ‘mom‘ is her username)su - momthunderbird(withoutxhostyou’d get an error:Error: cannot open display: :0)- set up her account in thunderbird and download her emails via IMAP
- sort emails by size and delete the biggest ones
Read this post too (Thunderbird + GMail).
Update (20120227)
Mom managed to reduce her space occupation to 37%. What is this if not a full success? ;)
Hide “about the new look | send feedback” in Gmail
Update #2: Check out this post too for an easier solution.
Update #1: This post is deprecated. That damned widget is not shown anymore.
Problem
I upgraded to the new look of Gmail but since then I always get a notification in the bottom right corner with “about the new look | send feedback”. Closing it doesn’t help, upon a new log in it’s there again.
Solution
Install Adblock Plus and add the following filter:
mail.google.com##div[class="GcwpPb-MEmzyf GcwpPb-bEO5kc"]
Something else
Does anybody know how to list the current filters in the new look? I can’t find it anywhere.
Gmail Strikethrough Button
Gmail’s basic HTML view
https://mail.google.com/mail/h/
It loads much faster than the standard view.