<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>Toby&#039;s Technical Ramblings</title> <atom:link href="http://tosbourn.com/feed/" rel="self" type="application/rss+xml" /><link>http://tosbourn.com</link> <description>A web development blog.</description> <lastBuildDate>Mon, 06 Feb 2012 15:08:08 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Useful CSS Links</title><link>http://tosbourn.com/2012/02/design/useful-css-links/</link> <comments>http://tosbourn.com/2012/02/design/useful-css-links/#comments</comments> <pubDate>Mon, 06 Feb 2012 15:04:06 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Design]]></category> <category><![CDATA[CSS]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=851</guid> <description><![CDATA[Here is a dumping ground for any CSS links I find particularly useful. Latest Edited: 06/02/12 Subtle Backgrounds &#8211; Really nice subtle background images you can you use for your next project. CSS3 Button Generator &#8211; For us lazy types who like GUIs for doing this sort of thing!]]></description> <content:encoded><![CDATA[<p>Here is a dumping ground for any CSS links I find particularly useful.</p><p><em>Latest Edited: 06/02/12</em></p><p><a
href="http://subtlepatterns.com" target="_blank">Subtle Backgrounds</a> &#8211; Really nice subtle background images you can you use for your next project.</p><p><a
href="http://css3button.net/" target="_blank">CSS3 Button Generator</a> &#8211; For us lazy types who like GUIs for doing this sort of thing!</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2012/02/design/useful-css-links/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Useful PHP Links</title><link>http://tosbourn.com/2012/02/development/useful-php-links/</link> <comments>http://tosbourn.com/2012/02/development/useful-php-links/#comments</comments> <pubDate>Mon, 06 Feb 2012 14:00:47 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[PHP]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=841</guid> <description><![CDATA[Another post that will be a dumping ground for useful PHP links I have found over time. Latest Edited: 06/02/12 9 Useful PHP functions &#8211; Including string compression and functions with an arbitrary number of arguments. PHP Security Guide &#8211; A really nice security guide for sites built in PHP.]]></description> <content:encoded><![CDATA[<p>Another post that will be a dumping ground for useful PHP links I have found over time.</p><p><em>Latest Edited: 06/02/12</em></p><p><a
href="http://net.tutsplus.com/tutorials/php/9-useful-php-functions-and-features-you-need-to-know/" target="_blank">9 Useful PHP functions</a> &#8211; Including string compression and functions with an arbitrary number of arguments.</p><p><a
href="http://phpsec.org/projects/guide/" target="_blank">PHP Security Guide</a> &#8211; A really nice security guide for sites built in PHP.</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2012/02/development/useful-php-links/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>jQuery Links</title><link>http://tosbourn.com/2012/02/development/jquery-links/</link> <comments>http://tosbourn.com/2012/02/development/jquery-links/#comments</comments> <pubDate>Mon, 06 Feb 2012 13:56:29 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[jQuery]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=838</guid> <description><![CDATA[I will add to this overtime but this will be a dumping ground of useful jQuery links I have found. Latest Edited: 06/02/12 Differences Between jQuery .bind() vs .live() vs .delegate() vs .on() &#8211; Exactly as the title suggests! jQuery Fundementals Course &#8211; An excellent free course in jQuery by Rebecca Murphy, hosted on Github.]]></description> <content:encoded><![CDATA[<p>I will add to this overtime but this will be a dumping ground of useful jQuery links I have found.</p><p><em>Latest Edited: 06/02/12</em></p><p><a
href="http://www.elijahmanor.com/2012/02/differences-between-jquery-bind-vs-live.html" target="_blank">Differences Between jQuery .bind() vs .live() vs .delegate() vs .on()</a> &#8211; Exactly as the title suggests!</p><p><a
href="http://jqfundamentals.com/book/index.html" target="_blank">jQuery Fundementals Course</a> &#8211; An excellent free course in jQuery by Rebecca Murphy, hosted on Github.</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2012/02/development/jquery-links/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Deleting Magento Session Files</title><link>http://tosbourn.com/2012/02/magento/deleting-magento-session-files/</link> <comments>http://tosbourn.com/2012/02/magento/deleting-magento-session-files/#comments</comments> <pubDate>Sun, 05 Feb 2012 16:16:12 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Magento]]></category> <category><![CDATA[Sessions]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=831</guid> <description><![CDATA[Whilst being an excellent ecommerce platform, Magento isn&#8217;t the tidiest of beasts and likes to leave session data lying around at its arse. Session files are tiny so you could be forgiven for ignoring them most of the time, but the issue is there is a lot of them and Magento doesn&#8217;t have a built [...]]]></description> <content:encoded><![CDATA[<p>Whilst being an excellent ecommerce platform, Magento isn&#8217;t the tidiest of beasts and likes to leave session data lying around at its arse.</p><p>Session files are tiny so you could be forgiven for ignoring them most of the time, but the issue is there is a lot of them and Magento doesn&#8217;t have a built in method for dealing with them.</p><p>Because they are so small but there is so much of them I have actually found times when a linux box has ran out of space but reports that there is still some space left, this I think is because the processes that calculate filesizes are falling over the sheer amount of session files left by Magento.</p><p>Anyone familiar with the command line will scoff and point out that a simple <code>rm -rf var/session/*</code> will do the job, and you are almost right, but because there are so many of these files normally what will happen is this command will attempt to run and then return an error about too many arguments.</p><p>To get around this you need to run something like;</p><p><code>find /path/to/magento/sessions/ -name "sess*" -type f -exec rm -f {} \;</code></p><p>I wont get into the details of each aspect of this line, other people have covered this in way more depth &#8211; but basically this will run the rm on each single file and not try and pass in all the files at once.</p><p>This will clear out your sessions folder and free up some space.</p><p>If you don&#8217;t want to clear out all session files, maybe just older ones, you can add the -mtime parameter to this line.</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2012/02/magento/deleting-magento-session-files/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Reducing Google Contacts storage on Android devices</title><link>http://tosbourn.com/2012/02/other/reducing-google-contacts-storage-on-android-devices/</link> <comments>http://tosbourn.com/2012/02/other/reducing-google-contacts-storage-on-android-devices/#comments</comments> <pubDate>Sat, 04 Feb 2012 19:18:35 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Other]]></category> <category><![CDATA[Android]]></category> <category><![CDATA[Contacts]]></category> <category><![CDATA[Google]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=827</guid> <description><![CDATA[After a couple of months of use my HTC phone running Android was constantly telling me that my phone storage was running low. I have tried several methods of reducing the files kept on the phone storage (which I will blog about sometime) but one of the methods that I want to discuss today is [...]]]></description> <content:encoded><![CDATA[<p>After a couple of months of use my HTC phone running Android was constantly telling me that my phone storage was running low.</p><p>I have tried several methods of reducing the files kept on the phone storage (which I will blog about sometime) but one of the methods that I want to discuss today is to free up some of the Google Contact storage.</p><p>In order to use the Market on your Android you need a Google account, like a lot of people I had my Google account well before I had my phone as I use Googlemail so when setting up my phone naturally these were the credentials I would put in.</p><p>A slightly annoying feature of Android is that it will automatically sync your Google contacts to your phone without allowing you not to, and to make matters worse it has to be your internal phone storage, not any SD cards you happen to use.</p><p>I have looked around for several solutions and at the moment the best practice seems to be to set up a dummy Google account and use that for all your Android syncing.  Initially this is what I was going to do but I started thinking that perhaps the issue isn&#8217;t that my contacts are now on my phone (I mean, that makes sense, right?) it is that perhaps I have too many contacts.</p><p>Googlemail has been setup to automatically save contact information for anyone you email and over the years I have used my Googlemail account to do mass mailouts about various projects I am involved in and have basically amassed a massive amount of contact information that I will never really use again.</p><p>It is time for a cull.</p><p>The first step is of course to backup your contacts, this is very easy.</p><ol><li>Log into your Googlemail Account</li><li>Select &#8216;Contacts&#8217; from the dropdown menu on the left.</li><li>Under &#8216;More&#8217; select Export</li><li>Select how you want to export them (I picked Google cvs)</li></ol><p>Having a backup means I always have a fallback should I really really need to dig out someones email address, but the thing is if I have spoken to them in the past I most likely have an email in my account with their details in it &#8211; I can&#8217;t see me needing to import my contacts any time soon.</p><p>The next step is to then delete your contacts.</p><p>The only way I found to do this was in your Contacts area to select the check all tickbox and under &#8216;More&#8217; select Delete Contacts &#8211; this could be slow enough if you have thousands like I do, but it gets the job done.</p><p>Finally (kind of) you want to sync your new empty contacts folder.</p><p>You should be able to do this in &#8216;Settings&#8217; on your Android but for some reason mine wouldn&#8217;t do a proper sync until I turned my phone off and on again &#8211; even then the contacts file would sync but not remove anything.</p><p>So I backed up my contacts to my SD card, I did this by going to;</p><ol><li>People</li><li>Hitting Menu</li><li>Selecting Import/Export</li><li>Exporting all contacts (sim and phone) to SD</li></ol><p>Then I went in and deleted the data associated with my contact card;</p><ol><li>Settings</li><li>Applications</li><li>Manage Applications</li><li>Finding Contacts Storage</li><li>Deleting the data.</li></ol><p>Then I re-imported the exported contacts in again.</p><p>Before doing this my contacts file was 19.4MB after it was 1.72MB and the notification about low phone storgage has well and truly gone.</p><p><strong>This shouldn&#8217;t be the way things needed to be done</strong> &#8211; but needs must!</p><p>If you have any other ways of getting around this auto sync that doesn&#8217;t involve removing contacts or having a dummy account I would love to hear it.</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2012/02/other/reducing-google-contacts-storage-on-android-devices/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>My scribbled thoughts on Belfast Ruby&#8217;s first meet up.</title><link>http://tosbourn.com/2012/02/events/my-scribbled-thoughts-on-belfast-rubys-first-meet-up/</link> <comments>http://tosbourn.com/2012/02/events/my-scribbled-thoughts-on-belfast-rubys-first-meet-up/#comments</comments> <pubDate>Wed, 01 Feb 2012 11:30:03 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Events]]></category> <category><![CDATA[BelfastRuby]]></category> <category><![CDATA[Ruby]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=824</guid> <description><![CDATA[]]></description> <content:encoded><![CDATA[<p><a
href="http://d2aucw19zh6gg9.cloudfront.net/wp-content/uploads/2012/02/belfast_ruby_thoughts.jpg?9d7bd4"><img
class="alignright size-large wp-image-825" title="belfast_ruby_thoughts" src="http://d2aucw19zh6gg9.cloudfront.net/wp-content/uploads/2012/02/belfast_ruby_thoughts-1024x613.jpg?9d7bd4" alt="" width="620" height="371" /></a></p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2012/02/events/my-scribbled-thoughts-on-belfast-rubys-first-meet-up/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>CakePHP 2.0 Read Recursive</title><link>http://tosbourn.com/2012/01/development/cakephp-2-0-read-recursive/</link> <comments>http://tosbourn.com/2012/01/development/cakephp-2-0-read-recursive/#comments</comments> <pubDate>Mon, 30 Jan 2012 21:53:10 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[CakePHP]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=820</guid> <description><![CDATA[This is something that caught me out several times when I was new to CakePHP, so I thought I would post it here in case you are in a similar situation. Basically I was hitting issues that when I was viewing the variables available to a view (using the CakePHP Debug Toolbar) were I was [...]]]></description> <content:encoded><![CDATA[<p>This is something that caught me out several times when I was new to CakePHP, so I thought I would post it here in case you are in a similar situation.</p><p>Basically I was hitting issues that when I was viewing the variables available to a view (using the CakePHP Debug Toolbar) were I was noticing that I was bringing back far more information than I needed (and occasionally, not enough)</p><p>Bringing back too much information is never a good thing, it is inefficient and a possible security leak.</p><p>The reason for this is that in CakePHP the <code>Read</code>, <code>Find</code> or <code>FindAll</code> takes in a value called <code>Recursive</code>.</p><p>To set the level of recursion you do something similar to the following;</p><pre><code>$this-&gt;Model-&gt;recursive = 1</code></pre><p>There are 4 settings, which can be read about in detail in the <a
href="http://book.cakephp.org/2.0/en/models/model-attributes.html?highlight=recursive%20findall" target="_blank">CakePHP Book</a>, but basically you can use this to make <code>Read</code>, <code>Find</code> or <code>FindAll</code> not perform JOINS (or perform more of them!).</p><p>Be sure that your selections only ever return the data they need to and no more.</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2012/01/development/cakephp-2-0-read-recursive/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>CSS Vendor Prefixes &#8211; A potential use case</title><link>http://tosbourn.com/2012/01/design/css-vendor-prefixes-a-potential-use-case/</link> <comments>http://tosbourn.com/2012/01/design/css-vendor-prefixes-a-potential-use-case/#comments</comments> <pubDate>Thu, 26 Jan 2012 10:31:27 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Design]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Browsers]]></category> <category><![CDATA[CSS]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=814</guid> <description><![CDATA[You know those moments when you know something won&#8217;t work but you try it anyway just in case the web gods look favourably on you for once? Well I just had one of those and I would like to share it, because I think this is something that the web gods should consider. Vendor prefixes [...]]]></description> <content:encoded><![CDATA[<p>You know those moments when you know something won&#8217;t work but you try it anyway just in case the web gods look favourably on you for once? Well I just had one of those and I would like to share it, because I think this is something that the web gods should consider.</p><p>Vendor prefixes in CSS serve the purpose of allowing browsers to play about with their own implementations of new CSS rules or adding stuff totally unique to them.</p><p>There have been arguments back and forward about how useful these are in production systems and there have been some great tools made to try and reduce how much time we spend in vendor prefix hell, personally I think anything that drives the web forward is a good thing and I think prefixes do that.  But anyway, enough pre-able.</p><p>What I would like to propose is that since we have vendor prefixes anyway, <strong>could we use them to target specific browsers with already known rules</strong>.</p><p>I have an edge case where it would be really nice to be able to do something like;</p><pre>margin-bottom: 59px;
-webkit-margin-bottom: 39px;</pre><p>What this would allow me to do is set the standard margin-bottom to 59px (if it not being 60px makes you twitch, join the club!) but in webkit browsers I would like the margin to be slightly smaller.</p><p>I know this could be misused and end in really sloppy, massive CSS files &#8211; but if used with care (which I promise I would do) it would be a neat way to achieve these odd little hacks that occasionally we need to do.</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2012/01/design/css-vendor-prefixes-a-potential-use-case/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Canonical and Base URLs</title><link>http://tosbourn.com/2012/01/development/canonical-and-base-urls/</link> <comments>http://tosbourn.com/2012/01/development/canonical-and-base-urls/#comments</comments> <pubDate>Wed, 25 Jan 2012 10:30:43 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[Base]]></category> <category><![CDATA[Canonical]]></category> <category><![CDATA[html]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=809</guid> <description><![CDATA[Canonical URLs According to Wikipedia the word canonical in a Computer Science sense means &#8220;the usual or standard state or manner of something&#8221;, in terms of web development canonical URLs are the preferred URLs as picked by the web developer. So when a website has multiple URLs for the same content specifying a canonical URL [...]]]></description> <content:encoded><![CDATA[<h2>Canonical URLs</h2><p>According to <a
href="http://en.wikipedia.org/wiki/Canonical#Computer_science" target="_blank">Wikipedia</a> the word canonical in a Computer Science sense means &#8220;the usual or standard state or manner of something&#8221;, in terms of web development canonical URLs are the preferred URLs as picked by the web developer. So when a website has multiple URLs for the same content specifying a canonical URL tells search engines which link they should display to the public.</p><p>To use canonical URLs you should place something like the following in the head of your document;</p><pre>&lt;link rel="canonical" href="http://www.example.com/category/my_page.html"&gt;</pre><p>Unfortunately this is only a signal, not a directive &#8211; so search engines don&#8217;t need to follow this, but from what I can see it appears to be a pretty strong signal.</p><p>What is cool is that the canonical link can point to another domain alltogther &#8211; this could be useful if you don&#8217;t have access to do other forms of redirection.</p><h2>Base URLs</h2><p>Base URLs let the web developer specify a documents base URI explicity, this ties in nicely with canonical links which can be relative if you wish and can help with duplicate content issues for linked content coming from your site.</p><p>To use base URLs you should place something like the following in the head of your document;</p><pre>&lt;base href="http://www.example.com/category/my_page.html"&gt;</pre><p>At the first pass you are probably thinking that this is the exact same as the canonical URL we wanted to include, the difference with this is that then we do something like;</p><pre>&lt;img src="../img/myimg.png" alt="my test image" /&gt;</pre><p>And this would relate to http://example.com/img/myimg.png &#8211; pretty cool eh?</p><p>This will basically mean that your canonical URL can be replicated throughout relative links in your site, which improves the chances that search engines will index the URL you want them to index.</p><h2>I don&#8217;t care about SEO &#8211; why should I do this?</h2><p>Some people just don&#8217;t care about ranking well in search engines, and that is fine, but I still think you should look into implementing these tags were appropriate on your website &#8211; here is why.</p><p>I am currently working on a legacy project that is a site that accepts multiple domain names, it then uses some database magic to display different sites depending on the domain. Simple enough. The only issue is that the original developers didn&#8217;t think about the need to provide a canonical URL, so b.com/a/b/c and x.com/a/b/c show the same content across different domains and unfortunately somewhere along the line Google has indexed &#8216;b&#8217; as sitting under x.com instead of b.com &#8211; which just looks wrong (even if you don&#8217;t care about rank)</p><p>Granted this is just an edge base, but it is one of many that can be solved by the correct application of both canonical and base urls.</p><h2>Further Reading:</h2><h3>Canonical Links</h3><ul><li><a
href="http://support.google.com/webmasters/bin/answer.py?hl=en&amp;answer=139394" target="_blank">http://support.google.com/webmasters/bin/answer.py?hl=en&amp;answer=139394</a></li><li><a
href="http://www.mattcutts.com/blog/seo-advice-url-canonicalization/" target="_blank">http://www.mattcutts.com/blog/seo-advice-url-canonicalization/</a></li><li><a
href="http://en.wikipedia.org/wiki/URL_normalization" target="_blank">http://en.wikipedia.org/wiki/URL_normalization</a></li><li><a
href="http://www.seomoz.org/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps" target="_blank">http://www.seomoz.org/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps</a></li></ul><h3>Base Links</h3><ul><li><a
href="http://www.w3.org/TR/html4/struct/links.html#h-12.4" target="_blank">http://www.w3.org/TR/html4/struct/links.html#h-12.4</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2012/01/development/canonical-and-base-urls/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>What can The Girl With The Dragon Tattoo teach us about web design.</title><link>http://tosbourn.com/2012/01/web-stuff/what-can-the-girl-with-the-dragon-tattoo-teach-us-about-web-design/</link> <comments>http://tosbourn.com/2012/01/web-stuff/what-can-the-girl-with-the-dragon-tattoo-teach-us-about-web-design/#comments</comments> <pubDate>Sat, 14 Jan 2012 17:13:35 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Web Stuff]]></category> <category><![CDATA[Anger]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=805</guid> <description><![CDATA[Absolutely nothing. So please just enjoy stuff without having to link it to web design, or web development, or pretty much anything that is within my field of interest &#8211; I am sick of reading posts that include tenuous links to either the current trend or to something quirky that can act as link bait. [...]]]></description> <content:encoded><![CDATA[<p><strong>Absolutely nothing.</strong></p><p>So please just enjoy stuff without having to link it to web design, or web development, or pretty much anything that is within my field of interest &#8211; I am sick of reading posts that include tenuous links to either the current trend or to something quirky that can act as link bait.</p><p>If the points you raise are valid and haven&#8217;t been covered 100 times before then please just make a standard post and let your content be the thing that makes it stand out, not the gimmick you have attached to it.</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2012/01/web-stuff/what-can-the-girl-with-the-dragon-tattoo-teach-us-about-web-design/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: tosbourn.com @ 2012-02-07 01:45:36 by W3 Total Cache -->
