<?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>Rex Roof &#187; Coding</title>
	<atom:link href="http://www.rexroof.com/tag/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rexroof.com</link>
	<description>coding biking cooking</description>
	<lastBuildDate>Wed, 24 Feb 2010 18:34:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>movie time</title>
		<link>http://www.rexroof.com/8/movie-time/</link>
		<comments>http://www.rexroof.com/8/movie-time/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 04:39:00 +0000</pubDate>
		<dc:creator>Rex</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Everything]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">tag:blogger.com,1999:blog-7237050.post-8616530299483735888</guid>
		<description><![CDATA[creating an mpeg from a series of jpg images:
ffmpeg -f image2 -i &#8216;%03d.jpg&#8217; -sameq -f mpeg2video file.mpg
]]></description>
			<content:encoded><![CDATA[<p>creating an mpeg from a series of jpg images:</p>
<p>ffmpeg -f image2 -i &#8216;%03d.jpg&#8217; -sameq -f mpeg2video file.mpg</p>
<div class="blogger-post-footer"><img src="https://blogger.googleusercontent.com/tracker/7237050-8616530299483735888?l=www.rexroof.com%2Fblog%2Findex.php" alt="" width="1" height="1" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.rexroof.com/8/movie-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>flickr and unix is awesome</title>
		<link>http://www.rexroof.com/10/flickr-and-unix-is-awesome/</link>
		<comments>http://www.rexroof.com/10/flickr-and-unix-is-awesome/#comments</comments>
		<pubDate>Tue, 25 Apr 2006 19:26:00 +0000</pubDate>
		<dc:creator>Rex</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Everything]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">tag:blogger.com,1999:blog-7237050.post-114599339022354113</guid>
		<description><![CDATA[I&#8217;ve been toying around with flickr and downloading random images based on tags.   I just wrote a one-liner that grabs a random popular flickr tag, it looks like this:
GET http://flickr.com/photos/tags/ &#124; grep '/photos/tags/[a-z]' &#124; cut -f4 -d/ &#124; random -f - &#124; head -1
note:  the random command is something I&#8217;ve only found [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been toying around with flickr and downloading random images based on tags.   I just wrote a one-liner that grabs a random popular flickr tag, it looks like this:</p>
<pre>GET <a href="http://flickr.com/photos/tags/" rel="nofollow">http://flickr.com/photos/tags/</a> | grep '/photos/tags/[a-z]' | cut -f4 -d/ | random -f - | head -1</pre>
<p>note:  the random command is something I&#8217;ve only found in FreeBSD.  it could easily be replaced with a perl one-liner to shuffle.</p>
<p>this prints out a single, random, popular tag from flickr.  used in combination with my perl script that picks a random picture based on tag, I can get some randomly awesome pictures:</p>
<pre>slather -t `randomtag`</pre>
<p>perhaps soon I&#8217;ll post slather.
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7237050-114599339022354113?l=www.rexroof.com%2Fblog%2Findex.php'/></div>]]></content:encoded>
			<wfw:commentRss>http://www.rexroof.com/10/flickr-and-unix-is-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix Domain Sockets in Perl</title>
		<link>http://www.rexroof.com/11/unix-domain-sockets-in-perl/</link>
		<comments>http://www.rexroof.com/11/unix-domain-sockets-in-perl/#comments</comments>
		<pubDate>Mon, 19 Sep 2005 20:18:00 +0000</pubDate>
		<dc:creator>Rex</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Everything]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">tag:blogger.com,1999:blog-7237050.post-112716139109997279</guid>
		<description><![CDATA[I know this has been done dozens of times before, but it&#8217;s been a real headache for me lately.   A full example of how to use  IO::Socket::UNIX is not really available anywhere on the web.  All of the socket info for perl seems to assume you&#8217;ve been doing socket programming in [...]]]></description>
			<content:encoded><![CDATA[<p>I know this has been done dozens of times before, but it&#8217;s been a real headache for me lately.   A full example of how to use  IO::Socket::UNIX is not really available anywhere on the web.  All of the socket info for perl seems to assume you&#8217;ve been doing socket programming in C for years, and theres very limited info on doing Unix Domain Sockets.  it all seems to be about inet sockets.   which, of course, relates a lot to Unix Sockets, but there are some differences.</p>
<p>okay, here is my working example.   Its meant to be run twice, the first time it&#8217;s the server, the second time it&#8217;s the client.</p>
<p>
<pre><font color="#444444">#!/usr/bin/perl</font><strong>use</strong> strict; <font color="#2040a0">$|</font>++;<strong>use</strong> IO::Socket;

<strong>my</strong> <font color="#2040a0">$socketfile</font> = <font color="#2040a0">$ENV</font><font color="4444FF"><strong>{</strong></font>HOME<font color="4444FF"><strong>}</strong></font> . <font color="#008000">&quot;/.sockettest&quot;</font>;

<strong>if</strong> <font color="4444FF"><strong>(</strong></font> -S <font color="#2040a0">$socketfile</font> <font color="4444FF"><strong>)</strong></font> <font color="4444FF"><strong>{</strong></font> <font color="#444444"># client! </font><strong>my</strong> <font color="#2040a0">$client</font> = IO::Socket::UNIX-&gt;<strong>new</strong><font color="4444FF"><strong>(</strong></font>Peer  =&gt; <font color="#2040a0">$socketfile</font>,                                    Type      =&gt; SOCK_STREAM <font color="4444FF"><strong>)</strong></font> <strong>or</strong> <strong>die</strong> <font color="#2040a0">$!</font>; <strong>my</strong> <font color="#2040a0">$string</font> = <font color="#008000">&quot;this is some sent garbage.<font color="#77dd77">\n</font>&quot;</font>; <font color="a52a2a"><strong>print</strong></font> <font color="#2040a0">$client</font> <font color="#2040a0">$string</font>; <font color="#2040a0">$client</font>-&gt;flush; <font color="#2040a0">$client</font>-&gt;<font color="a52a2a"><strong>close</strong></font>; <strong>exit</strong>;

<font color="4444FF"><strong>}</strong></font> <strong>else</strong> <font color="4444FF"><strong>{</strong></font> <font color="#444444"># server! </font><font color="a52a2a"><strong>unlink</strong></font> <font color="#2040a0">$socketfile</font>; <strong>my</strong> <font color="#2040a0">$data</font>; <strong>my</strong> <font color="#2040a0">$server</font> = IO::Socket::UNIX-&gt;<strong>new</strong><font color="4444FF"><strong>(</strong></font>Local =&gt; <font color="#2040a0">$socketfile</font>,                                    Type      =&gt; SOCK_STREAM,                                    Listen    =&gt; 32 <font color="4444FF"><strong>)</strong></font> <strong>or</strong> <strong>die</strong> <font color="#2040a0">$!</font>; <font color="#2040a0">$server</font>-&gt;autoflush<font color="4444FF"><strong>(</strong></font>1<font color="4444FF"><strong>)</strong></font>; <strong>while</strong> <font color="4444FF"><strong>(</strong></font> <strong>my</strong> <font color="#2040a0">$connection</font> = <font color="#2040a0">$server</font>-&gt;<font color="a52a2a"><strong>accept</strong></font><font color="4444FF"><strong>(</strong></font><font color="4444FF"><strong>)</strong></font> <font color="4444FF"><strong>)</strong></font> <font color="4444FF"><strong>{</strong></font>   <strong>my</strong> <font color="#2040a0">$data</font>= &lt;<font color="#2040a0">$connection</font>&gt;;   <font color="a52a2a"><strong>print</strong></font> <font color="#2040a0">$data</font>, <font color="#2040a0">$</font>/;

   <font color="a52a2a"><strong>sleep</strong></font> 5; <font color="4444FF"><strong>}</strong></font><font color="4444FF"><strong>}</strong></font>
</pre>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7237050-112716139109997279?l=www.rexroof.com%2Fblog%2Findex.php'/></div>]]></content:encoded>
			<wfw:commentRss>http://www.rexroof.com/11/unix-domain-sockets-in-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
