Thursday, November 30, 2006

A recent transcript of RMS talking about the GPLv3 in Japan.
Rendering millions of blades of grass in real time. Neat.
Emacs and Ruby
emacs-rails - A bunch of .el files to help you edit Ruby on Rails code with Emacs
How to Use Emacs with Rails - From the Rails wiki
ruby-mode.el - From Matz.
Ruby - Installing Emacs Extensions
Adding a directory to the emacs load path
iswitchb - Essential Emacs goodness
The amazing multitty branch of Emacs. Thank you!
Painless Javascript with Prototype
rcov - rcov: code coverage for Ruby
How to Structure Large CSS files
Test or Die!
Runtime options for the audio player in Wordpress - autostart=yes
Some Philosophical Problems with Folksonomy
Understanding Tabs in Emacs
text-mode from the Emacs Lisp Reference Manual.

I needed this in order to make text-mode behave like I wanted it, I didn't like that magic indent relative when I hit the tab key:


(define-key text-mode-map "\t" 'indent-relative)


I instead wanted it just to insert a tab character:

(define-key text-mode-map "\t" 'self-insert-command)
How to configure Postfix to be a mail relay from a static IP.
An interview with Caterina Fake of Flickr.
advanced ActionMail - A great little article about some of the neat things you can do with ActionMailer in Rails.
The old school way to test for an Open Mail relay.


telnet mail.myserver.com 25



Trying 202.51.x.xxx...
Connected to mail.myserver.com.
Escape character is '^]'.
220 mail.myserver.com ESMTP Postfix
helo client.server.com
250 mail.myserver.com
mail from: rockyjr@vsnl.com
250 Ok
rcpt to: vivek@nixcraft.in
554 : Relay access denied


I really love telnetting to raw ports, I know, I'm weird, but it's good for the soul.
mod_rewrite in Apache gives you some really powerful ways to Rewrite URLs.

From this page I found:


RewriteEngine On
RewriteRule /.* http://www.new-domain.com/ [R]


Which will redirect any page request from your old site to the homepage of your new site.

If you change it to:

RewriteEngine On
RewriteRule /(.*) http://www.yoursite.com/$1


It will even redirect full URLs to your new site. Those are regexps up there, the first one "(.*)" matches all URLs from your old site and $1 inserts whatever was found in that first "(.*)" match.
To make favicons, you can use the excellent png2ico

or

You can navigate to html-kit favicon
Firefox has this great new feature, "Session Restore", that remembers where you were, and if your Firefox crashes, restores the tabs to the state they were before you start.

I didn't like it.

To turn it off:

1) Type "about:config" in the URL Navigation bar
2) Right click on the window and select "New->Boolean"
3) Type "browser.sessionstore.enabled" and set it to "false"

This is from the mozilla wiki.

Tuesday, November 28, 2006

Now, if there was only a Nethack mode for Emacs...

That would be so sweet!

By the way, I've got a "Double Top" this year on the Nethack Tournament. Two days left, and I've got a Gnomish Healer with the Bell and the Candelabrum, but I'm running out of steam. I've also got a very promising Orcish Barbarian, but I don't think I'm going to get the Hat Trick this year. Have to wait until next year, or more likely 2008.
Oh man, I'm having WAY too much fun with this new Emacs. There are some *sweet* features in Emacs 22.

One of my favorite is the new Macro system. You start a macro with F3, and end it with F4. You can then execute it with F4. This is already nicer than it used to be, but the sweetness comes when you can go and edit those macros in a nice looking macro editor. Mmm, tasty nums. And I accidently typed F3 again while defining the macro, and it looks like this lets you define a macro counter, which increases by one each time the macro is executed.

Like, you could probably do all of this before, but it's just so nice to have this all ready to go.

I'm so happy with Emacs 22. And I was thinking about it today, it's more like 8 years that I've been away from Emacs and on XEmacs. Don't get me wrong, XEmacs is really sweet as well, it has great package management, and you don't have to go to an unreleased Bazaar branch to get multiple ttys. But Emacs is really sweet. Sweet like honey.
I've finally figured out what the problem was with trying to get emacsclient to run in a terminal, like -nw mode for Emacs. The problem was that it's not supported, but a new branch multi-tty for Emacs is being developed that allows this. Sweetness!

It's really funny, because years ago, when I switched to XEmacs from Emacs, I think it was Emacs version 19, I had a feeling I was going to switch back to Emacs when it became version 23. multi-tty won't get merged until after 22 is released, and should be fully integrated in version 23, so that's what is happening. For now, I'm living on the edge, using the bazaar version of multi-tty, and it's looking great.

I've been really happy with XEmacs over the last 5 years, but I never could bring myself to fully learn all the XEmacs Lisp, I just wanted to wait to get back to Emacs and learn it once. It's kind of like my life with tcsh, I liked using it, but I didn't really want to invest all the effort in learning it, since I knew I was going to switch to zsh in the future.

This year, I finally switched to zsh, and wow, I love it. I just take my time, and learn new features when I need them. My first open tab in Opera is zshtips so from time to time, I learn some new magic. The backward command search in zsh saves me so much time, and I know that for anything I want to do, there is a way to do it in zsh.

So now is the time to do the same thing for Emacs, the program that I live in for most of my coding day. Emacs, and XEmacs, is such a nice place to live, I just couldn't contemplate leaving it, things that I learned well 10 years ago I can still use, it's just like you keep building and building your knowledge and skills. I don't use things like text-rectangles and ediff mode everyday, but when I need them, they are right there.

So now, on to learning more Lisp and more Emacs!

Sunday, November 26, 2006

Rails Migrations Cheat Sheet
Ruby Dir Class
RMagick Composite Operators - How to use the powerful composite algorithms in RMagick
Emacs and Ruby
rhtml-minor-mode Allows for templates that include a file in app/views/layouts
How to use Emacs with Rails
nxhtml mode for emacs

To dump and restore a MySQL database:

Dump:

mysqldump -u USER -pPASSWORD DATABASE > filename.sql

Restore:

mysql -u USER -p DBNAME < dump.sql

Attaching a javascript function call to a form action:

>INPUT NAME="num"
onchange="if (!checkNum(this.value, 1, 10))
{this.focus();this.select();} else {thanks()}"
VALUE="0"<

Friday, November 24, 2006

"I don't believe in total freedom for the artist. Left on his own, free to do anything he likes, the artist ends up doing nothing at all."

Federico Fellini

Thursday, November 23, 2006

"Beauty is mysterious as well as terrible. God and devil are fighting there, and the battlefield is the heart of man"

-Dostoyevsky

Wednesday, November 22, 2006

Javascript linker - Find dependencies in Javascript, reduce size of code and other good stuff. It's in Dojo, we need something like this for prototype/scriptaculous, or move toward better Dojo/Rails interaction.
Testing Ruby on Rails Page Caching - Good article.

Something I learned recently: Rails doesn't cache pages in development mode, only in production mode. This is a tricky little gotcha if you're testing page caching. I tend to agree that we shouldn't cache pages in development mode, but I wish there was something that made it clear the pages aren't getting cached.

For expiring cached pages, I started off with looking at addicted_to_caching, which is excellent, by the way, but it wasn't quite sophisticated for what I needed, so I wrote my own custom sweeper. We need a better solution for this, a plugin that you can register view pages with models, and figure out when you save a model, what views depend on that model.

I was thinking about writing a plugin that would automatically determine these dependencies, it would generate something like a Makefile, with models and views related by dependencies.
MC2 and S3. It's really sounding more and more like the way to go, you can pay for just what you need, when you need it, and it's all managed by our nice friends at Amazon. So cool.

linkage:

saving $500,000 a year with S3.
EC2 developers guide
EC2 getting started guide
EC2 command line tools
EC2 FAQ

Tuesday, November 21, 2006

Userscripts and S3 - How the nice people over at Userscripts saved a bundle by going with S3 instead of hosting their own servers.

This is very interesting, with EC2 and
S3 Amazon is really making a big splash in the large scale website hosting business. I have a few different servers, spread over the face of the planet, and for what I need, the Virtual Private Servers from Quantact and a dedicated server from AMKH work really well. However, I can see a time where I would need a bigger cluster of servers, and moving from a single dedicated server to a bunch of servers would be quite a big transition. EC2 and
S3 sound like a great alternative.

I'll let you know what happens, my gentle readers.
Mercury Marine - Interesting site design with those three types of navigation.

Lund Boats - Some other interesting site design.

Monday, November 13, 2006

libming - A free software way to create Flash applications for web pages. Wow, I remember ming from years ago, great to see that it's still active.

open source flash projects

gnash - free software flash movie player

writing flash applications with linux
img tag attributes - This is important now for XHTML Strict, you have to use the standard tags to get your XHTML to validate, this caused me some problems when I was doing some javascript recently, it turns out I was using some tags I shouldn't have, specifically, I was using both the id and name tags, and you can only use one of them, most likely the id tag.

and the standard attributes
Designing for Groups - A new theme in software will be how do we design software to be used by groups of people. This is so cool, we are entering a new age of group consciousness, and technology is going to help us jumpstart the process.

We're so close.
From an article about The Tipping Point.

"Mavens are data banks. They provide the message. Connectors are the social glue: they spread it. Salesmen persuade us when we are unconvinced of what we are hearing."
The tipping point - we want to attract Mavens, Connectors, and Salesmen, these are the people that will draw in lots of people. How to design sites so that these kind of people come visit us? Luckily, I have a few friends who are Mavens and Connectors, so perhaps they will form a core that will start to draw others in.
Some beautiful diagrams of how to manage complex processes. It's really beautiful and I find myself wanting to just keep looking and exploring it, just isn't that clear. The ideas are really interesting, but it should lead the eye more, and really focus on telling a story.

Still, it's beautiful.
modern form solutions with CSS - This site shows pictures of some of the things that we can now do on the web with forms and CSS. Some very simple and elegant designs here. I'm all about simplicity and elegance, adding little ornaments just isn't a good way to go, it's much better to have a simple and elegant form that guides the user gently, while giving her some beautiful things to look at.

Saturday, November 11, 2006

u - a wand of wishing (0:3) (unpaid, 666 zorkmids).--More--


OMFG.
links:

pistion - Manage your rails plugins
rubyisms and railties - another excellent err the blog article about using rake
acts_as_money for rails - bling.
tracks - a GTD (Getting Things Done) application with rails
swfupload - sweet file upload with flash
caching dynamic content with apache
the earth as a musical instrument
optimizing ruby
logfile maintenance for postgres
yaml for ruby
The links are starting to build up again. Let's post some of them, shall we?

foreign_key_schema_dumper
mysql gotchas
postgres gotchas
foreign_key_migrations
Dump or slurp yaml data - What a sweet plugin! This totally just saved me from two days of converting my hand constructed sql inserts into yml format. Thank you!
Fixtures in Rails
Getting Started with ActiveRecord Migrations - Has a great section on exactly how to convert schema.rb into a migration.
The Joy of Migrations
creating arbitrary objects in javascript
Paul Graham talks about usingLisp for web applications - Wow, sweet. Lisp on Rails, anyone?
Why Lisp? - Because, it rocks.
web architecture - Lisp will triumph, in the end. Emacs will be there.
metasoup a blog post about converting html into trees, and how to cope with errors
tomboy mindmap - Using graphviz to generate visual mindmaps from tomboy notes. Interesting.
drysql - Hmm. This takes the opposite approach of what is common practice, instead of defining all the relationships within your model.rb class, you instead define it as relationships within your database. I prefer to do it the standard way by using has_one and belongs_to in model.rb, but this does look interesting.
indexing for db performance
foreign_key_migrations plugin. Turns out it's better to not use foreign keys with Rails at all...
foreign_key_migrations plugin. Turns out it's better to not use foreign keys with Rails at all...

Thursday, November 09, 2006



Our hallowe'en pumpkins, well 5 of the 10 of them. That was a lot of fun!
You offer the Amulet of Yendor to Anhur... An invisible choir sings, and you are bathed in radiance...--More--

Oh sweet. Wow. I'm so happy! My first ascension of this years nethack tournament. It did not look good at all, when I got there, I went to the left, and Pestilence was there. He killed me three times, I was applying my unicorn horn, but nothing was happening, and I really thought I was done for. I had no amulets of life saving left, and I totally thought I was going to die. Then, I took a night off to reflect and ponder strategy, backed up and rubbed my magic lamp, luckily, I got a tame djinn, and he gave me a wish, which of course was for an amulet of lifesaving.

Then, when I had gone backwards, towards the right, Pestilence followed me, and for some reason, he went into the door of the middle room. I was able to slip past him and make it to the altar. Unfortunately, it was Lawful, and I a chaotic Eleven Sorceress was sad out of luck. I was totally ganged up on, and was down to 28 hit points, getting attacked from all sides. Again, I took a night off, and thought about strategy. I read a post about how good a ring of conflict was on the Astral Plane, I have always eschewed them, since I had a bad experience once on the Astral Plane where I was wearing it as I went into the plane and my Angel attacked me. So, I decided to wear the ring of conflict, and it was the best decision ever. Everyone starting attacking everybody else, mostly, but I had so few hit points, that I died again, using up my amulet of life saving. With no protection against an untimely death, I hightailed it out of the altar room. No one followed me, so I was safe in the anteroom. I spent some time using my magic marker to make scrolls of charging, as I had used all the charges on my wands of teleportation.

After that, I made a dash to the right, dodging Famine the whole way. It was the Neutral Altar! Drat! So, I made it back to the central room. Someone kindly killed Death for me, and Pestilence went off to the left, so I made a mad dash for the altar and...

You offer the Amulet of Yendor to Anhur... An invisible choir sings, and you are bathed in radiance...--More--

The voice of Anhur thunders: "Congratulations, mortal!"--More--

"In return for thy service, I grant thee the gift of Immortality!"--More--

You ascend to the status of Demigoddess...--More--

Do you want your possessions identified? [ynq] (n) y

You were lucky.
You had extra luck.
Good luck did not time out for you. Anhur was angry with you.
You survived after being killed 6 times.
You genocided 13 types of monsters.
You used 7 wishes.

Goodbye sness the Demigoddess...

You went to your reward with 3068060 points,
Magicbane (worth 3500 zorkmids and 8750 points)
Stormbringer (worth 8000 zorkmids and 20000 points)
Trollsbane (worth 200 zorkmids and 500 points)
The Eye of the Aethiopica (worth 4000 zorkmids and 10000 points)
The Bell of Opening (worth 5000 zorkmids and 12500 points)
9 emeralds (worth 22500 zorkmids),
8 rubies (worth 28000 zorkmids),
6 black opals (worth 15000 zorkmids),
6 jade stones (worth 1800 zorkmids),
5 chrysoberyl stones (worth 3500 zorkmids),
5 amethyst stones (worth 3000 zorkmids),
4 jacinth stones (worth 13000 zorkmids),
4 aquamarine stones (worth 6000 zorkmids),
4 garnet stones (worth 2800 zorkmids),
4 obsidian stones (worth 800 zorkmids),
3 diamonds (worth 12000 zorkmids),
3 turquoise stones (worth 6000 zorkmids),
3 agate stones (worth 600 zorkmids),
2 amber stones (worth 2000 zorkmids),
2 fluorite stones (worth 800 zorkmids),
1 dilithium crystal (worth 4500 zorkmids),
1 sapphire (worth 3000 zorkmids),
1 topaz stone (worth 900 zorkmids),
1 opal (worth 800 zorkmids),
1 jasper stone (worth 500 zorkmids),
1 amulet of life saving (worth 150 zorkmids),
and 0 pieces of gold, after 54833 moves.
You were level 21 with a maximum of 181 hit points when you ascended.

6 3068060 sness-Wiz-Elf-Fem-Cha ascended to demigoddess-hood. 82 [181]

Sweet!
animator.js - A new way of doing effects with javascript and prototype.
a flurry of prototype.js updates
A good introduction to capistrano.
simply_helpful - Describing the plugin


scratch - is a tool from the MIT Media Lab that lets children design their own interactive content and games.


Very interesting, I've been thinking about how to get kids online building their own websites, trying to think of a way to simplify Ruby on Rails, so that it's more open and accessible, but still gives you all the power of Rails and Ruby, but just with a more friendly and accessible way to get started.

I've been thinking about this a lot in the context of the one laptop per child project. Where each child could be running a small application that they could rapidly iterate on, and then the web application and content could be published to a larger cloud computing paradigm. It's important to have both a way for the child to quickly iterate over content, think a BASIC program, and then for them to quickly get it out to the rest of the world. I'm thinking, and want to think about this with other like minded people.
Simply Helpful - A new Rails plugin from DHH. Looks interesting, might simplify some views.

And if it's from DHH, it'll probably be canon before long, so better learn it while the learnin's good.


The transit of Mercury that just happened.
So amazing to see that tiny disk there, how big our solar system is, such majesty. I love to look up at the stars at night, I don't feel insignificant, instead, I feel connected to all of it, that light from those stars travelling across all those light years, and my eyes interact with it to form an impression in my mind. We are so blessed to be in this universe, part of it all.

Tuesday, November 07, 2006

Data Visualization Tools for Linux - gnuplot rocks. i've done so much with gnuplot over the years, and it looks like these other packages are doing some neat things with 3d visualization, which was always painful with gnuplot.
An interview with Marcel Molina of 37signals.

'So you were all working on pagination? That’s a freaky coincidence. Says something about the state of web development (then), doesn’t it?

Yes. And none us are fans of pagination now, as it happens. It’s a “design crutch.” A cop out, if you will.'
rjs templates in Rails

"If you’re not using migration scripts for your database you are going to start right now. That’s how awesome they are. They are the Brussels sprouts of Rails. You’re going to use em and you’re going to like em, period."

Saturday, November 04, 2006

CSS - Let's Make Love and Listen to Death From Above

oh my, i love css.

Lots of links:

Become a gmail master
gmail keyboard shortcuts
zventstools - Interesting Rails plugins
ajaxload - Make funky ajax loading buttons
cheat sheet for microformats with rails
interesting bookmarklets
using tinymce in rails
cached_model - cache models in rails, from our friends at the robot co-op
time based fragment caching with rails
MySQL UPDATE - How to update tables in MySQL
animator.js - This so rocks, it's a simple way to do funky javascript effects in a prototype.js compatible way, much simpler than scriptaculous, you can transition between two CSS views of an element. sweet.
backgroundrb - A way to run processes in the background from Rails.
funky audio electronics projects - spookyarduino
centering with CSS
CSS Centering - fun for all!

Thursday, November 02, 2006

3D triangles in javascript with just HTML/CSS/DOM.

A really cute idea, he uses coloured divs of right triangles, and put the triangles together into arbitrary shaped triangles. Interesting.

Wednesday, November 01, 2006

custom _benchmarks - A Rails plugin that allows you to append custom benchmarks to the benchmarks in the logfile.