Minify and Gzip compress CSS & Javascript with zBugs

zBugs is an online service that interrogates your already existing website and attempts to minify and Gzip compress your CSS and JavaScript files. Once the compression process is complete, you can download the new file and replace those on your production server.

Although the service is currently in Beta, it seems to work well without any glitches whatsoever. The user interface is simple, neat and intuitive – make you just wanna compress stuff!

Go check it out

Save Username and Password with Mercurial

As a default policy, Mercurial will always request for your credentials every time you attempt to push changes to your source repository. This only occurs when you choose to use HTTPS as your method of pushing/pulling to a repository. After some time, the process of continuously re-entering your password for the purpose of authentication becomes painful and dull.

Worry not. Thankfully, through a simple modification to your repository’s configuration in the ~/.hgrc file, you can save your username and password so that Mercurial never harasses you again.

To pull this off, create an [auth] section in your ~/.hgrc file. This is where Mercurial prefers to store credentials for HTTP authentication. Pick an arbitrary name for your credentials, then specify a prefix, a username and a password for the credential entry. For instance: say you host your repository on Bitbucket and you wish to save your credentials to avoid the annoying nags during push/pull operations. The [auth] section of your ~/.hgrcconfiguration can be setup as follows:


[auth]
bb.prefix = https://bitbucket.org
bb.username = # your username
bb.password = # your password

The side-effect of choosing this method for persisting your credentials is that: your username and password are exposed in plaintext in your configuration file, and this has some serious security implications.

An alternative is for you to pick SSH as a method of communicating with your repository. Since there’s a lot of certificate/signature checks before data is sent/retrieved, there’s ultimately no need for Mercurial to request for your credentials before any push/pull operation.

You can find more information about this here

Changing the default ASP.NET Trust Level

I normally test my pet projects on my experiment website micaleel.com. Recently, while working to create an invitation page to my new top secret project, I discovered a strange permission error that shoots up every time I send an email using classes from the System.Net namespace.

After a few googling, I discovered that WinHost set the default ASP.NET trust level to Medium. In general, this should be normal for typical .NET web applications. Apparently this isn’t sufficient for sending email through an external SMTP host, for instance Gmail.

Turns out all I needed to rid myself of the error – and the notorious screen of death – is to upgrade the ASP.NET trust to Full. Your web.config file should be like this. This should solve some of your permission woes; it solved mine.

So that’s what __init__.py is used for?

Interesting! I’ve avoided all reasons that’ll make me read a Python book from start to finish – no, I’m not ashamed of myself. Juggling academics and professional software development is already tough enough.

Anyway, in case you don’t already know:

Files named __init__.py are used to mark directories on disk as a Python package directories

There you have it! You can read more about it at this effbot page

International Postgraduate Research Scholarship at Australian Catholic University (ACU)

The International Postgraduate Research Scholarship (IPRS) is funded by the Commonwealth Government for International Students and Administered by the ACU.

The scholarship is for Masters and Doctoral Students, and it covers student’s tuition fees, overseas health insurance costs for the scholarship holder and their dependents.

Applicants can be from any country or region, but must have a Bachelors degree with first class honors or equivalent. The application deadline is October 31st each year.

For more information, visit this link.