A simple pagination component with Ember
Ember’s ethos of ‘components everywhere’ makes it really quick and easy to make reuseable widgets. This takes the tedium out of implementing some of the more basic features of web sites and applications. An example of this is pagination. This post shows you how to create a very basic pagination component that allows you to page through a list of items.
Making a draggable Ember component
HTML5 makes it really easy to create elements that can be both dragged and dropped. This is a really powerful API to add rich functionality to your application. In this post we’ll use this API to make a simple Ember component that can be repositioned on the screen by dragging it with the mouse.Twitter controlled power switches with a Raspberry Pis
Using off-the-shelf parts with a Raspberry Pi, you can make a remote controlled power switch to turn appliances on/off. I’ve used this approach to create Twitter controlled snowblowers, remote controlled car headlights, a Twitter activated Christmas trees … the possibilities are endless. This post will show you how to set up a power switch that will activate when a certain hashtag is posted to Twitter.
Making USB Push Buttons
Using a ‘Teensy’ microcontroller/USB HID you can easily create physical push buttons for your project that, when pressed, will appear as key strokes in your application. This is a really flexible approach to adding physical buttons to an array of different web, desktop or even mobile applications. This post will show you how to do it.
Adding labels to Ember Leaflet markers
This post shows you how to create a custom marker component that integrates the Leaflet.label add-on to get nice pop-up labels on your ember-leaflet maps.
Django access mixin for active users only
As of Django 1.9, there are a number of new permission mixins you can use with your views to make access control easier. One that isn’t included by default is a mixin allowing you to only permit users who have activated their account (
user.is_active = True
)Updating your cert_fingerprint for offlineimap with Fastmail.fm
Fastmail recently updated their SSL certificate, breaking my offlineimap email backups. This post has the updated cert_fingerprint value you need to add to get it back running
The Missing Manager for Django Models with GFK Relationships
Save yourself writing the same queries time and time again by creating a simple model manager with common queries for your generic foreign keysImporting Big Databases with MAMP & phpMyAdmin on OSX
When you are using phpMyadmin on MAMP or MAMP Pro out of the box, you might run into trouble trying to import large databases due to PHP’s default upload and timeout settings. This post explains the quick-fix needed to get it working.
Uploading and validating an image from an URL with Django
This post outlines a simple Django app that allows the user to upload an image via an URL while making sure the image file is valid.