<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
<channel>

<title>Matthew Kosoy</title>
<description>Matthew Kosoy - Fed via RSS</description>
 <link>http://www.mattkosoy.com</link>
 

<item>
	<title>Bedford Avenue, between Flushing and Division.</title>
	<description><![CDATA[ It is very important that the lane for cyclists be re-added to the section of Bedford Ave between Flushing Ave & Division Street. 

I ride on these blocks on my commute to work every day, and I am now at an increased risk of being hit by a car.   The situation is very unsafe, to say the least. 

Please help.  

 ]]>
	
	</description>
	<link>http://mattkosoy.com/?id=19</link>
</item>
<item>
	<title>A Letter to Philadelphia City Councilman Frank DiCicco</title>
	<description><![CDATA[ <p>I'm writing in regards to your recent decision to introduce legislation changing the existing Philadelphia bike laws. In light of the recent events, I can certainly understand why such a call to action seems the right thing to do. However I believe you and Councilman Kenney are overreacting with your bills and should reconsider.</p>
<p>As a former resident and biker of Philadelphia, I can tell you with that there is absolutely no enforcement whatsoever of the existing bike laws. None. With no reason to obey the word of law, bikers have taken great liberty to make their lives easier: Running traffic lights on the wrong side of the road, not wearing helmets, etc. This lack of law has bred a culture of bad bike behavior.</p>
<p>With the recent deaths of two people on account of bad biking practices, you are now set to introduce laws that will dramatically alter the landscape of the city's culture. The combination of reactionary over-enforcement of existing laws and penalties so severe that people risk losing their bicycles can only result in unrest and discourse. I am especially concerned with the penalty of  having your bike confiscated if it does not have "brakes".  This leaves the police in effective control over a person's possessions in a matter where they may not have expertise. While I certainly abhor the idea of riding around without brakes, the notion that an officer can simply take your bike over the perception that you don't have them is a frightening one.</p>
<p>We already have an existing set of laws. Enforcing them will foster a better community. Augmenting them to the levels you threaten only serves to disenchant people from biking in the city. Philadelphia has already ostracized it's skateboard community by treating them as though they are thugs and criminals. Let's not do the same to bikers.</p>
<p>Respectfully yours,</p>
<b>Matthew Kosoy</b> ]]>
	
	</description>
	<link>http://mattkosoy.com/?id=18</link>
</item>
<item>
	<title>Display the first post from a specific category in Wordpress</title>
	<description><![CDATA[ <script src="http://gist.github.com/232392.js"></script>

<p>And here's an example of how you might use this...</p>

<blockquote>
// lets say that "featured albums" are associated to a category with the ID of 5.
$album = mk_get_first_post_from_category(5);  //5 is the ID of the category we're selecting against. 
	if($album != null){ 
		echo '	<h3>Featured Album</h3>';
		echo $upcoming_event[0]->post_content; 
	}

</blockquote> ]]>
	
	</description>
	<link>http://mattkosoy.com/?id=16</link>
</item>
<item>
	<title>SKATE LURK </title>
	<description><![CDATA[ <p><a href="http://dfiant.com">Brandon Gray</a> and myself have collaborated on a site called <a href="http://www.skatelurk.com">Skate Lurk</a>.   It aggregates the twitter feeds of a moderated group of people who ride skateboards.  It's geared mostly towards following the entire industry,  but we have plans to extend it real far.  </p>
<p>Be on the lookout for more lurk style sites soon.</p> ]]>
	
	</description>
	<link>http://mattkosoy.com/?id=17</link>
</item>
<item>
	<title>Dynamic CSS via PHP and .htaccess</title>
	<description><![CDATA[ <p> One set back to CSS is that it is a static, and by default we can't use any programatic logic in our CSS document.   With .htaccess  wecan tell the server to parse CSS files as PHP.   By doing so we can then add whatever markup we want </p>
<h4>Step 1.  The .htaccess file </h4>
<p>In case you are unfamiliar an <a href="http://en.wikipedia.org/wiki/Htaccess">.htaccess</a> is a directory-level configuration file thats used for slightly modifying the configuration of your web server.   With one line of blockquote we can tell a webserver to parse CSS files as if they were PHP.</p>
<p>Copy the blockquote below into your .htaccess file.  If you don't have one you can create one by opening a new file in any text editor and saving this file as &emdash; creatively &emdash; .htaccess.   Quickly transfer this file to the directory on your web server with which you wish to parse CSS as PHP.</p>
<blockquote> AddType application/x-httpd-php .php .css </blockquote>
<h4>Step 2.  The key to dynamic css </h4>
<p>Here's the thing.  Now that you've told the server to parse all CSS files as PHP  you're going to need to use PHP to output a css header.   This will automatically tell the user's browser that they are recieving CSS.  Copy the PHP code below into your CSS document, and paste it on line 1.  </p>
<blockquote>header("Content-type: text/css");</blockquote>
<p>Easy,  right?   Now that we have enabled PHP functionality in CSS we're capable of, well, lots of things.</p>
<h4>An Example</h4>
<p>Here's an example where we will query a database for a list of banner images,  and select a random one to use as a background image for an &lt;h1&gt; element.  One caveat, and that is the object <i>$db</i> i use in the code example is an instance of the <a href="http://www.woyano.com/view/213/Download-ezSQL-Database-Class-204">ezSQL Database Class</a>.  </p>
<blockquote>
 #PHP <br/>
header("Content-type: text/css");	<br/>
$random_banners = array();    <br/>
$banner = $db->get_results("SELECT * FROM banners ORDER BY date", ARRAY_A);<br/>
if(count($banner) > 0){ <br/>
	foreach($banner as $b){<br/>
		$random_banners[] = $b['id'];<br/>
	}<br/>
	$max = count($random_banners);<br/>
	$random2 = rand(0, $max-1);<br/>
	$bnr = $db->get_results("SELECT * FROM media WHERE id = ".$random_banners[$random2], ARRAY_A);<br/>
}<br/>
<br/>
#/PHP<br/><br/>

#CSS
<br/>
h1{	float:left;	text-indent:-9999px; background:transparent url(images/<? echo $bnr[0]['image']; ?>) no-repeat 0 0; width: 100%; height: 125px;	margin:0 0 0.75em 0;padding:0; }
</blockquote> ]]>
	
	</description>
	<link>http://mattkosoy.com/?id=11</link>
</item>
<item>
	<title>Rabenick / Campagnolo Track Bike</title>
	<description><![CDATA[ <p>I've decided to <a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=330331481821">sell my bike.</a> </p>

<ul>
<li><img src="http://mattkosoy.com/i/photos/2009/05/19/IMG_3144.JPG" alt="Rabenick/Campagnolo Track Bike" /> <em>Tight front wheel clearance</em></li>
<li><img src="http://mattkosoy.com/i/photos/2009/05/19/IMG_3143.JPG" alt="Rabenick/Campagnolo Track Bike" /><em> Detail of the front wheel clearance</em></li>
<li><img src="http://mattkosoy.com/i/photos/2009/05/19/IMG_3137.JPG" alt="Rabenick/Campagnolo Track Bike" /><em>Ridiculous lugwork</em></li>
<li><img src="http://mattkosoy.com/i/photos/2009/05/19/IMG_3135.JPG" alt="Rabenick/Campagnolo Track Bike" /><em>Hand painted Campangolo logos</em></li><li><img src="http://mattkosoy.com/i/photos/2009/05/19/IMG_3141.JPG" alt="Rabenick/Campagnolo Track Bike" /><em>High Flange Campy Record track hubs.</em></li>
<li><img src="http://mattkosoy.com/i/photos/2009/05/19/IMG_3131.JPG" alt="Rabenick/Campagnolo Track Bike" /><em>The Complete Bike.</em></li>
</ul> ]]>
	
	</description>
	<link>http://mattkosoy.com/?id=15</link>
</item>
<item>
	<title>Quick and Dirty IE 6 detection</title>
	<description><![CDATA[ <p>Need to detect for IE 6?.  Working on a <a href="http://www.fineliving.com/" target="_blank">site</a> that doesn't have a  Doctype? Can't use conditional comments?  Try this javascript out:</p><br />
<br />
<blockquote><br />
if(typeof document.body.style.maxHeight === "undefined") {<br />
        alert('ie6');<br />
} else {<br />
        alert('other');<br />
}<br />
</blockquote> ]]>
	
	</description>
	<link>http://mattkosoy.com/?id=14</link>
</item>
<item>
	<title>End of the road.</title>
	<description><![CDATA[ <img src="http://mattkosoy.com/i/photos/2009/03/21/end_of_trail.jpg" alt="End of the trail" style="width:375px;"/><br />
<br />
<p>Breckenridge, March 2009</p> ]]>
	
	</description>
	<link>http://mattkosoy.com/?id=12</link>
</item>
<item>
	<title>First Post.</title>
	<description><![CDATA[ So it begins. ]]>
	
	</description>
	<link>http://mattkosoy.com/?id=10</link>
</item>
</channel>
</rss>
