fleshyorgans

tryin’ not to be a linux fanboy

fleshyorgans Two Cats

Entries Tagged as 'programming'

Quick and dirty hack for acts_as_attachment file movement

December 10th, 2007 · No Comments

Say you’re working on something that uses acts_as_attachment. Also say that the person who wrote it decided that all the different models’ attachments would save in the same place. Also suppose that you want to change the file location of all those uploads.
Well, here’s a quick and dirty migration that’ll save you from moving files […]

[Read more →]

Tags: programming · 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

PHP and Payflow Pro FOR THE LOSE

October 29th, 2007 · No Comments

Posting this cause I wan’t aware and the only other post I found was dated January.
Since Paypal purchased Verisign they are discontinuing the pfpro extension to PHP. And in fact, what I’m reading is that Sept 2009 is the end of life for that functionality, meaning requests will not work beyond that point.
For sites using […]

[Read more →]

Tags: programming · stuff

Vim tip: keyboard shortcuts

October 26th, 2007 · No Comments

Finally got around to learning how to define keyboard shortucts in vim. It’s easy!

map <desiredkey> <targetaction>

So, for example, I split windows vertically and want to navigate via ctrl+pagedown or pageup.
Here’s what I did (include < and > when defining)

map <c-pageup> <c-w>h
map <c-pagedown> <c-w>l

Found via a vim wiki search

[Read more →]

Tags: programming · stuff

Vim awesomeness.

September 28th, 2007 · No Comments

If you use Vim as your text editor, try this
:TOhtml
This will generate an HTML version of your source code, complete with color scheme. It’s pretty sweet.
Example here (opens a new window)
This just tickles me.

[Read more →]

Tags: programming · stuff · vim