Charles in charge of our days, and our HTTP data
So today I learned that if you have firebug installed on your Firefox, you can basically kiss web-surfing goodbye. But while you are taking a peek beneath the surface, you can run into some pretty cool apps, and this is no exception. According to http://www.charlesproxy.com :
Charles is an HTTP proxy / monitor / Reverse Proxy that enables a developer to view all of the HTTP and SSL traffic between their machine and the Internet, including requests, responses and HTTP headers.
This comes in mighty handy when you are passing variables to various analytics and metrics system, while not having the original source code in front of you.
In one day it has proven its weight in gold to me.
*Notable second runner up is Firefox plugin OmniBug.
New Years Brunch
[theora] Batch Encoding in ffmpeg2theora
Came across this nifty command to batch encode Ogg video files using ffmpeg2theora. Perfect for this Video portfolio page I’m making using the HTML5 video element.
[theora] Batch Encoding in ffmpeg2theora.
Thanks goes to Toby Nowland-Foreman for this one.
Game Over by Brock Davis
WordPress 3.0 is OUT NOW !
Friday June 18 and Saturday the 19 – The Melvins
So a while back my friend Thom took me to see The Melvins perform at Irving Plaza. Ten years later here I am going to see The Melvins with my friend Thom, and bringing my friend Rob to see them for the first time. The circle of life continues…
p.s. This Saturday is also the Crest Hardware Art Show. Come down if you are in the neighborhood. Good times.
Beautiful day
Today’s May 1st and by golly the weather is beautiful. Also its the 1st day all habitants of our household have had the same day off since we moved in back in December.
Gillian and I saw “Kick Ass” last night and I must say it definitely lived up to it’s title.
Going to dinner at Zen Sushi on St. Marks and 2nd Ave for Sabrina’s birthday tonight.
Time to do “things.”
Moving out is awesome!
So recently my girlfriend and I moved in to a duplex in Bushwick, Brooklyn. This is our first foray into living on our own, and so far it has been awesome.
2 awesome roommates. Lots of friends nearby.
I have been very busy as of recently. Working on a lot of projects.
2010 off to a great start.
Cheers!
is_subcategory()
Ok, I just spent the better part of ALL DAY trying to figure this out.
I want my wordpress category.php template to be able to detect whether the category it is serving is a parent category or subcategory. THATS IT. And without having to hard code any category ID’s. After perusing the forums and codex for a couple of hours, the marriage of these two functions seemed to get the job done.
get_query_var is the variable stored in the query that tells category.php what category to serve.
get_category retrieves category data given a category ID or category object.
Here’s the function that goes in your functions.php file:
function is_subcategory (){
$cat = get_query_var('cat');
$category = get_category($cat);
return ( $category->parent == '0' ) ? true : false;
}
Then you can use this in your category.php file to determine if the category you are serving is a parent category or subcategory:
if ( is_subcategory() ):
//displaying subcategory
else:
//displaying parent category
endif;
Hope this helps some people out there.
*note: both code snippets should be wrapped inside php brackets. <?php ?>



