Home » 2013 » October

Symfony 2 cheatsheet

A cool Symfony 2 website I ran in today is the Symfony 2 Cheatsheet by David Pérez. It sure would’ve been nice if I had this one around when I just started out with the Symfony 2 project I’m working on (which will be launching soon).

Check it out at http://www.symfony2cheatsheet.com.

Propel ORM for PHP

For the last couple of weeks I’ve have been working with Propel ORM for PHP and have really enjoyed using it. Coming from Perl I’m spoiled because it has DBIx::Class which is my ORM by choice and makes fetching data from your SQL database including relational data a breeze. Propel does a really nice job with this as well and though the API differs greatly from that of DBIx::Class I found it easy enough to pick up.

Propel nicely integrates with Symfony 2 and I’m happy with my decision to go with Propel. The alternative would’ve been Doctrine but decided against using it, mainly because of having to learn DQL (Doctrine Query Language). DQL is similar to SQL, but I liked the named methods of Propel better (e.g. filterByCampaign($object) or filterByCampaignId($id)) and in the end with Doctrine you’re still busy writing a dialect of SQL. With Propel and DBIx::Class you can still use SQL when needed (and to be honest I still find it to be a bit awkward at times in DBIx::Class but I understand why it is the way it is). I could also have looked at Zend_Db_Table from Zend Framework which I’ve used in the past but found too limiting.

All in all Propel a nice ORM library for PHP. Be sure to check it out if you haven’t already.


Go concurrency patterns

Golang (or Go) has had my attention for a while now. So far I’ve only played around with it for a bit and recently I decided to use it in a school project in which concurrency is required. Luckily Go has some nice mechanisms in place to take care of this such as channels and goroutines. Today I’ve found the slides Go concurrency patterns by Rob Pike and though I’d share it here.

Firefox zoom reset at 125%

My new laptop has a 17″ full HD screen and I noticed that in Firefox websites would appear larger than they’re actually are. At first I thought I had accidentally zoomed in a bit but Firefox reported it was at 100%. The cause of this behavior is because Firefox looks at the pixel density of your screen and bases its optimal default zoom level on that.

If you want 100% zoom to be really 100% zoom just browse to about:config and search for layout.css.devPixelsPerPx and change its value to 1.0.

How to automatically logon to Windows 7 and Windows 8

Recently I installed the wrong version of ShrewSoft VPN which changed the way my Windows 7 computer would let me login. Changing it to having to select a user at start up before logging in is not the way I prefer it. Windows 8 seems to do this by default, especially when you’ve got your Outlook account linked to it.

Since this isn’t a setting you change often I decided to document it for myself for future reference.

Luckily there’s a little tool in Windows to change this behavior. Simply run the program netplwiz and you’ll see the following screen (click to enlarge):


Simply sign the check box, which in English will probably be something like “Users must enter a user name and password to use this computer”. When saving you’re likely prompted to enter a password for the default account the computer should sign in with. If your account isn’t password protected you can leave this empty. On Windows 8 if you’ve got your Outlook account linked enter your Outlook password.