Python script to strip out bounced emails from a mailing list

Posted by Joel Jensen Mon, 24 Jul 2006 18:54:51 GMT

The title says it all. Here it is

Fruity Oaty Bar

Posted by Joel Jensen Sun, 23 Jul 2006 22:05:00 GMT

I watched Serenety the firefly movie last night, again. I caught a glimpse of the fruity oaty bar commercial and found it. It’s contagious.

Ubuntu kicks Mandrake 1

Posted by Joel Jensen Sat, 22 Jul 2006 00:32:00 GMT

I just installed a Django site on Ubuntu 64. This will be for an insanely busy hardware review site, I recently set up a mandrake 64 system. This is a totally non-biased, scientific opinion; Ubuntu kicks ass. I’m not looking back.

Blogging from an editor

Posted by Joel Jensen Wed, 19 Jul 2006 17:06:00 GMT

I just found out that Textmate has support for entering blog information right from the editor, I’m sure that emacs does this. But it’s still cool

tex_field_with_autocomplete update multiple elements

Posted by Joel Jensen Fri, 23 Jun 2006 17:40:00 GMT

Im working on a Ruby on Rails project and needed text_field_with_auto_complete, ms-access like drop down box dynamicly updates multiple elements on a page.

Here is what I made.

Installing Django on OSX Tiger 10.4 INTEL

Posted by Joel Jensen Sun, 18 Jun 2006 15:26:00 GMT

Here are some tips for installing django on OSX Tiger Intel

Inheritable templates for Ruby on Rails

Posted by Joel Jensen Sun, 04 Jun 2006 05:23:00 GMT

I have been giving thought to templates and template inheritance. I have used Zope and Plone for 5 years. I recently looked at Django for a few days and wrote a small test site. I liked the templating in both Django and Zope. Specificly the inheritance in the templates.

Let me explain, in Django say you have a basic look and feel for a whole site. This basic layout contains real html code for the site, the default text for blocks which are not overridden.

better said by the Django guys http://www.djangoproject.com/documentation/templates/

basic_template.html

  • title_block
  • content_block
  • footer_block
  • right_area_block

individual pages will then extend this template overriding the blocks they wish with blocks of the same name. For instance, a newspaper has a subsection with

  • special content goes in content_block
  • advertising and links about the article goes in right_area_block

the rest of the page remains the same as the basic_template.html, just the content block and the right area block are swapped out.

Django takes this pretty far with inheritance. A controller calls a template which specifies which template is being extended and so on and so on.

I have written 4 production sites for local businesses in Ruby on Rails. I have run into problems with rails “all your content goes in one spot” @content_for_layout approach to templating. I like to build sites with lots of blocks for stuff to go in and remembering which partial went where is a pain. Having a Django type of flexible inheritable layouts would make life much easier.

So I got to thinking how this could be done. I thought of the way that Django does it with definable blocks, this approach is the most pragmatic to build. However for use, I thought of overriding named <DIV id='foo'> tags. If a template has a named div tag that whose name appears in a parent template, that div overrides the parents.

This type of overriding wouldn’t work for non html content, but for most stuff I do it would be great.

I started looking for a XHTML parser for rails that could parse the compiled templates into DOM then merge the files letting the new nodes override the default ones, trouble is that this may create some extra compile overhead with multiple templates being worked on.

Right now this is just a tickle in the back of my head, but it may make for useful templating of Rails.

os X command line shortcuts

Posted by Joel Jensen Sun, 04 Jun 2006 05:13:00 GMT

Launch finder from command line

So I just found out if you type

open .

from any directory in the command line it will open that directory in the finder. This is pretty helpful

Rails Capistano Deployment

Posted by Joel Jensen Mon, 29 May 2006 23:05:00 GMT

I got Capistrano to work. Deployments now are a one line thing.

The issue I had was that the subversion repositroy I had used was http://localhost, this wont work since localhost in this context actually referrs to localhost of the remote machine that capistrano is ssh’d into.

I set up a external SVN repository and it was golden. Except for database migrations.

Capistrano will not execute commands on your local machine as far as I can tell.

Data Migrations in rails only migrate the schema changes, Yeah you can programmaticly add data via ruby. But this is a pain when you have a million rows of data.

I solved it by doing a mysqldump of the data, gzip it to save time, and use the capistrano “put” function to upload the data, then insert it into mysql on the server end.

Its not as clean as simply “rake deploy” but I can run 2 additional commands if I need.

2006.0 a spacecase oddesy 1

Posted by Joel Jensen Mon, 29 May 2006 14:33:00 GMT

I want to start using Capistano ( a deployment tool for ruby on rails ). Its pretty cool. It executes deployment commands on multiple servers in parallel over ssh.

It needs SVN to work. It says in the instructions that you cannot use file:/// repositories. So I thought hey why not use http://localhost. That brick wall dented my head.

Older posts: 1 ... 7 8 9 10