Using mod_rewrite for clean URLs
Say your message board on your blog uses the following request URL to find and display the correct data: http://www.mysite.com/blog/index.php?category=news&year=2012&month=1 This is a rather simple request, but it is not very nice looking or easy on the eye, and it can be improved, for the user end experience. Take this for instance: http://www.mysite.com/blog/news/2012/1 That’s much [...]
Message: [Syntax Error] Expected PlainValue, got ”’ at position x in property {model}
Was getting the above error in my Doctrine project, turned out I had used a single quote in the ORM Annotations: /** * @ORM\Column(type=’integer’, name=’row_number’) * @var int */ protected $rowNumber; Your ORM Annotations must be double quotes ” to allow the read ahead to read ahead…
VPNetMon – close programs when VPN drops
If you are using a VPN to securely download files, whether it be for anomynous reasons or anything else, if the VPN connection gets dropped, your PC may revert to an unsecured connection to continue the operation. VPNetMon is an application that montors your VPN connection and if it drops, the application can be configured [...]
God, Windows is sloooooow
I am assisting a colleague today check out a rather large feature branch. I showed him the branch address and he started checking it out using Tortoise SVN on Windows 7. Upon returning to my desk (Ubuntu 11.10), I decided to merge the branch with the major trunk. I checked out a brand new copy [...]
HEX colour chart with RGB reference
I need this quite often so I thought I would put it on my site. Nothing more, nothing less. (Click it to make it bigger)
CSS properties direction (padding, margins, etc)
You’ll have no doubt seen: padding: 5px 10px 5px 10px; in a CSS file. Do you ever wonder which of the properties are which? Just start at the top and move clockwise until you reach the left side. Top Right Bottom Left It saves doing this:- padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; Just [...]
Ubuntu, Thunderbird always maximised
I recently switched from Linux Mint back to the old trusty Ubuntu (11.10) One major problem was Unity, but I got round this by installing Xfce and use that as a shell instead. Much better. Now, my Thunderbird is proper maximised. Like full screen, so I can’t switch to any applications unless I use ALT [...]
A-Z list of CSS features
Found this great list of CSS features. https://developer.mozilla.org/en/CSS/CSS_Reference
Javascript Hoisting
When using JavaScript, you declare a variable using the var keyword. var myvariable = “a value”; These variables are globally accessible unless they are defined within a function. Javascript performs an operation known as “hoisting” when it compiles which draws all the declarations to the top of the page. Here is a piece of code: [...]
Accessing controller data from a partial viewscript
When using an inline partial viewscript in my form, I sometimes need access to data. I can accomplish this by using a setter and getter with a public function in my form. We’ll use the action “guinness” as the controller action in this example. application\modules\project\forms\guinness\base.php protected $_id; public function setId($id) { $this->_id = $id; return [...]
keep looking »