Category Archives: Technology

Technology Related Posts

Android Outlook Exchange Email Settings for QUT Staff

Setup QUT Student, Staff Email on Android Devices

Having access to my work/school email on my smart phone is important me when I am ‘working from home, away from home’. I recently switched to my Nexus S and upgraded the OS to the latest Ice Cream Sandwich. But when I tried to add my emails, there aren’t many guides on the QUT website on setting up exchange email accounts on Android devices. As always, after a bit of Googling and guess-work I was able to set up my two accounts on my Nexus S. And this is how I did it…

Undergraduate Student E-mails

For all QUT undergraduate and non-research degree students who have @connect.qut.edu.au email addresses,
Android Outlook Exchange Email Settings for QUT Connect Student

  • Username: \firstname.lastname@connect.qut.edu.au
  • Server: pod51000.outlook.com

Staff E-mails

For QUT staff email accounts that end with @qut.edu.au,
Android Outlook Exchange Email Settings for QUT Staff

  • Domain\Username: qutad\USERNAME
  • Server: outlook.qut.edu.au

Research Student E-mails

I’m doing my PhD at QUT, and all HRD (ie PhD and Masters Research) students have a different type of email accout (similar to staff emails) which end with @student.qut.edu.au,
Android Outlook Exchange Email Settings for QUT HRD Student

  • Domain\Username: qutad\USERNAME
  • Server: outlook.qut.edu.au

How to connect to a QUT Wireless network from Android?

QUT wireless networks offers two different Wi-Fi access points to connect across all campuses. The ‘QUT’ access point is usable for all students and staff, while the ‘eduroam’ access point can additionally be used by visitors from participating institutions. Setting up the ‘eduroam’ network can enable us use our devices when travelling to other participating institutions.

QUT & Eduroam Wi-Fi Settings for Android

  • Menu -> Settings -> Wireless -> Wi-Fi
  • Choose a network: QUT (or eduroam)
  • EAP Method: PEAP
  • Phase 2 authentication: MSCHAPv2
  • CA Certificate: [Leave Unspecified]
  • User Certificate: [Leave Unspecified]
  • Identity: USERNAME (or USERNAME@qut.edu.au for eduroam)
  • Anonymous Identity: [Leave Blank]
  • Password: PASSWORD
  • Connect!

Notes:

The settings pages and options may sightly vary depending on the device, OS version, and applications. The USERNAME is what you would normally use to login to a QUT computer. We should use USERNAME@qut.edu.au only to connect to the ’eduroam’ network. The following pages on the IT Services webpage can give latest and more details.

Google Apps mail to Gmail

Back to Gmail: Migrating emails from Google Apps mail to Gmail

It is a common scenario for people to migrate their Gmail accounts to Apps mail accounts. There are more than many how-to guides and tutorials covering this direction of the migration. But how about the opposite.

There are many obvious reasons for someone to migrate (back) to Gmail from a Google Apps mail account. Google Apps mail is used by many organisations, schools, etc. Thus, when we leave from that organisation, it becomes a necessity to migrate all our emails elsewhere.
Google Apps mail to Gmail
So lets jump into this quick tutorial on how to migrate all emails from Google Apps mail to Gmail. There are few other mechanisms suggested across the internet, but the one that works smoothly is using “imapsync”.

“imapsync” software is a command line tool allowing incremental and recursive IMAP transfers from one mailbox to another. It is useful for Gmail account migration or account backups.

IMPORTANT NOTE:

  • imapsync” was a free tool, but now the author is charging almost $45 for a copy. It is affordable for commercial use, but for personal use the price is an overkill.
  • The earlier versions of this software can be found on the internet and still be used without copyright violations. (DOWNLOAD the earlier version for FREE).
  • This guide is based on a Windows installation. The use can be easily adapted to Linux and other platforms as we will be compiling from the Perl source code and running the software. (Those who are on Linux, you could simply follow the install instructions with the download file).

Step 1: Install Perl

  1. Download and install “Strawberry Perl”. (Install to the default install location).
  2. Double-click and Run the “update_env.pl” batch file to add the environment variables.

Step 2: Setup the Prerequisites

  1. Open “CPAN Client” under Start Menu -> Programs -> Strawberry Perl -> Tools.
  2. Run the following commands individually:
    • install Mail::IMAPClient
    • install Digest::MD5
    • install Term::ReadKey
    • install IO::Socket::SSL
    • If this presents a warning with “Net::SSLeay could not find a random number generator” and “Do you REALLY want to continue? [Default: no]“, give “yes” and continue.
  3. install Date::Manip
  4. install File::Spec
  5. install Digest::HMAC_MD5
  6. install PAR::Packer
  7. At this point you should be all set with the Perl setup and the following command should not give any errors.
    • perl -mMail::IMAPClient -mDigest::MD5 -mTerm::ReadKey -mIO::Socket::SSL -mDate::Manip -mFile::Spec -mDigest::HMAC_MD5 -e ”

Step 3: Install ‘imapsync’

  1. Download the earlier version of ‘imapsync’ for free from here (or buy the latest version from here).
  2. Extract the downloaded file, if you can’t extract a tar.gz, use 7-Zip.
  3. Open the “build_exe” batch file in a Notepad and change the folder path to the extracted folder.
  4. Run the “build_exe” batch file.
  5. This should have created a “imapsync.exe”.

Step 4: Using ‘imapsync’

  1. Open “Command Prompt”.
  2. Change directory to the ‘imapsync’ folder.
  3. The basic ‘imapsync’ command is,
    • imapsync --host1 mail.oldserver.com --user1 theoden ^
      --host2 mail.newserver.com --user2 'theoden@newserver.com'
  4. For Gmail, change the following command with your Apps mail login and Gmail login details.
    • imapsync ^
      --host1 imap.gmail.com --port1 993 --ssl1 --authmech1 LOGIN ^
      --user1 theuser@oldmail.com --password1 password4user1 ^
      --host2 imap.gmail.com --port1 993 --ssl2 --authmech2 LOGIN ^
      --user2 newuserid@gmail.com --password2 password4gmail ^
      --split1 100 --split2 100 ^
      --reconnectretry1 30 --reconnectretry2 30 ^
      --noauthmd5 --noreleasecheck ^
      --timeout 1200  --allowsizemismatch
  5. Paste the modified command into the Command Prompt, ‘imapsync‘ should sync you mail accounts accordingly.
  6. It could take, hours (or days) to complete the sync, based on your internet connection speed and the amount of email in your mailboxes.
  7. For more ‘imapsync’ command reference run,
    • imapsync --help
  8. Once the sync is complete, you could also setup a forward all mails to the new Gmail account from the old Google Apps mail account.

This guide can look a bit more technical and for the ‘geek-handed’. If you follow the steps it should be straight forward.

However, if you are afraid you might burn your computer by doing this, just ask your friendly geek-next-door, and s/he should be happy to help you.

Happy migrating back to Gmail…!

Fate of Buxfer: The Expected

Buxfer (www.buxfer.com) is the free online personal finance software that I’ve been using for the past two years. It offers budgeting, planning and online money management. This is one of the best online finance tools for those who live outside US and/or prefer imputing bank transactions manually. The great and unique feature of this is the ability to track split bills and IOUs with friends and roommates, and this became very useful after I started sharing a house with friends.

Buxfer co-founders

From left, Ashwin Bharambe, Amit Manjhi,and Shashank Pandit, co-founders of Buxfer. (A 2006 photo from Post-Gazette by Lake Fong)

Buxfer was launched in 2007, but due to unknown reasons (may be loosing popularity) the founders abandoned the project and left to work for Facebook. When this news got public I emailed one of the founders Shashank Pandit, and asked about the fate of Buxfer. His reply was,

From: Shashank Pandit
Date: Fri, Nov 5, 2010 at 4:41 PM
Subject: Re: Buxfer Closing Down
To: Nimal

Hi Nimal,

Rest assured, we will notify you if we were to shut the service down and give you the chance to download your entire data. For now, we don’t have any plans to shut down. Curious: where did you hear this from?

Cheers,
Shashank.

It was not until late 2010, I started having major problems with Buxfer. Random short outages were happening time to time, but it was acceptable until that point. But during the last week of 2010 things got messy and the website went down for more that two days. I thought this is my time to move on, and switched to a simpler Google Spreadsheet. I tried other similar websites, but only a few of them support non-US accounts and non of them have proper IOUs as Buxfer has. Managing too many transactions on a spreadsheet can be a pain, but it can be more reliable and in control than these cloud services.

Buxfer suffered another long outage during last week for four days, and even lost some of their data. They posted an update on my account that some transaction details were lost as a result of this. I checked my account to find that all my transactions after December 26th were lost. Luckily I downloaded all transactions on December 31st and started using Spreadsheets to manage my transactions from 2011.

Buxfer was offline for the last four days. Our hosting provider had severe availability issues because of which our servers were down. We had to migrate our service to new servers in order to get the site back up. In the process, some data might have been lost and we sincerely regret that.

One would not expect this from a finance software, but it’s explained by the following statement, which shows the current state of Buxfer as a company. For the first time they have accepted (even though it was already known) that this is now a part-time project for them.

Since the past year, Buxfer is being maintained part-time by one of its original founders. The goal of Buxfer is no longer to make a profit, but to continue to serve its users the best way it can. The membership fees we charge are barely sufficient to cover the costs of running this service. Many of you have written to us saying that it might be better to shut down the service instead of providing a service with lack of proper support. If that’s what most of our users feel, we are planning to shut down Buxfer in the near future.

I guess its time for another great service to part from the Internet. I believe this project could be open-sourced and live long as a personal hosted service. It’s unfortunate that a useful product like this is going to die, but its the way things are on the Internet, and we learn to live with it.

LaTeX on Windows with MiKTeX and Notepad++

Notepad++ is a versatile text editor and source code editor for Windows. I use it as my default text editor on Windows. For convenience of compiling .tex files while editing we can simply add a run command to Notepad++.

This is a simple “how to” for conveniently using Notepad++ as the editor for LaTex (using MiKTex) on Windows.

  • Install MiKTeX
  • Install Notepad++. (This comes with syntax highlighting for LaTeX, but for BibTex add the user style.)
  • Create a .bat file with the following code:
    :: Called from Notepad++ Run
    :: [path_to_bat_file] "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
     
    :: Change Drive and  to File Directory
    %~d1
    cd %1
     
    :: Run Cleanup
    call:cleanup
     
    :: Run pdflatex -> bibtex -> pdflatex -> pdflatex
    pdflatex %2
    bibtex  %2
    :: If you are using multibib the following will run bibtex on all aux files
    :: FOR /R . %%G IN (*.aux) DO bibtex %%G
    pdflatex %2
    pdflatex %2
     
    :: Run Cleanup
    call:cleanup
     
    :: Open PDF (Script updated based on comments by 'menfeser'
    :: START "" "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe" %2.pdf
    START "" %2.pdf
     
    :: Cleanup Function
    :cleanup
    :: del *.log
    del *.dvi
    del *.aux
    del *.bbl
    del *.blg
    del *.brf
    del *.out
    goto:eof
  • Add the batch file as a run command:
    • Notepad++ -> Run -> <PATH_TO_BAT_FILE> “$(CURRENT_DIRECTORY)” “$(NAME_PART)”
    • (Note the surrounded ” before and after CURRENT_DIRECTOR and NAME_PART)
    • Create a keyboard shortcut for this.
  • Now create a LaTeX file in Notepad++, Save and Run (using the short key defined).

Note:

  1. MiKTex should be added automatically to Windows “path” when it is installed, if not add “WHERE_MIKTEX_INSTALLED\miktex\bin” to path manually.
  2. This is just a work flow that works for me, you can modify it to suit yours.
  3. Plagiarised from various sources on the Internet. :)

Parse RSS feeds with PHP

RSS feeds are very common today, and at times we want to write a simple script to grab some information from a feed.

PHP has got and extensive set of functions that can be used to manipulate XML (RSS feeds or even HTML) files. PHP DOM library is one of the handy libraries that can be used to parse RSS feeds in PHP. DOM (Document Object Model) is a standard way for accessing and manipulating XML documents. XML documents can be represented in tree-structure (a node tree), with the elements, attributes, and text defined as nodes.

Below you can find the script for parsing a standard RSS feeds:

// Create a new DOMDocument object
$doc = new DOMDocument();
 
// Load the RSS file into the object
$doc->load('http://feeds.feedburner.com/talkouttrojans');
 
// Initialize empty array
$arrFeeds = array();
 
// Get a list of all the elements with the name 'item'
foreach ($doc->getElementsByTagName('item') as $node) {
	$itemRSS = array (
		'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
		'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
		'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
		'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue
	);
	array_push($arrFeeds, $itemRSS);
}
 
// Output
print_r($arrFeeds);

The getElementsByTagName method is used, within the loop of the item nodes, to get the nodeValue for the title, description, link and date tags. The nodeValue is the text within the node. An array is used to store each set of values and each array represents an entry in the big array that holds our structured RSS data. At the end of the script all the data will be hold by the $arrFeeds array, which is well structured and can be used to display or further manipulation.

One drawback of using the DOM library is that it reads the entire XML document into memory, and then we use the functions for manipulating the data. Thus this method is that is not recommended for large XML documents, which would take too much memory to build the model of the document.

Anyway, usually the feeds we are dealing with are of normal size, and this won’t be an issue at most occasions.