<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Joe Terranova &#187; code</title>
	<atom:link href="http://www.joeterranova.net/blog/archives/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joeterranova.net/blog</link>
	<description>I do stuff with people.</description>
	<lastBuildDate>Wed, 20 Oct 2010 04:15:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to write a great FreePBX extension</title>
		<link>http://www.joeterranova.net/blog/2009/02/08/how-to-write-a-great-freepbx-extension/</link>
		<comments>http://www.joeterranova.net/blog/2009/02/08/how-to-write-a-great-freepbx-extension/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 08:50:20 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[New Jersey LoCo Team]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.joeterranova.net/?p=114</guid>
		<description><![CDATA[Update Voicepulse replied in a comment to this post. Though my post was a bit venomous, they replied thoughtfully, and they&#8217;re considering GPLing their FreePBX module. Keep in mind, while the Freepbx module annoyed me, and the contract annoyed me, I&#8217;m still using their service, I&#8217;ve switched to it full time, and I may be [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update</strong> Voicepulse replied in a <a href="http://www.joeterranova.net/2009/02/08/how-to-write-a-great-freepbx-extension/#comment-3235">comment to this post</a>. Though my post was a bit venomous, they replied thoughtfully, and they&#8217;re considering GPLing their FreePBX module. Keep in mind, while the Freepbx module annoyed me, and the contract annoyed me, I&#8217;m still using their service, I&#8217;ve switched to it full time, and I may be switching my mother to it if she goes VOIP. A 19 ping (versus 100-120) and 4 channels will do that.</p>
<ol>
<li>Write a FreePBX plugin that automatically creates trunks and inbound routes for people using your service.</li>
<li>In the process, do the following
<ol type="A">
<li>Blindly try to install curl (using yum. On my Ubuntu machine.)</li>
<li>Include FreePBX and your own function files with hardcoded paths for Trixbox, instead of using relative paths.</li>
<li>Make tar.gz backups of my /etc/asterisk directory and quietly add them to your modules directory. Make sure not to do any checks for file size or free disk space.</li>
<li>Write to <strong>my</strong> sip_general_custom.conf and extensions_custom.conf (bad FreePBX extension! bad!)</li>
</ol>
</li>
<li>Use <a href="http://www.raizlabs.com/software/phpobfuscator/">PHP Obfuscator</a> on your code, and copyright it, so that no one can see all the horrible things you&#8217;re doing to their system, or figure out why it doesn&#8217;t work.</li>
</ol>
<ul>
<li>I installed the extension and saw the paths didn&#8217;t work.</li>
<li>I looked at the code, and was appalled that they obfuscated it.</li>
<li>I symlinked /var/www/html so that it would install, then found out none of their actions (adding trunks, adding inbound routes) actually worked.</li>
<li>After seeing some of the fun things it does, I&#8217;m quite glad it didn&#8217;t work at all!</li>
</ul>
<p>Thanks Voicepulse! Your rates are good, the voice quality seems great, but emailing you a signed contract and waiting for &#8220;verification&#8221; was annoying, and I wouldn&#8217;t touch your FreePBX extension with 9 1/2 foot poll. Your customers (including me) would probably clean up your mistakes if you GPL&#8217;d it. The only downside would be the possibility of helping someone you didn&#8217;t intend to.</p>
<br/><a href="http://www.joeterranova.net">JoeTerranova.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.joeterranova.net/blog/2009/02/08/how-to-write-a-great-freepbx-extension/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Media Server 3.5 on Ubuntu</title>
		<link>http://www.joeterranova.net/blog/2009/01/30/flash-media-server-35-on-ubuntu/</link>
		<comments>http://www.joeterranova.net/blog/2009/01/30/flash-media-server-35-on-ubuntu/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 18:01:15 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[New Jersey LoCo Team]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.joeterranova.net/?p=109</guid>
		<description><![CDATA[On Linux, Flash Media Server only supports Redhat. In February, Markus Bertheau posted a patch for FMS 3, so that it would run on Ubuntu. Based on that patch, here is a patch for FMS 3.5 . It&#8217;s patched in a similar way. From the installer directory, run: patch -p1 &#60; fms-3.5-ubuntu.patch That gets it [...]]]></description>
			<content:encoded><![CDATA[<p>On Linux, Flash Media Server only supports Redhat. In February, Markus Bertheau posted<a title="Flash Media Server 3 on Ubuntu 7.10 Gutsy" href="http://www.bluetwanger.de/blog/2008/02/11/flash-media-server-3-on-ubuntu-710-gutsy/"> a patch for FMS 3</a>, so that it would run on Ubuntu. Based on that patch, <a title="FMS 3.5 for Ubuntu patch" href="http://www.joeterranova.net/code/fms-3.5-ubuntu.patch">here is a patch for FMS 3.5</a> . It&#8217;s patched in a similar way. From the installer directory, run:</p>
<p>patch -p1 &lt; fms-3.5-ubuntu.patch</p>
<p>That gets it to install. I&#8217;ve not tried running it though. If you run into problems running it, please let me know.</p>
<br/><a href="http://www.joeterranova.net">JoeTerranova.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.joeterranova.net/blog/2009/01/30/flash-media-server-35-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>RSS Feed Generator for DeviantArt</title>
		<link>http://www.joeterranova.net/blog/2008/02/11/rss-feed-generator-for-deviantart/</link>
		<comments>http://www.joeterranova.net/blog/2008/02/11/rss-feed-generator-for-deviantart/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 20:10:54 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[New Jersey LoCo Team]]></category>

		<guid isPermaLink="false">http://www.joeterranova.net/2008/02/11/rss-feed-generator-for-deviantart/</guid>
		<description><![CDATA[Just a quick post. Wrote an RSS Feed Generator for DeviantArt Galleries. To use it, replace yourusername with &#8230; your username. http://www.joeterranova.net/code/deviantart.php?artist=yourusername Source code is available here. Brief attempt at a man page. How it Works When life gives you lemons, use regular expressions. I monitored http requests to find DeviantArt&#8217;s back end ajax interface [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post.</p>
<p>Wrote an RSS Feed Generator for DeviantArt Galleries.</p>
<p>To use it, replace yourusername with &#8230; your username.</p>
<p>http://www.joeterranova.net/code/deviantart.php?artist=yourusername</p>
<p>Source code is available <a href="http://www.joeterranova.net/code/deviantart.php.txt" >here</a>.</p>
<p>Brief attempt at a man page.</p>
<p><strong>How it Works</strong></p>
<p>When life gives you lemons, use regular expressions.</p>
<p>I monitored http requests to find DeviantArt&#8217;s back end ajax interface (which they use to do previous/next on galleries). From there I wrote a regular expression to parse out each entry, along with entry url, image url, date, and title. From there it&#8217;s pretty straight forward.</p>
<p>Keep in mind, I can&#8217;t guarantee this will work for you. If it&#8217;s been some time since I posted this, you may want to check if they&#8217;ve reintegrated rss feeds. That said, unless they change their layout, I doubt they&#8217;ll be purposefully breaking this script.</p>
<p>Right now, the only thing it does is get the latest entries from the given user&#8217;s gallery &#8212; no tags or anything like that. That stuff is probably doable. If you want anything specific, you can a) use the source and change it yourself, or b) leave a comment, and I&#8217;ll add it (within reason) when I have time. If you make good changes, let me know and I&#8217;ll post them here.</p>
<p><strong>Options:</strong></p>
<p>artist &#8212; the artist to get the feed for (ie, your username)</p>
<p>ex: deviantart.php?artist=yourusername</p>
<p>count &#8212; the number of items to return. The default is 24. If set higher than your total deviations, it&#8217;ll return all of them.</p>
<p>ex: deviantart.php?artist=yourusername&amp;count=10</p>
<p>export &#8212; if set, instead of returning an rss feed, it&#8217;ll just output the results in an array using <a href="http://www.php.net/manual/en/function.var-export.php">var_export</a>. Useful if you&#8217;re just trying to get your deviations on your site (and your site uses php).</p>
<p>ex: deviantart.php?artist=yourusername&amp;export=1</p>
<p>nolink &#8212; by default,  the rss feed will show the thumbnail image as a link back to the main deviation. Add this to disable the link part.</p>
<p>ex: deviantart.php?artist=yourusername&amp;nolink=1</p>
<p>I&#8217;ll leave this up, but if I notice real major traffic, I&#8217;ll be taking it down and putting it elsewhere (I&#8217;ll of course leave the source up). Please don&#8217;t do anything silly like hit my url every 10 seconds. For maximum reliability, host it yourself.</p>
<p>If you host it yourself, there&#8217;s 3 parameters at the top of the script to change:</p>
<pre>$usecurl=1;
$url = 'http://www.joeterranova.net/code/deviantart.php';
$webmaster='joeterranova@gmail.com (Joe Terranova)';</pre>
<p>$usecurl &#8212; set this to 1 to use curl instead of file_get_contents. If your host doesn&#8217;t have the curl extension installed and you set this to 1, you&#8217;ll get an error &#8212; conversely, if your host has remote file opening off (like mine does), and this is set to 0, you&#8217;ll get an error.</p>
<p>$url &#8212; set this to the url of the script.</p>
<p>$webmaster &#8212; set this to your email address and name.</p>
<p>For any questions, comments, or feature requests, leave a comment here.  I release this code under the GPL v3 (see code for details).</p>
<br/><a href="http://www.joeterranova.net">JoeTerranova.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.joeterranova.net/blog/2008/02/11/rss-feed-generator-for-deviantart/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

