Slides from my Node.js Talk at Super Mondays
Last Monday I gave a short talk on Node.js at Super Mondays. You can get hold of the slide deck over on SlideShare.
Web Developer
Last Monday I gave a short talk on Node.js at Super Mondays. You can get hold of the slide deck over on SlideShare.
DIBI is a two track Web Conference that this year was held over the 7th and 8th June 2011 at The Sage, Gateshead. I'd been looking forward to it for ages, having attended last year's inaugral event and, as good as DIBI was last year, this year it was even better.
New to this year's event was the Afternoon with…Startups over at the Live Theatre, held the afternoon before the main conference. The venue was good, all the talks were really interesting and insightful – particularly those from Kevin Mann, Roan Lavery and Bobby Paterson – and I came away from it with plenty of new ideas and inspiration.
The next day was the main two track conference. The first talk of the day for me was Jake Archibald with @font-face – Good vs Legal. This was easily one of the highlights of the day. It was a brilliant talk with a brilliant slide deck brilliantly delivered (I would highly recommend watch the video of the talk when they're published shortly). He even used a Wii remote to change move onto the next slide
I stayed on the Build It track for the rest of the morning. Bradley Wright gave an insightful look into Programming the Real-Time Web. He covered the various ways that real time info can be sent and displayed in the browser, from the forever iframe approach to newer methods such as those provided by WebSockets and Socket.IO, and also how you can keep your real time web app accessible by using WAI-ARIA attributes.
Rounding out the morning session was Rich Thornett on Using NoSQL with Yo'SQL. It was an interesting look at how Dribbble makes use of MongoDB, where they've favoured it over relational databases and on how it can be used to eliminate N + 1 queries to help boost your site's performance.
First up after lunch was Corey Donohoe, with another one of the day's highlights for me. It was a fascinating talk on all the metrics they use at GitHub to help them deploy changes to their site really, really quickly. Front-end behaviour, back-end behaviour, performance and failure rates are all monitored using a variety of tools. Plus there was plenty on the awesomeness that is Hubot!
Next I hopped over to the Design It track for Jeremy Keith and his One Web talk. It was probably the most inspiring talks of the day. It focused on how the "mobile web" is a misnomer and shouldn't be treated as a separate entity, but instead by adopting a content first approach and focusing on universal access to the web from any device, you can end up with a much better, scalable and richer user experience.
After an exceptionally well timed Red Bull break, I headed back to Build It to catch Blaine Cook talk about Building the Social Kaleidoscope. It featured a really interesting look at Webfinger, what it is, how it works and how it can help to solve the problems identifying users on the Web when they're details are stored in multiple places and walled gardens.
The final talk of the day was the keynote from none other than Jeffrey Zeldman. Entitled What Every Web Designer Should Know, it was a very entertaining talk on the importance of designing from the content out, defining the problem before you try and solve it and, in a similar vein to Jeremy Keith, on how designing for mobile devices first can help you focus on what the user wants to do.
Overall DIBI was a fantastic conference, all the speakers were great and I came away feeling like I learnt a lot. Huge plaudits must go to Gavin Elliot and the team for all their hard work. Already I'm really looking forward to DIBI 2012.
Just a quick post to say that http://doesgoogleusethekeywordsmetatag.com/ has
been updated with some HTML5 Boilerplate and HSL goodness
Tonight saw the return of the Lightning Talks at Super Mondays, with me doing a talk on HTML5 Form Validation. You can get the slide deck over on SlideShare.
I've been having a play around with Python today trying to implement some base58 encoding / decoding. I'm by no means a Python expert but this is what I came up with (based on this PHP flic.kr super quick note):
Feel free to fork it or offer suggestions for improvements in the comments
I quite like the toolbar at the top of GMail. You know, the one with links to Google Calendar, Google Reader, Google Docs, et al. But I’m not that keen on having to scroll right back to the top of the page each time I need access to it. So, I created a simple Greasemonkey script for Google Chrome to apply fixed positioning to the toolbar. That way it always stays at the top of your screen
(Firefox users: I did create a user stylesheet that achieves the same effect
recently. However, that relies on the @-moz-document domain(mail.google.com) to restrict the CSS to GMail and Google seems to send different HTML to Firefox than it sends to Chrome).
You can fork a copy of the script from GitHub: https://github.com/ianoxley/gmailtoolbar
Or alternatively download it from here: gmailtoolbar.user.js
I was playing around with GoogleCL recently and came up with this: http://github.com/ianoxley/googlecl-export
It's a Bash script that lets you export a list of Google Docs to a specified format. For example, to export a particular folder to PDF you'd type something like this:
googlecl-export -f pdf -d yourfolderofdocs
You need to have GoogleCL installed for the Bash script to work (GoogleCL can be downloaded from http://code.google.com/p/googlecl/) but otherwise you should just need to make the script executable e.g. chmod u+x googlecl-export and possibly stick it somewhere on your $PATH
I've been using the Drupal ninesixty theme recently. One of the nice things about it is the ability to add a show-grid class to the <body> tag to display a grid as a background image grid for development / debugging.
But, rather than manually adding and removing this class to the page.tpl.php, I created a bookmarklet to toggle the show-grid class on and off. The code looks like this:
(function() {
if (document.body.className) {
var b = document.body;
if (b.className.indexOf(' show-grid') !== -1) {
b.className = b.className.replace(' show-grid', '');
} else {
b.className += ' show-grid';
}
}
})();
It does make the assumption that your <body> tag will always have a class attribute, although it should be fairly straight forwards to modify the code to allow for cases where the <body> tag does not have a class attribute.
To save it as a bookmarklet, drag this link to your bookmarks bar: Show Grid
Sometimes, depending on the site you are working on, you need to allow (or the client wants you to allow
) visitors to be able to select how many items per page will be displayed e.g. on a product listings page.
To do this in Drupal 6 turned out to be a lot easier than I thought. I used the code from this blog post by Nicholas Coates but, rather than add it to a views template, I added it to a hook_views_query_alter function I was already using. This meant I could easily use the $view object passed as a parameter to this function:
function hook_views_query_alter(&$view, &$query) {
...
$itemCount = $_GET['itemcount']; // this is just as an example
if ($itemCount == 0) {
$view->set_items_per_page(10);
} else {
$view->set_items_per_page($itemCount);
}
...
}
As Nicholas Coates says in his aforementioned blog post: this is a quick and painless way to implement an items per page filter
.
Have you ever tried to use SELECT…INTO OUTFILE in MySQL and come across the following error?
"Can’t create/write to file ‘/path/to/folder/filename’ (Errcode: 2)"
I was having this problem the other day and, after checking that file permissions weren’t the cause of the problem, I came across the following post on the MySQL forums:
"The problem was not in MySQL but in AppArmor on Ubuntu. I had to add the directories I wanted to write into to my /etc/apparmor.d/usr.sbin.mysqld and restart apparmor.d."
So, one sudo vim /etc/apparmor.d/usr.sbin.mysqld later and I’d added the path/to/folder I needed to be able to write to (not forgetting to add the trailing comma ‘,’ to the end of the line, which is always required, even for the last line).
All that was left to do was to restart AppArmor with:
$ sudo /etc/init.d/apparmor restart
After that, SELECT…INTO OUTFILE worked like a charm