jason reposa RSS

My Bank Tracker


Yowzas!
Yowzas! the blog

Archive

Jul
26th
Mon
permalink

Wordpress code: Find parent category of blog post

On MyBankTracker.com we introduced a new category structure. For reasons I won’t get into, I needed to find the parent category of the current post’s category. But, finding the parent category was surprisingly difficult using standard Wordpress functions. Anyways, this code is based on get_category_parents() which can be found in wp-includes/category-template.php. Note: this is tail recursive, so it could be rewritten to be iterative. Feel free to copy and redistribute.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 
// Recursively traverse the parent child relationships of categories, returning when found the parent with no parents
// $id is the child category, ignore $visited on the first call (based on get_category_parents() in category-template.php)

function mbt_get_category_parent( $id, $visited = array() ) {
$parent = &get_category( $id );

if ( is_wp_error( $parent ) )
return $parent;

if ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) {
$visited[] = $parent->parent;
return mbt_get_category_parent( $parent->parent, $visited );
}

return $parent;
}

As expected, use this code at your own discretion. No support or liability implied by sharing this.

Posted via email from Static Overflow | Comment »

Jul
20th
Tue
permalink

Yojimbo + Dropbox + sleepwatcher

There is a great post on the Yojimbo google group about how to get Yojimbo working on Dropbox. This allows you to use synchronize your notes/passwords/etc over more than one computer. http://groups.google.com/group/yojimbo-talk/msg/9465b1c53650a2b9

The one snag is that you can only have Yojimbo running on one machine at a time. In order to work around this limitation I’ve used the command line tool sleepwatcher to monitor when a computer goes idle, so after 10 minutes of idle it will run a script that tells Yojimbo to quit. Download sleepwatcher here: http://www.bernhard-baehr.de/

Here are the scripts to do it. …

Posted via email from Static Overflow | Comment »

Jan
29th
Fri
permalink

Bill Gates’ Generosity

I’ve purchased Windows 3.1, 95, 98, 2000 and XP. I’m finally at peace with that now that I know that part of the money has gone to people really who need it.http://www.timesonline.co.uk/tol/life_and_style/health/article7007734.ece

Posted via email from Static Overflow | Comment »

Jan
28th
Thu
permalink

Do you need a seed investment to get VC?

I posted this question on Hacker News.

We’re profitable. We’ve done our homework. We have proven the business model and customer validation. It’s scalable and repeatable. But, we’ll need a big investment to grow at the scale we want.

We understand that seed investment can open up doors by giving us introductions and preference when finding the right VC, but our revenue is greater than any seed investment that I’ve seen.

We’re more than willing to give up some equity to grow. We just want the right partnership.

Do you need seed investment if your revenue is greater than what a seed can offer? If you skip getting a seed, how likely is it that you’ll get the right VC?

http://news.ycombinator.com/item?id=1084083

Posted via web from Static Overflow | Comment »

Jan
27th
Wed
permalink

T.M. Lewin I still can’t log in

This little blog-o-mine is turning into a rant site. Anyways, I want to order a new suit, but I can’t log in using my email address. Yes. My email address TLD is 4 characters. This just doesn’t seem possible that my .name email address is rejected.

http://www.tmlewin.co.uk/

i’m out.

Posted via email from Static Overflow | Comment »

Sep
26th
Sat
permalink


Clear skies at Castle in the Clouds. Beautiful day for a wedding.

permalink


New Hampshire for the weekend

Sep
13th
Sun
permalink


We had a library date tonight, but it closes at 5.

Sep
7th
Mon
permalink


Fire

Sep
5th
Sat
permalink


Vodka at pravda