Using multiple Gmail accounts with mailto: links in Firefox

By , 2012-08-19 20:36

For a while now, Google has allowed you to sign in to multiple Google accounts and switch back and forth between them quite easily. Firefox also allows you to use Gmail as the default application for mailto: links.

This is all fine and dandy, until you click a mailto: link and decide you don’t want to send that e-mail using your primary Gmail account. In my case, this happens when replying to posts on craigslist. I always assumed there wasn’t a “clean” solution, resigning myself to copying and pasting the e-mail and subject lines, or even at times clicking the mailto: link on my Android phone, which allows me to select any account on my phone to send the e-mail from.

Finally decided to do some research and found a solution on the mozillazine forums.

To summarize:

  1. Go to about:config in Firefox
  2. Set gecko.handlerService.allowRegisterFromDifferentHost = true
  3. Open the Web Developer scratchpad. (Firefox> Web Developer> Scratchpad or Tools>Web Developer > Scratchpad)
  4. In the scratchpad, type the following line of JavaScript:
navigator.registerProtocolHandler("mailto",
  "https://mail.google.com/mail/b/[email protected]/?extsrc=mailto&url=%s",
  "Description of your Gmail Account");
  1. Repeat the line as many times as necessary, once for each of your Gmail accounts.
  2. Once you have created all the necessary lines, go to Execute > Run.
  3. The “information bar” will pop up in your main Firefox window, asking you if you want to add your Gmail account as a handler for mailto: links. Accept once for each account.
  4. That’s it. Now when you click a mailto: link, you’ll be prompted which Gmail account to use.

NBC Has Decided To Stop Making Great Shows Like ‘Community’

By , 2012-07-29 20:30

The four biggest sitcoms of the last 30 years were all NBC shows, and they were all somewhat broad: Seinfeld, Cheers, The Cosby Show, and Friends. But they were also original for their time: A show about nothing; an after-workplace comedy that dealt with social issues and recurring themes; the first family sitcom to center on an upper class black family; and, of course, Friends, which doesn’t seem novel now because every show is Friends, but a collection of attractive people who did mostly nothing was novel at the time.

via NBC Has Decided To Stop Making Great Shows Like ‘Community’.

Well that’s just wonderful. Let me think of my favourite (currently airing, US-based) comedies right now:

Community, 30 Rock, Parks and Rec, How I Met Your Mother.

See a pattern? Excluding HIMYM they’re all “witty”, “sophisticated”, “critically-acclaimed” shows on NBC. Which also happen to have poor Nielsen ratings.

Witty, sophisticated and critically acclaimed.

I was going to ramble on about why Nielsen ratings are dated, but you can just read about that anywhere on the Web.

Hopefully NBC execs will come to their senses and our “sophisticated” comedies will live on. Or perhaps it’s time for a new way to fund and distribute quality entertainment?

Syncing config files to a subversion repository automatically

By , 2012-07-18 11:05

Here’s a script I cooked up for syncing my Web server’s config to a subversion repository.

Before running the script, initialize an svn repo at /root/subversion/serveurs-web.

#!/bin/bash
# Path to the previously created SVN repo
svnpath=/root/subversion/serveurs-web
 
# use rsync to copy config files from /etc to svnpath. Allow delete, but don't touch the .svn folder
rsync -auz --delete --exclude=.svn /etc/lighttpd $svnpath/web1/etc/
rsync -auz --delete --exclude=.svn /etc/php5 $svnpath/web1/etc/
 
#svn status $svnpath
 
# svn auto delete, add and commit script stolen from http://blog.sosedoff.com/2009/01/16/svn-auto-add-and-delete/
echo "processing files to add..."
svn status $svnpath | grep "^?" | sed -r 's/^\?[ ]+//' | xargs -r svn add
echo "processing files to delete..."
svn status $svnpath | grep "^!" | sed -r 's/^\![ ]+//' | xargs -r svn delete
echo "processing commit..."
svn commit $svnpath -m "automatic commit from $HOSTNAME"
 
# done!

Summertiiiime … At work.

By , 2012-07-17 15:43

OK so time to revive my poor neglected blog.

It’s officially summer! Old news, I know, but I have to establish setting for my writing.

Summer means slow days at work, with a parking lot that has considerably more vacancies than usual. It also means we can use the school’s gym at lunch – I played basketball today for the first time since my collar injury and it went pretty well. Good times. From a sysadmin standpoint, slow days are great because there are less people around to complain about things being broken, so we take more liberties and break more stuff. (Usually making sure to fix it fairly quickly anyway though. Usually. )

This week I’m working on archiving e-mails with Symantec Enteprise Vault for Microsoft Exchange. It’s a pretty cool but pretty complex application, and it generally works pretty well. All the same, dealing with Exchange and Outlook and PST files (and a few PICNIC cases…) makes me wish we could use more cloud services. Like Google Apps for education: FREE managed e-mail with oodles of storage. Not to mention the rest of the Apps suite. Or even Microsoft Office 365. Anything but on-prem. This is one reason why I both love and hate working in tech for education.

On the slightly more fun (and not coincidentally, more FOSS) side of things, I just successfully updated our Web server environment to Proxmox 2/Debian 6. Which took a whopping… 2 hours. For 50+ independent sites with MySQL DBs. Do I ever love virtualization and shell scripts. (Sidenote: Firefox’s spell check doesn’t recognize “virtualization” as a word. It’s 2012 guys!)

Anyway, the PST migrator just dinged. Better go check on it.

More summertime stories with less work to come at some point.

Simple PHP script to display user’s IP address

By , 2012-06-13 13:22
< ?php
// Stolen from: http://www.cyberciti.biz/faq/php-howto-read-ip-address-of-remote-computerbrowser/
// and http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html
// with CSS from http://www.w3schools.com/css/css_examples.asp
 
function getRealIpAddr()
{
    if (!empty($_SERVER['HTTP_CLIENT_IP']))   //check ip from share internet
    {
      $ip=$_SERVER['HTTP_CLIENT_IP'];
    }
    elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))   //to check ip is pass from proxy
    {
      $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
    }
    else
    {
      $ip=$_SERVER['REMOTE_ADDR'];
    }
    return $ip;
}
 
$adresseip = getRealIpAddr();
?>
<html><head>
<title>Adresse IP: < ?php echo $adresseip; ?></title>
<style type="text/css">
div { font-family:"Segoe UI","Lucida Grande","Calibri","Tahoma","Sans"; }
div.ip { font-size:250%; }
div.desc { font-size:200%; }
</style>
</head>
<body>
<div><img src="csdccs-blanc.png" alt="logo CSDCCS" /></div>
<p><div>Votre adresse IP: </div>
<div>< ?php echo $adresseip;?></div>
</p>   
</body>
</html>

Union Station subway replacement buses

By , 2012-06-09 19:40

The secret nightlife of status LEDs

By , 2012-06-03 01:59

Pretty rad.

Canon Rebel XSi, Canon EF 24mm f2.8 prime.

1/15, f2.8, ISO 800

5" f3.2 ISO 200

30" f6.3 ISO 200

30" f2.8 ISO 400

30" f2.8 ISO 1600

 

 

“Unlimited” analogies – stolen from Gizmodo

By , 2012-06-01 01:27

I love Internet comment analogies.

Re: “Unlimited” talk/text/data plans

4n7h0ny – Thu 31 May 2012 11:59 AM

I don’t get it, how can a carrier legally say that they are offering you unlimited data when it is in fact limited.

How would you feel going out to a nice Las Vegas all you can eat buffet and after your first plate of steak and shrimp someone comes up to you and says,

sorry sir you have hit the limit on our first tier of food, you can only have all you can eat of grits and buckwheat now.

Edited by 4n7h0ny at 05/31/12 11:59 AM

Benedinho @4n7h0ny

They claim it’s unlimited because you are able to access it whenever you want. So you may have a data cap, but if you stay within that cap, you are free to access the network whenever you please. It’s bullshit, but that’s how they’re able to make that claim.

4n7h0ny @Benedinho

So by the same logic when I fill up my car with gas I can drive unlimited miles, that is until I run out of gas.

Makes zero sense and this practice should be outlawed. Unlimited should mean unlimited and limited should mean limited.

wesfx @4n7h0ny

I absolutely agree. I worked in advertising for nearly 15 years… in fact I QUIT that field because of the blatant and aggressively deceptive practices they use. This kind of word twisting needs to be outlawed. They KNOW that they are implying unlimited bandwidth, but they hide behind sophistry and legalese to get out of being truthful.

via You Can Use the iPhone with a Prepaid Plan Very Soon.

Fix file open and “Open containing folder” on KDE/Kubuntu 12.04

By , 2012-04-12 16:02

Kubuntu 12.04 is no longer a Canonical-maintained distribution. As such, support for the firefox-kde-support package has been discontinued.

Here’s a workaround to get firefox’s downloaded file handling to work correctly:

Here is a workaround for the Firefox problem from Canonical support:

1) stop firefox
2) rm ~/.mozilla/firefox//mimeTypes.rdf
3) start firefox
4) download a file
5) open it from the downloads menu and choose the application. Browse to /usr/bin/xdg-open. then check to remember your choice

Source: http://askubuntu.com/a/113090

Toronto 8-bit

By , 2012-04-01 09:36

Custom theme by me. Based on Panorama by Themocracy