July 27, 2011
Moving from Windows to Ubuntu
It’s finally happened.
I’ve become so fed up of Windows 7 freezing while I’m working that my workstation now runs Ubuntu 11.04.
I would have done it a long time ago, except the lack of hardware compatibility kept putting me off.
That said, there are 2 final hardware items that I need to cater for.
DisplayLink USB graphics adaptor for my 3rd monitor. Skype ATA device so I can use my desk phone with the Skype Out number.
read more
July 19, 2011
Downloading SoundCloud Playlists
[Update 21st Aug 2013
Post code replaced with a Github GIST.
Please fork and help improve this script 🙂
[Updated 7th Feb 2012
Changes:
file names are now as they would be if you downloaded via web browser Playlist is now in reverse date uploaded order] I like to have music while I’m coding. It breaks the silence while working alone at home.
When I have music playing, it’s best if I don’t have to think about setting up playlists, which is why I used to listen to the radio.
read more
March 21, 2011
wp-block as a shortcode
In my last post I raved about the excellent plugin wp-blocks by Keir Whitaker and then went on to extend it a little.
Time to extend it a little further, this time by adding a shortcode.
Shortcodes are the handy square bracketed code snippets which conjure up more content and functionality direct from a page or post content.
The wp-blocks plugin is currently intended to work with the theme template files in PHP.
read more
March 18, 2011
Getting a random wp-block by regex
If you’re used to developing with a CMS such as CMS Made Simple, you would be quite used to having blocks of content separate from the main content system. These blocks can be re-used through-out existing content and within the theme templates.
One might even consider this a core function for a CMS. Sadly it’s missing from WordPress. Keir Whitaker has been working on this missing option and gives us wp-blocks.
read more
March 7, 2011
Mimicking wordpress.com’s image resize URIs
To follow up from last night’s entry [Resize images on the fly without messing with image URLs]](/2011/03/07/resize-images-on-the-fly-without-messing-with-image-urls/), I was determined to remove the intermediary step of my_resize_script.php.
I’ve acheived this goal in the mod_rewrite rule, file name and query string now get passed on to timthumb.php.
Updated rules:
RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_URI} .(gif|png|jpg|jpeg) RewriteCond %{QUERY_STRING} (w|h)=(.*)$ RewriteRule (.*) /full/path/to/timthumb.php?src=$1&%1=%2&%3=%4 [L] This will pass both width and height variables into timthumb if they are declared.
read more
March 7, 2011
Resize images on the fly without messing with image URLs
[EDIT: I’ve made this simpler with a follow up post: Mimicking wordpress.com’s image resize URIs]
Exporting a wordpress.com site for use on a standalone wordpress.org install is a joy to set up. The export and import system are simple to use and give little or no issues.
What is a problem is the automatic resizing of images that wordpress.com offers.
One can insert an image in the normal way and then append the image URI with some variables such as width (w) and height (h).
read more
March 3, 2011
Updating WordPress site URLs for different hosts
Why oh why does WordPress insist on storing the site URLs within the database?
Every other project I can think of either keeps it in a config file or doesn’t bother with one and just works with whatever URL it finds itself on.
This is most irritating when you have:
more than one developer working on the same project more than one system for hosting the project (dev, test, live, etc) One way to cope with this irritation is to have a collection of .
read more
October 17, 2010
How to get sfFormExtraPlugin working in Symfony 1.4 using Doctrine
I’m talking about this plugin: http://www.symfony-project.org/plugins/sfFormExtraPlugin
For some reason, getting the plugin to work took a lot of Googling and some trial and error.
So here is how I got it working. Hopefully I did this in the ‘correct’ way…
cd plugins wget "http://plugins.symfony-project.org/get/sfFormExtraPlugin/sfFormExtraPlugin-1.1.3.tgz" tar zxvf sfFormExtraPlugin-1.1.3.tgz mv sfFormExtraPlugin-1.1.3 sfFormExtraPlugin cd .. ./symfony plugin:publish-assets cd web/js wget "http://code.jquery.com/jquery-1.4.3.min.js" wget "http://jqueryui.com/download/jquery-ui-1.8.5.custom.zip" mkdir jquery-ui cd jquery-ui unzip ../jquery-ui-1.8.5.custom.zip mv jquery-ui/css/smoothness ../css</pre> Edit config/ProjectConfiguration.
read more
July 15, 2010
Which Windows applications are used by this web developer?
This list is partly to remind myself what essential apps need to be reinstalled after a system wipe.
But it does have me thinking, what do other web developers use on a daily basis?
Web browsers:
Google Chrome FireFox IE Opera Safari FireFox addons:
Adblock Plus British English Dictionary ColorZilla Dummy Lipsum Firebug Html Validator Web Developer Xmarks Code editing:
PhpEd Eclipse PDT TextPad vim Code tools:
SQLyog WinMerge System tools:
read more
July 4, 2010
Magento: pre filter by multiple option custom attributes
Requirement: pre-filter products by customer group name to product attribute.
I was looking for the “proper” way of filtering items by multiple custom attribute settings, but couldn’t find out how.
So, the following is a brief explanation of how I’ve got this running in Magento 1.4.1.
There are two ways of editing core code in Magento.
Wrong: edit files directly in app/code/core/Mage Right: extend modules and keep them in app/code/local/MyDevCompany If you’re in a hurry, you might edit core files directly and then later copy the altered code out into correctly extended module files.
read more