Kyle Terry - Latest Entrieshttp://kyleterry.comA vegan software developerTue, 07 Sep 2010 12:06:18 GMTPyRSS2Gen-1.0.0http://blogs.law.harvard.edu/tech/rssAaahhhhhttp://kyleterry.com/posts/1<p>The joys of blogging software that doesn't cause high disk I/O. </p>http://kyleterry.com/posts/1Thu, 20 May 2010 16:20:18 GMTBecause That's How I Rollhttp://kyleterry.com/posts/2<p>All of my posts and post collection are available in JSON. Just add .json to the end of the URI (e.g. /posts.json or /posts/1.json). </p>http://kyleterry.com/posts/2Thu, 20 May 2010 23:17:35 GMTOMG LOSThttp://kyleterry.com/posts/4<p><center><object width="320" height="168"><param name="movie" value="http://www.lost4815162342.com/flash/countdown.swf"></param><param name="wmode" value="transparent"></param><embed src="http://www.lost4815162342.com/flash/countdown.swf" type="application/x-shockwave-flash" width="320" height="168" wmode="transparent"></embed></object></center> </p>http://kyleterry.com/posts/4Fri, 21 May 2010 13:47:02 GMTTotally Deserved Ithttp://kyleterry.com/posts/7<p><center><a href="http://huff.to/anLJUc" target="_blank"><img src="http://i.huffpost.com/gen/168353/JULIO-APARICIO-GORED.jpg" width="620px"/></a></center> </p> <p>I cannot begin to express how wrong bullfighting is. Click the image for more photos. </p>http://kyleterry.com/posts/7Sun, 23 May 2010 13:37:46 GMTImplementing RSS in Pylonshttp://kyleterry.com/posts/3<p>I needed a RSS feed for this blog. A quick Google search revealed the library <a href="http://www.dalkescientific.com/Python/PyRSS2Gen.html">PyRSS2Gen</a> which seemed to be an easy option for what I was trying to do. </p> <p>I use Pylons for most projects these days. So this article will show you how to implement a simple and fast RSS feed in that framework. </p> <p>I start by adding the route I want for the feed to <code>config/routing.py</code>. </p> <p>EDIT: It's nice to have a url() alias for routes you will be linking, so I added it as the first parameter in connect for this example. </p> <pre><code>map.connect('rss', '/feed/rss', controller="posts", action="rss_feed") </code></pre><p>That will map http://kyleterry.com/feed/rss to my posts controller and dispatch to the rss_feed action. </p> <p>Now that I have my route, I need to edit <code>controllers/posts.py</code> and import PyRSS2Gen as rss and datetime. </p> <pre><code>import PyRSS2Gen as rss import datetime </code></pre><p>I now get to create the rss_feed action. In this action I will be loading the posts from the database using SqlAlchemy, creating an RSS item for each one, and finally creating then returning the XML from the PyRSS2Gen.RSS2 object. </p> <pre><code>def rss_feed(self): post_q = model.meta.Session.query(model.Post)\ .limit(10) posts = post_q.all() items = [] for post in posts: items.append( rss.RSSItem( title=post.title, link='http://kyleterry.com%s' % \ h.url_for('post', id=post.id), description=h.markdown(post.body), guid='http://kyleterry.com%s' % \ h.url_for('post', id=post.id), pubDate=post.posted ) ) feed = rss.RSS2( title='Kyle Terry - Latest Entries', link='http://kyleterry.com', description='A vegan software developer', lastBuildDate=datetime.datetime.now(), items=items ) return feed.to_xml() </code></pre><p>The .to_xml() method will just return the rendered XML as a string. If you need to write this output to a file, you can use the .write_xml() method which is documented on the PyRSS2Gen website linked above. </p>http://kyleterry.com/posts/3Fri, 21 May 2010 12:37:51 GMTUnclogging Drains the Hacker Wayhttp://kyleterry.com/posts/6<p>I live on the bottom floor in a building in beautiful Portland, OR and above me are a few people with long hair. As nice as my neighbors are, once in a while their drains clog up and when they unclog, it all shoots down to mine and I'm stuck with double the headache. </p> <p>One of the last things I want to do is pour chemicals that could strip the paint off a steel bridge down my drain to clear a clog. </p> <p>While thinking of a way to solve my puddle problem during a shower, I decided to Google around for a bit and try a few things. </p> <p>My finding show that baking soda and vinegar works well at loosening a clog. Then hitting it with a 6 or 7 cups of boiling hot water from a tea pot usually puts the nail in the coffin for that annoyance. </p> <p>The hot water trick worked so well, I run a tea pot full of it through the drains once or twice a week. </p> <p>Now go keep your drains clear. </p>http://kyleterry.com/posts/6Sat, 22 May 2010 19:44:57 GMTWhat Happens Next?http://kyleterry.com/posts/8<p>The payroll industry is important. It keeps people paid. But that industry is not for me anymore... </p> <p>Today is the day. I have survived my last day of work and it is now that I start something of my own. Something I can share with a few people who have become good friends of mine. </p> <p>Back in February of this year I was handed the opportunity to build something fun; a company where I was in control of the development. A company called Fiver Labs. </p> <p>5 months later we have all the paper work filled out for our LLC and we have a list of ideas to tackle. iPhone apps, social networks and great fun lay ahead for me. </p> <p>Things have moved slow because we all had full time jobs. It's not easy trying to get a company up and running all the while working a day job 9 to 11 hours a day. It's truly exhausting. </p> <p>After today things will start moving faster. I have all day every day to work on this business of mine. I am finally building the steps to being an entrepreneur. And as an entrepreneur, I have the goal of sharing things I learn while on the road to creating things I find fun with you. </p> <p>Startups are something I've always found fascinating. They are like a family rather than the separated depths of hell in the established corporation world. </p> <p>Thanks and goodbye, Pamiris! </p>http://kyleterry.com/posts/8Thu, 27 May 2010 19:33:03 GMTAcknowledge That: There's an Oil Spillhttp://kyleterry.com/posts/10<p>An oil well blew out on April 20th in the Gulf of Mexico. 2 days later the oil rig sunk after being on fire. 17 people were injured and 11 are missing and presumed dead. </p> <p>Over the past couple weeks I have come into contact with a few people that, to say the least, are completely unaware there is even an oil spill. I think about this every day because it's such a serious mistake the human race has made. It's a terrible heart wrenching thing to think about. Knowing people are unaware of this event sucks. </p> <p>Sea life, birds and people are all affected by this big-fucking-oopsy. </p> <p>Here are a few sources from today about the problem we face in the Gulf: </p> <ul> <li> <a href="http://www.huffingtonpost.com/2010/05/28/22mile-oil-plume-under-gu_n_593658.html" target="_blank">From Huffington Post</a> </li> <li> <a href="http://www.cnn.com/2010/US/05/28/gulf.oil.spill/index.html?hpt=T1" target="_blank">From CNN</a> </li> <li> <a href="http://en.wikipedia.org/wiki/Deepwater_Horizon_oil_spill" target="_blank">From Wikipedia</a> </li> <li> <a href="https://twitter.com/#search?q=%23oilspill" target="_blank">Twitter Search Feed</a> </li> </ul>http://kyleterry.com/posts/10Fri, 28 May 2010 18:28:43 GMTAcknowledge That: Sweatshops Still Existhttp://kyleterry.com/posts/9<p>Sweatshops are very real. The products you and I purchase are most likely from one. I can't help but feel shitty every time I buy something. Most people in Chinese factories make 30 pence or less. 30 pence is about 50 US cents. Clothes, computers, iPads and shoes come mostly from these developing countries. </p> <p><a href="http://www.independent.co.uk/news/world/asia/concern-over-human-cost-overshadows-ipad-launch-1983888.html" target="_blank">Read more</a>. </p>http://kyleterry.com/posts/9Thu, 27 May 2010 22:45:07 GMTIRC Is Still Funhttp://kyleterry.com/posts/12<p>IRC is a chat protocol that stands for Internet Relay Chat. IRC was created in 1988 and had been going strong ever since. It's network and channel based. You connect to a network that someone or an organization runs with IRC daemons and you join channels that the network hosts. You have your very own nickname that people can identify you by. </p> <p>It was my freshman year in highschool. I had been on IRC for a couple of years before; but I never used it to it's fullest. I would just jump from channel to channel on my parent's old Packard Bell with Windows 98 looking for good conversation. I used mIRC. But that year was when I really got into IRC thanks to a couple friends. </p> <p>I was invited to a channel on EFnet where they all hung out and chatted about cracking, hacking and various other computer related topics. I loved it, but over time the channel lost it's momentum and talk started to slow down. </p> <p>Eventually I got disconnected from the channel and didn't come back for a number of reasons. But I was still in other channels on different networks across IRC. One was a vegan channel on Undernet which I still hangout in. There are arguments, recipes, pot heads, and talk about everything really. </p> <p>At the beginning of 2009 we started a project called Voom. Now, I don't really know what the fuck Voom was aiming for, but we started an IRC channel on EFnet for it. We all wrote PHP code and tried to make various tools that followed Voom standards we had put in place. It failed; it failed big time. Meh. </p> <p>After the fall of Voom a few of us moved to Freenode when I started a channel called #infoforcefeed. It's a great channel. We talk about all kinds of topics that range from politics to programming... from programming to hacking and cracking. We've talked about algorithms, science, space, and how much border control sucks. #infoforcefeed won't be going anywhere anytime soon. It's a small band of intelligent people, but it's got big conversation at times. </p> <p>So don't hate on IRC because it will be here long after you and I are gone; filled with newbs, the elite, spammers and crackers. </p>http://kyleterry.com/posts/12Tue, 08 Jun 2010 16:26:56 GMT