Paging

Mac Printing - Getting Color to PCL Printers

Wow, what a pain. My friend has a couple of Docucentre III printers, and now they
have a quite a few macs in the office. Getting black and white printing is easy.
Just use the generic Black and white driver, and your printing. Now of course they
want to print color.

So after trying everything I can think I come to find out the standard printing subsystem, which uses Gutenprint. I upgraded to the latest, which is version 5.2.4,

Finding missing controllers and models

Ever get aggravated you didn't create a model or a base controller for your rails app.
I find its a common issue when large changes are afoot. Like when I create dozens
of tables at a sitting.

For those wondeful times, I've created a rake take that checks my models and controllers, and creates basic versions of the code.

Virtual Models and Parsing in Ruby

Ever want to process something external to your database or your rails app, such
as the contents of files. But you think rails is only good for database items?
Actually rails can easily adapt to handle any kind of data.

In these examples, I process all my controllers, to give a view and a RESTful interface
for testing of my controllers. I also do the same for the menus. All without a database
table in sight.

First, lets take a look at the controllers "model".

Migrating to Snow Leopard for Rails Development – A Definitive Guide

I spent a good chunk of the last couple of days upgrading one of my Macs to Snow Leopard (OS X 10.6), and keeping notes as I went. I had several goals here:

ActiveJquery - Without git

If you pull the files, and install them without using rails plugin code, there
is a "install" script that copies things into the right place.

The file will be in: #{projectroot}/vendor/plugins/activejquery

So for me, its in the following directory:
/Users/gwest/mymrp2/vendor/plugins/activejquery

As you can see it, actually copies a few files into the right place in your project.

directory = File.dirname(__FILE__)
copy_files("/public/css", "/public/css", directory)

A bit of Optimization

As suggested earlier I did a bit of benchmarking and found these timings of the first version which kept everything in memory and the next version with two LRU storages (for InteractionProcessor and IO objects):

Hirb: An Easy-to-Use View Framework for irb

hirb The Interactive Ruby Shell (irb) and the Rails console are great for interacting and experimenting with your ruby application code, but sometimes it's hard to visualize the output. Gabriel Horner has come to the rescue with H

Paged Scopes, Part II: Routing and Controller Methods

Last week I described the basics of my Paged Scopes rubygem for ActiveRecord. In this article I’ll describe some routing and controller methods that make Paged Scope pagination very easy to use in your Rails controllers.

Shadow of the Animal

Let’s recapitulate where we have been for readers who are new to the blog and for the convenience of others. I started this a while ago as an experiment trying to give some insights into my way of reasoning. I choose processing of large log files as subject which should help me analyze problems on production systems. I do believe that this might also help others as log file analysis is a fairly common task.

Page Irb Output And Improve Ri With Hirb

Hirb just got two sweet features with the 0.2 release – a pager and a selection menu. With the pager, you’ll never have to scroll because irb dumped an ungodly inspect() on you. With the selection menu, you’ll have RI taking useful method dumps in no time.

To play with what follows, you’ll need the latest Hirb:

Original Author Name: 
Gabriel Horner
Syndicate content