fleshyorgans

tryin’ not to be a linux fanboy

fleshyorgans Two Cats

Been awhile, some fun Drupal code-related stuff

April 14th, 2008 · No Comments

Been busy with the play and work. We switched to a 4 day, 9 hour work week. So that leaves me with about 2 hours each day for non-theater, non-work related stuff. Not counting the day off, I guess.
Anyway, check this out. I have been tasked with writing a SQL Server database module for Drupal […]

[Read more →]

Tags: stuff

Coding: Rails Issues with :include

February 23rd, 2008 · No Comments

This is a sort of code analysis and something I discovered with :include usage in Rails. (This is in rails 1.1.6, so YMMV. I believe the latest Rails opts to use inner SELECTs rather than JOIN statements.
Also, this is kind of long.)

[Read more →]

Tags: stuff

Code: Dynamically Insert HTML Into Any Rendered PHP Page

February 15th, 2008 · No Comments

So, this pleases me enough to post it.
dynamic buffer insertion with PHP
Needed to quickly add a notice to every page on a client’s site where there was a single include, but not single-included layout pages (teachers, *sigh*).
I’ve never messed with output buffer stuff before, so this was just sort of surprising to me. It’s […]

[Read more →]

Tags: stuff

Operator Precedence (ruby et al.)

February 1st, 2008 · No Comments

Thought this was a little silly, but it generated a lot of discussion about precedence, short-circuiting of conditionals, and the value of syntactic sugar.
http://pastie.caboo.se/146194

[Read more →]

Tags: stuff

Seriously Word Press, WTH?

November 4th, 2007 · No Comments

While trying to figure out how to remove formatting from ‘wp_list_cats’ in Word Press, I discovered this awesome bit. Click the thumbnail for the full glory of the code.

You will notice that in my screenshot, the final function call to ‘list_cats’ at the end is truncated. This is because there are eighteen parameters. Again with […]

[Read more →]

Tags: programming · stuff