2009.12.29

Adverse Reinforcement

By underblob @ 11:10pm — Categories: Inspirational Quotes

It is difficult to get a man to understand something when his livelihood depends on him not understanding it.

Upton Sinclair

2009.12.28

Worldview Remedy

By underblob @ 11:14am — Categories: Inspirational Quotes

We will have to shift from the materialistic, dualistic belief that people and the environment are separate, toward a new consciousness of an all-encompassing reality in which people feel their oneness with animate nature and all of creation.

Albert Hofmann

2009.12.24

Apartment on Fire with Obama

By underblob @ 7:55pm — Categories: Dreams

I live in an apartment building in London. The flat is dirty and disheveled. There are anonymous roommates and my room is full of expensive electronics and equipment. The back wall of my room has a window that reveals a view of the internal wall. We are moving out today. Everyone is packing up their stuff and I go into my room to pack my belongings. In the window that views into the wall, there is a fire. I start to panic and call 911. The line is busy. I call back and get an operator and tell her that my apartment is on fire, send the fire department. “My fucking apartment is on fire! Help! Send help!” The operator is uninterested and annoyed that a Yankee doodle is bothering her.

I go outside and cross the street to wait for the fire department and see president Obama on the sidewalk.”My apartment is on fire and the 911 operator doesn’t care. I’m not sure the fire department is going to come,” I say.

He looks into my eyes and earnestly speaks, “we must intercede in these times of crisis.”

2009.12.10

WP SQL Categories

By underblob @ 5:47am — Categories: LAMP, Tech, WordPress

Here is how to get WordPress Post categories via straight SQL query:

 

SELECT
	wp_term_taxonomy.description,
	wp_terms.term_id,
	wp_terms.name,
	wp_terms.slug
FROM wp_term_taxonomy
	JOIN wp_terms ON ( wp_term_taxonomy.term_id = wp_terms.term_id )
WHERE wp_term_taxonomy.taxonomy = 'category'

Getting Category Info in WP Theme

By underblob @ 4:40am — Categories: Tech, WordPress

In WordPress, there isn’t a simple template tag to get the category slug or description if you’re making a category.php template. Here is a little work-around:

$cat = get_query_var ( 'cat' );
$catslug = get_category ( $cat )->slug;
$catdesc = get_category ( $cat )->description;