January 19th, 2010 by kieran
For those of you who follow this sort of thing, Github shut down their gem building. Thankfully, a newer and easier gem hoster, Gemcutter, appeared on the scene not long before that happened. The idea behind it, for those who haven’t heard of it, is that you manage your own gem building. Gemcutter doesn’t wait for your Gem spec to change before it makes a new gem. You simply build it locally, and push it to Gemcutter, using a handy gem they provide that extends Rubygems ‘gem’ console command.
But Github was building gems for some time, and due to it’s continuing popularity, many well known Ruby on Rails developers and companies switched permanently to Github for their gem building/hosting at the time, so it’s likely that quite a few gems you’ve got installed are from Github.
To help transition over from Github to Gemcutter, Maxim Chernyak wrote a great utility called off_github, which looks at your list of gems, and tells you which ones you’re installed from Github, and whether they can be reinstalled from Gemcutter. It saves a lot of time and effort than having to do it manually. So here’s how to get started….
Read the rest of this entry »
Posted in ruby, ruby on rails | No Comments »
September 28th, 2009 by kieran
Stumbled upon this. If you’re going to make a URI (domain or sub domain) with an underscore, think twice. IE7 and IE8 do not support these URI’s when dealing with cookies.
For more details, see this blog post, detailing the symptoms.
http://blog.patrick-morgan.net/2008/09/problems-with-ie7-sessions-not-saved-in.html
Posted in random | No Comments »
September 21st, 2009 by bob
A few sites that we have been working on wanted an extra step with the signup process on their website that requires an additional level of vetting by the site administrator when a new user submits the online form. To achieve this we made some minor changes to the core code.
Read the rest of this entry »
Posted in joomla | 2 Comments »
September 21st, 2009 by bob
Developing in Joomla sometimes throws up minor issues with solutions so simple that you wonder why they’re not in the core code. While putting together the Rangitikei District Council’s website we discovered that there’s no easy way to set up Navigation Access Keys in Joomla 1.5, as per the New Zealand Government Web Standards (http://webstandards.govt.nz/8-4-navigation-access-keys/). The keys are a great navigation aid to non-mouse users and are recommended by w3c (http://www.w3.org/WAI/WCAG20/quickref/#keyboard-operation).
To add Access Keys to a Joomla site you need to hack at the core code of your Joomla install. There are some basic instructions on the Joomla documentation site at http://docs.joomla.org/Adding_Access_Keys. This sets up a new “Accessibility Access Key” field in the System Parameters dropdown that’s available when you edit an menu item, allowing you to simply enter the keystroke you want to associate with that menu link on your site.
The hack makes it easy to add as many access keys as you need, and you can offer more than just the basic keystroke options set on most government websites.
Posted in joomla | No Comments »
September 4th, 2009 by kieran
When I started on a new Ruby on Rails project at Katipo Communications, I evaluated a range of testing libraries, and decided on Cucumber. It’s simple and has a flexible style of feature testing. For more info about it, see the Cucumber Wiki Documentation. In this post, I’ll detail some of my experiences with it for other developers who are considering using it.
Read the rest of this entry »
Posted in random | No Comments »
August 21st, 2009 by Richard
These are some preparation notes for a panel discussion with the NZ Industry Training Federation – ITOs Marketing and Communications Network. We were asked to respond to three questions:
- My website is a dog’s breakfast, my boss wants it fixed, what do I need to do/think about mys elf before I contact a company?
- What are the most common mistakes you see being made on organisation’s website?
- How do you measure value for money on your website?
Read the rest of this entry »
Posted in random | No Comments »
July 17th, 2009 by Simon
The OPACs at HLT have been failing one by one, so some replacements are in order. The previous OPACs ran Mozilla in kiosk mode on a hand modified Debian install sufficiently rickety that after ~4 years I didn’t really want to touch it.
Somewhat surprisingly, the task (taking some hardware and netbooting it into a teenage-vandal-proof web kiosk) didn’t appear to be a solved problem – there are still a lot of people rolling their own, I’ve done that once, I didn’t really want to do it again.
Webconverger almost fits the bill, with a couple of caveats: Read the rest of this entry »
Posted in koha, open source, sysadmin | No Comments »
January 24th, 2009 by walter
Here’s a quick one. Say you are debugging a bit of code in a plugin that doesn’t fall under the Rails app you are working on’s ActiveSupport context and thus “logger.debug” is not available to you.
You could write up your own logging mechanism, with or without using the Logger gem. However, if what you are working on is run by the Rails app and thus has the apps global constants available, you could simply tie it into the existing logger object in the Rails app like so in your file:
logger = RAILS_DEFAULT_LOGGER
Then you can use logger.debug, logger.info, etc. to your heart’s content. One caveat, if you are working on a gem or a something more general that won’t necessarily always be run in the context of Rails, then you will want to pull your use of logger out before distributing your code. Otherwise you add a dependency on Rails that you may not intend.
Posted in open source, random, ruby on rails | No Comments »
January 15th, 2009 by walter
You have to give Logical Awesome credit for how much work they do to integrate GitHub’s services with tools that developers use.
The Gist service is a good example. First they added command line support for it, then they simultaneously added in-editor support in Textmate, vim, and my own personal favorite emacs. The blog post announcing gist support in emacs and vim is here.
So how do you add the gist support to emacs?
First, you’ll need an account on github.com and have set up your ~/.gitconfig as outlined in here.
Then download or clone the gist.el file from http://github.com/defunkt/gist.el, copy only the gist.el file from that repository to someplace in your emacs load path (in my case /Users/walter/Library/Preferences/Aquamacs Emacs/ because I use Aquamacs on a Mac), and add a line to your ~/.emacs file or in my case /Users/walter/Library/Preferences/Aquamacs Emacs/Preferences.el that looks like this:
(require ‘gist)
Then you have to either restart your emacs program or do M-x load-library and answer prompt with gist for the new gist commands to be available.
Now you have M-x commands like these:
- gist-view-gist
- view gists after they’re posted
- gist-region
- Post the current region as a new paste at gist.github.com
Copies the URL into the kill ring.
- gist-region-private
- Post the current region as a new private paste at gist.github.com
Copies the URL into the kill ring.
- gist-buffer
- Post the current buffer as a new paste at gist.github.com.
Copies the URL into the kill ring.
- gist-buffer-private
- Post the current buffer as a new private paste at gist.github.com.
Copies the URL into the kill ring.
- gist-region-or-buffer
- Post either the current region, or if mark is not set, the current buffer as a new paste at gist.github.com
Copies the URL into the kill ring.
- gist-region-or-buffer-private
- you can probably guess…
- gist-fetch
- Given an gist id, fetches a Gist and inserts it into a new buffer
If the Gist already exists in a buffer, switches to it.
Very useful stuff for collaboration, but without leaving your editor.
Enjoy,
Walter
Posted in open source, random, ruby on rails | No Comments »
October 3rd, 2008 by james
One commonly overlooked aspect of website accessibility is the contrast ratio between foreground and background colours.
White poor contrast can cause readability issues for well-sighted visitors, it can be even more of a problem for those visitors with a visual impairment.
Because of this, The New Zealand Government Web Standards and Requirements v 1.0 and W3C’s Techniques for Web Content Accessibility Guidelines v 1.0 both contain standards requiring content have sufficient contrast between foreground and background colours.
For example, The New Zealand Government Standards state:
“Ensure that foreground and background colour combinations provide sufficient contrast for navigation, text and informational elements when viewed by someone having colour deficits or when viewed on a black and white screen.”
Continue below for details on how to test for adequate colour contrast in your design or web pages.
Read the rest of this entry »
Posted in random | 1 Comment »