Joseph Crawford Using wordpress because he is lazy

20Dec/0811

Add a file extension to gedit in Ubuntu

I needed .ctp files to open with PHP syntax highlighting in gedit. After searching around online for a while I found the answer on the ubuntu forums.

Add

<glob pattern="*.ctp"/>

to the

<mime -type type="application/x-php"></mime>

declaration in the /usr/share/mime/packages/freedesktop.org.xml file and then run:

update-mime-database /usr/share/mime

in the console. Restart gedit and now everything works great!

Tagged as: , , , 11 Comments
20Dec/080

HTML Tidy

I will admit I tend to be a little picky when it comes to how my code looks, HTML included. I hate having to go through all my PHP to try and make sure all my included files are outputting in the same structure as everything else so that when I view the source of the final product it is all nice and readable. Most people probably don't care. There are others that don't want any formatting at all believing that it saves load time not having all those extra tabs and spaces. Which is true by the way...remove all formatting from your html and you won't believe how much it lowers your file sizes, especially with large web sites. But when it comes to maintaining the site (if you aren't using some wysiwyg) you will curse the day you removed all that nice structure.

Tagged as: , Continue reading