<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ejes consulting</title>
	<atom:link href="http://ejesconsulting.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ejesconsulting.wordpress.com</link>
	<description>Techincal Consulting Design and Automation</description>
	<lastBuildDate>Thu, 17 Nov 2011 20:38:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ejesconsulting.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>ejes consulting</title>
		<link>http://ejesconsulting.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ejesconsulting.wordpress.com/osd.xml" title="ejes consulting" />
	<atom:link rel='hub' href='http://ejesconsulting.wordpress.com/?pushpress=hub'/>
		<item>
		<title>I call Phoney</title>
		<link>http://ejesconsulting.wordpress.com/2011/11/17/i-call-phoney/</link>
		<comments>http://ejesconsulting.wordpress.com/2011/11/17/i-call-phoney/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 17:30:47 +0000</pubDate>
		<dc:creator>ejes</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://ejesconsulting.wordpress.com/?p=369</guid>
		<description><![CDATA[So today I was stumbling around on the internet, and found this kids site: http://cyberfreax.in/2011/11/15/how-to-create-a-virus-2/ which features &#8220;how to create a virus&#8221;  Who could help themselves but read? It turns out that this kid is completely full of it.  He tells you to copy this: 01100110011011110111001001101101011000010111010000 100000011000110011101001011100 0010000000101111010100010010111101011000 into a text file and rename it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=369&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So today I was stumbling around on the internet, and found this kids site:</p>
<p><a href="http://cyberfreax.in/2011/11/15/how-to-create-a-virus-2/">http://cyberfreax.in/2011/11/15/how-to-create-a-virus-2/</a></p>
<p>which features &#8220;how to create a virus&#8221;  Who could help themselves but read?</p>
<p>It turns out that this kid is completely full of it.  He tells you to copy this:</p>
<p>01100110011011110111001001101101011000010111010000<br />
100000011000110011101001011100 0010000000101111010100010010111101011000</p>
<p>into a text file and rename it to something.exe and then run it.</p>
<p>Of course anyone with a bit of understanding on how the binary loader works would know that the loader wouldn&#8217;t recognize this as an executable program; ALL executable programs in windows start with either &#8220;MZ&#8221; or &#8220;PE&#8221;.  These are the &#8220;magic numbers&#8221; that tell the binary loader that these are, in fact, executable.</p>
<p>There is a lot going on behind the scenes here so let me explain WHY this won&#8217;t work.</p>
<p>Inside of a regular &#8220;exe&#8221; program is a structure to help the operating system determine how to load this program.  The structure looks like this (in C notation):</p>
<p>(info from: <a href="http://www.delorie.com/djgpp/doc/exe/">http://www.delorie.com/djgpp/doc/exe/</a>)</p>
<pre>struct EXE {
  unsigned short signature; /* == 0x5a4D */
  unsigned short bytes_in_last_block;
  unsigned short blocks_in_file;
  unsigned short num_relocs;
  unsigned short header_paragraphs;
  unsigned short min_extra_paragraphs;
  unsigned short max_extra_paragraphs;
  unsigned short ss;
  unsigned short sp;
  unsigned short checksum;
  unsigned short ip;
  unsigned short cs;
  unsigned short reloc_table_offset;
  unsigned short overlay_number;
};</pre>
<p>The first short integer &#8216;signature&#8217; is always 5a4d in MZ executables (by far less complex than PE executables) this is how the loader knows that this is a valid executable.</p>
<p>The first 16-bit integer is the number of bytes in the last block, unless it&#8217;s set to zero, which means the whole last block (152 bytes) is used.</p>
<p>The next 16-bit integer is total number of blocks in the executable file, and if the previous short integer is not zero, that number of the last block is used.</p>
<p>The next short is the number of relocation entries in the header, and the next is the number of &#8220;paragraphs&#8221; in the header.  Followed by the number of paragraphs of additional memory the program would need (that is, if there isn&#8217;t at least this many bytes free the loader will not try to load this program) most programmers know this as the BBS size. And finally, following that, is the maximum number of paragraphs of additional memory.</p>
<p>The next part is the relative value of the stack segment.  This value is added to the segment the program is loaded into, and used to initialize the SS (stack segment) register.</p>
<p>The next value is the initial value of the SP (stack pointer) register.  Then a word which is a checksum, which is usually not used.</p>
<p>The next is the initial value of the IP (instruction pointer) register, and then the CS (code segment) register (which is relative to the segment of the program loaded).  Then the offset of the first relocation item in the file, and finally ending with the overlay number.</p>
<p>If you examine the &#8220;binary&#8221; that Srivathsan provided, obviously none of this structure &#8220;fits.&#8221;</p>
<p>So what IS Srivathsan trying to pull?  Let&#8217;s take the binary, and bring it to a Binary-to-Ascii conversion site.  I used this one:</p>
<p><a href="http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.asp">http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.asp</a></p>
<p>I pasted the &#8220;binary&#8221;, and pressed &#8220;To Text&#8221; and it comes back with:</p>
<p>format c:\ /Q/X</p>
<p>Oh!!  So he just encoded a &#8220;format&#8221; command and expected it to run.</p>
<p><strong>This will NOT work.</strong></p>
<p>So, what will work then?</p>
<p>There&#8217;s an older format, called &#8220;.COM&#8221; format that does still run in windows (XP tested).  A Com file (<a href="http://en.wikipedia.org/wiki/COM_file">http://en.wikipedia.org/wiki/COM_file</a>) is far less complex, it contains no header information, no relocation and no far jumps.</p>
<p>So it looks to me like you CAN use a .COM file in this way.  So now, to find some executable information you can place in this .com file.</p>
<p>To do this, I did a quick Google for &#8220;printable shellcode&#8221; and came back with a whole slew of stuff.  I chose this (i got it here(<a href="http://r00tsecurity.org/forums/topic/12019-16-bit-printable-shellcode-hello-world/">http://r00tsecurity.org/forums/topic/12019-16-bit-printable-shellcode-hello-world/</a>):</p>
<p>X5))%@IP5YI5Y@5P!%PAP[55!5e 5O!54(P^)7CC)7SZBBXPSRABCABCABCABCABCABCABCABCABCZ[XH+H*hello world!$</p>
<p>As you might suspect from the final string, this is simply a &#8220;hello world&#8221; program; in printable ASCII!!</p>
<p>So, all you have to do is copy the above code, paste it into a text file, and rename the .txt extension to .com and &#8216;ta-da&#8217; instant executable binary.</p>
<p>Nice try <a href="http://cyberfreax.in/">http://cyberfreax.in</a> LOL</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ejesconsulting.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ejesconsulting.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ejesconsulting.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ejesconsulting.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ejesconsulting.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ejesconsulting.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ejesconsulting.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ejesconsulting.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ejesconsulting.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ejesconsulting.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ejesconsulting.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ejesconsulting.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ejesconsulting.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ejesconsulting.wordpress.com/369/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=369&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ejesconsulting.wordpress.com/2011/11/17/i-call-phoney/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1cfb215bc57daaa50ce28d78c9909226?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ejes</media:title>
		</media:content>
	</item>
		<item>
		<title>pSearch Source!!</title>
		<link>http://ejesconsulting.wordpress.com/2011/11/11/psearch-source/</link>
		<comments>http://ejesconsulting.wordpress.com/2011/11/11/psearch-source/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 18:54:00 +0000</pubDate>
		<dc:creator>ejes</dc:creator>
				<category><![CDATA[Neat Stuff/Good Ideas]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://ejesconsulting.wordpress.com/?p=363</guid>
		<description><![CDATA[So I had some trouble getting my source put onto wordpress.  I can understand their point, they don&#8217;t want to share .zip, .tar or any other archive container formats. In the intrest of brevity, I decided to just use a free file host.  I chose medifire, it was top on google when I checked. http://www.mediafire.com/?u01bf1nwbemata9 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=363&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I had some trouble getting my source put onto wordpress.  I can understand their point, they don&#8217;t want to share .zip, .tar or any other archive container formats.</p>
<p>In the intrest of brevity, I decided to just use a free file host.  I chose medifire, it was top on google when I checked.</p>
<p><a title="On to the historical source" href="http://www.mediafire.com/?u01bf1nwbemata9" target="_blank">http://www.mediafire.com/?u01bf1nwbemata9</a></p>
<p>There is where you can find the historical archives of my search development.  I did my best to ensure that it could be compiled on Windows (32-bit XP via, MinGW) or Linux (ubuntu 64-bit server), sometimes OpenBSD. You&#8217;ll likely need sqlite (<a title="SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. " href="http://www.sqlite.org/" target="_blank">http://www.sqlite.org/</a>) and libcurl (<a title="libcurl is a free and easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos), file transfer resume, http proxy tunneling and more!" href="http://curl.haxx.se/libcurl/" target="_blank">http://curl.haxx.se/</a>), you&#8217;ll probably need pcre libraries as well (<a title="The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5." href="http://www.pcre.org/" target="_blank">http://www.pcre.org/</a>).  If you try to compile something that looks like it should work, let me know and I&#8217;ll see if there&#8217;s any libraries that I might be missing, or at least I can let you know if it SHOULD compile.</p>
<p>All the above source is released under the original BSD Licence.</p>
<blockquote>
<pre>Copyright (c) 2010-, Evan Stawnyczy (ejes consulting) ejes@torfree.net
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
   must display the following acknowledgement:
   This product includes software developed by ejes consulting.
4. Neither the names ejes consulting, Evan Stawnyczy nor the
   names of its addional contributors may be used to endorse or promote
   products derived from this software without specific prior written
   permission.

THIS SOFTWARE IS PROVIDED BY EVAN STAWNYCZY AND EJES CONSULTING ''AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL &lt;COPYRIGHT HOLDER&gt; BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</pre>
</blockquote>
<p>As of right now, I&#8217;m working on a complete rewrite.</p>
<p>This rewrite I&#8217;m hoping will serve as good working reference code.  It will be clear, easy to understand and most likely SLOW.  I am now using ODBC instead of limiting users to sqlite.  This also will hopefully allow enterprises to adopt use without too much trouble.  I decided to scrap the web-server aspect &#8211; hopefully someone will want to bundle search and web-server for home use.  Especially with the wide adoption of ipv6 a single workstation could easily share information with others all indexed through a private search network.  At the very least someone should write an nginx (<a title="nginx [engine x] is an event driven HTTP and reverse proxy server, as well as a mail proxy server." href="http://nginx.org/" target="_blank">http://nginx.org/</a>), lighttpd (<a title="Security, speed, compliance, and flexibility -- all of these describe lighttpd (pron. lighty) which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments." href="http://www.lighttpd.net/" target="_blank">http://www.lighttpd.net/</a>) and apache (<a title="The Apache HTTP Server is an open-source HTTP server for modern operating systems including UNIX, Microsoft Windows, Mac OS/X and Netware. " href="http://projects.apache.org/projects/http_server.html" target="_blank">http://www.apache.org/</a>) module that indexes static and cached content and publishes the search results.</p>
<p>That leads me to trying to build this as an ip-agnostic application. I want it to run in both an ipv4 and ipv6 network. Of course this has it&#8217;s own challenges as well.  I&#8217;m trying to maintain ANSI compliance where I possibly can so that it can be easily portable, and mostly so that it can run on windows or unix without too much trouble.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ejesconsulting.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ejesconsulting.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ejesconsulting.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ejesconsulting.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ejesconsulting.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ejesconsulting.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ejesconsulting.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ejesconsulting.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ejesconsulting.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ejesconsulting.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ejesconsulting.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ejesconsulting.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ejesconsulting.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ejesconsulting.wordpress.com/363/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=363&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ejesconsulting.wordpress.com/2011/11/11/psearch-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1cfb215bc57daaa50ce28d78c9909226?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ejes</media:title>
		</media:content>
	</item>
		<item>
		<title>pSearch &#8211; a peer to peer, distributed search engine</title>
		<link>http://ejesconsulting.wordpress.com/2011/11/07/psearch-a-peer-to-peer-distributed-search-engine/</link>
		<comments>http://ejesconsulting.wordpress.com/2011/11/07/psearch-a-peer-to-peer-distributed-search-engine/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 15:43:01 +0000</pubDate>
		<dc:creator>ejes</dc:creator>
				<category><![CDATA[Neat Stuff/Good Ideas]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://ejesconsulting.wordpress.com/?p=356</guid>
		<description><![CDATA[my distributed peer to peer search algorithm.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=356&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Forward</h1>
<p>So I haven&#8217;t been posting very much for the last while, and this is mainly because I&#8217;ve been very busy.</p>
<p>I always have several projects on the go, and I don&#8217;t have enough time to devote to all of these things at once, so usually the least interesting project gets placed on the back burner.</p>
<p>That is what happened to this blog.</p>
<p>Now I&#8217;ve spent a great deal of time on this, and have produced some very good design documents as well as a bunch of source code.  So&#8230; Without further ado</p>
<p>This is my distributed, peer-to-peer search engine.</p>
<p>Attached to this post you&#8217;ll find a couple of architecture documents, a pdf with a visual diagram of how this engine is suppose to work, and another pdf with a long winded, half written description of why and how I expect this conceptually to run.</p>
<p>I&#8217;m not a writer, and am mostly a technical person, however, I am actively updating and modifying this project so expect updates as it goes.</p>
<p>The first document is the &#8220;<a href="http://ejesconsulting.files.wordpress.com/2011/11/psearch-document.pdf">pSearch &#8211; Document</a>&#8220;</p>
<p>In this document I attempt to explain the strategy, and reasons for this project and what  I hope that it will accomplish.   This document is incomplete, but I encourage you to read it anyway.</p>
<p>The second document is the &#8220;<a href="http://ejesconsulting.files.wordpress.com/2011/11/psearch-drawing.pdf">pSearch &#8211; Drawing</a>&#8220;</p>
<p>In this document I have detailed the major aspects of the distributed search.  Hopefully it&#8217;s easy to follow, I don&#8217;t expect this diagram to change very much.</p>
<p>And I have a LOT of source code that I still have to organize &#8211; much of it will be posted here and some of it is too embarrassing.</p>
<h1>Summary</h1>
<p>So, without drudging into my documentation in too much detail (I posted them above, feel free) a simplified &#8220;how does this work&#8221; seems appropriate.</p>
<p>Each peer will accept connections  from the internet.  Each search request is forwarded to other peers as defined in it&#8217;s database.</p>
<p>While this happens, it also uses a second task to search it&#8217;s own internal database.  On a private home machine this internal crawler has a small collection of sites and keywords based on several configurable data collection points (such as your browser cache, or installed programs) which would automatically include a lot of data that would be specific to you.   A public internet site would index their own pages (this isn&#8217;t mandatory, but preferred).</p>
<p>After that, it&#8217;s a simple case of matching the keyword and publishing the results to the connected client.</p>
<p>Peers who respond quickly, and with a lot of results are flagged as &#8220;experts&#8221; when it comes to this set of terms.  This way, when you search for a similar set of terms again, the &#8220;expert&#8221; peers will be consulted first.</p>
<p>This way, common search terms will be responded to by clients who have a lot of information on these terms.  For example a site that indexes movies (like imdb) would respond with a lot of results for movie titles and information about films, but probably have very little to respond when a query has some specific request about cars.</p>
<p>Expect more as I develop more.  I encourage anyone to read and comment about my designs.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ejesconsulting.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ejesconsulting.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ejesconsulting.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ejesconsulting.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ejesconsulting.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ejesconsulting.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ejesconsulting.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ejesconsulting.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ejesconsulting.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ejesconsulting.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ejesconsulting.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ejesconsulting.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ejesconsulting.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ejesconsulting.wordpress.com/356/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=356&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ejesconsulting.wordpress.com/2011/11/07/psearch-a-peer-to-peer-distributed-search-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1cfb215bc57daaa50ce28d78c9909226?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ejes</media:title>
		</media:content>
	</item>
		<item>
		<title>New Sort? (kind of)</title>
		<link>http://ejesconsulting.wordpress.com/2011/09/26/new-sort-kind-of/</link>
		<comments>http://ejesconsulting.wordpress.com/2011/09/26/new-sort-kind-of/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 17:14:45 +0000</pubDate>
		<dc:creator>ejes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ejesconsulting.wordpress.com/?p=350</guid>
		<description><![CDATA[One doesn&#8217;t find a new sorting algorithm floating around the internet very often, but here&#8217;s one that I found that&#8217;s actually kind of neat. It&#8217;s not really very practical, but it&#8217;s still very fun. It&#8217;s quite simple. For each element of the array, you fork a new process which sleeps it&#8217;s value in seconds then [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=350&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One doesn&#8217;t find a new sorting algorithm floating around the internet very often, but here&#8217;s one that I found that&#8217;s actually kind of neat.</p>
<p>It&#8217;s not really very practical, but it&#8217;s still very fun. It&#8217;s quite simple. For each element of the array, you fork a new process which sleeps it&#8217;s value in seconds then displays that number. Repeat for the entire array.</p>
<pre>#!/bin/bash
function f() {
    sleep "$1"
    echo "$1"
}
while [ -n "$1" ]
do
    f "$1" &amp;
    shift
done
wait</pre>
<p><a href="http://beust.com/weblog/2011/06/15/sleep-sort/">found here!</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ejesconsulting.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ejesconsulting.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ejesconsulting.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ejesconsulting.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ejesconsulting.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ejesconsulting.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ejesconsulting.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ejesconsulting.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ejesconsulting.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ejesconsulting.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ejesconsulting.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ejesconsulting.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ejesconsulting.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ejesconsulting.wordpress.com/350/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=350&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ejesconsulting.wordpress.com/2011/09/26/new-sort-kind-of/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1cfb215bc57daaa50ce28d78c9909226?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ejes</media:title>
		</media:content>
	</item>
		<item>
		<title>More Command Line Magic</title>
		<link>http://ejesconsulting.wordpress.com/2011/02/25/more-command-line-magic/</link>
		<comments>http://ejesconsulting.wordpress.com/2011/02/25/more-command-line-magic/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 03:11:15 +0000</pubDate>
		<dc:creator>ejes</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://ejesconsulting.wordpress.com/?p=341</guid>
		<description><![CDATA[Wow, I was looking around for a way to quickly convert my ls -al listing into octal &#8217;0774&#8242; permission display. I found a really neat awk script that does just this here: http://www.linuxforums.org/forum/newbie/21722-command-shows-me-permissions-file-octal.html#post371256 it&#8217;s this: ls -l &#124; awk &#8216;{k=0;for(i=0;i&#60;=8;i++)k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(&#8220;%0o &#8220;,k);print}&#8217; to make it permanent, add this to your .profile: alias l=&#8221;ls -la &#8211;color &#124; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=341&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Wow, I was looking around for a way to quickly convert my ls -al listing into octal &#8217;0774&#8242; permission display.  I found a really neat awk script that does just this here:<br />
<a title="Command To Show Permissions" href="http://www.linuxforums.org/forum/newbie/21722-command-shows-me-permissions-file-octal.html#post371256">http://www.linuxforums.org/forum/newbie/21722-command-shows-me-permissions-file-octal.html#post371256</a></p>
<p>it&#8217;s this:<br />
ls -l | awk &#8216;{k=0;for(i=0;i&lt;=8;i++)k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(&#8220;%0o &#8220;,k);print}&#8217;</p>
<p>to make it permanent, add this to your .profile:<br />
alias l=&#8221;ls -la &#8211;color | awk &#8216;{k=0;for(i=0;i&lt;=8;i++)k+=((substr(\$1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(\&#8221; %0o \&#8221;,k);print}&#8217;&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ejesconsulting.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ejesconsulting.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ejesconsulting.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ejesconsulting.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ejesconsulting.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ejesconsulting.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ejesconsulting.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ejesconsulting.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ejesconsulting.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ejesconsulting.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ejesconsulting.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ejesconsulting.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ejesconsulting.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ejesconsulting.wordpress.com/341/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=341&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ejesconsulting.wordpress.com/2011/02/25/more-command-line-magic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1cfb215bc57daaa50ce28d78c9909226?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ejes</media:title>
		</media:content>
	</item>
		<item>
		<title>Super Small printf for embedded applications</title>
		<link>http://ejesconsulting.wordpress.com/2011/02/25/super-small-printf-for-embedded-applications/</link>
		<comments>http://ejesconsulting.wordpress.com/2011/02/25/super-small-printf-for-embedded-applications/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 16:09:54 +0000</pubDate>
		<dc:creator>ejes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://ejesconsulting.wordpress.com/?p=337</guid>
		<description><![CDATA[So I like to write embedded applications &#8211; the challenge provided by a low power low memory system is always an enjoyable one. Nevertheless, occasionally one needs to recreate standard functionality and with these constraints in mind it can be quite a task. Anyway, I was stumbling around and found this tiny printf utility that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=337&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I like to write embedded applications &#8211; the challenge provided by a low power low memory system is always an enjoyable one.  Nevertheless, occasionally one needs to recreate standard functionality and with these constraints in mind it can be quite a task.  Anyway, I was stumbling around and found this tiny printf utility that is both elegant and tiny:</p>
<p><a title="Tiny printf for embedded applications" href="http://www.xappsoftware.com/wordpress/2011/01/17/a-tiny-printf-for-embedded-systems/">http://www.xappsoftware.com/wordpress/2011/01/17/a-tiny-printf-for-embedded-systems/ </a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ejesconsulting.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ejesconsulting.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ejesconsulting.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ejesconsulting.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ejesconsulting.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ejesconsulting.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ejesconsulting.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ejesconsulting.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ejesconsulting.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ejesconsulting.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ejesconsulting.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ejesconsulting.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ejesconsulting.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ejesconsulting.wordpress.com/337/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=337&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ejesconsulting.wordpress.com/2011/02/25/super-small-printf-for-embedded-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1cfb215bc57daaa50ce28d78c9909226?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ejes</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript Obfuscation to the MAX!!!</title>
		<link>http://ejesconsulting.wordpress.com/2011/02/01/javascript-obfuscation-to-the-max/</link>
		<comments>http://ejesconsulting.wordpress.com/2011/02/01/javascript-obfuscation-to-the-max/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 18:47:37 +0000</pubDate>
		<dc:creator>ejes</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Neat Stuff/Good Ideas]]></category>

		<guid isPermaLink="false">http://ejesconsulting.wordpress.com/?p=335</guid>
		<description><![CDATA[I was stumbling around the internet today and found this: ($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+ ($$=($_=!''+$)[_/_]+$_[+$])])()[__[_/_]+__ [_+~$]+$_[_]+$$](_/_) Yep, perfectly legal Javascript, Care to hazzard a guess as it&#8217;s function? http://adamcecc.blogspot.com/2011/01/javascript.html ^ go here to find out more&#8230; It&#8217;s fantastic :)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=335&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was stumbling around the internet today and found this:</p>
<pre>($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+
($$=($_=!''+$)[_/_]+$_[+$])])()[__[_/_]+__
[_+~$]+$_[_]+$$](_/_)</pre>
<p>Yep, perfectly legal Javascript, Care to hazzard a guess as it&#8217;s function?</p>
<p><a href="http://adamcecc.blogspot.com/2011/01/javascript.html">http://adamcecc.blogspot.com/2011/01/javascript.html</a></p>
<p>^ go here to find out more&#8230; It&#8217;s fantastic :)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ejesconsulting.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ejesconsulting.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ejesconsulting.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ejesconsulting.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ejesconsulting.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ejesconsulting.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ejesconsulting.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ejesconsulting.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ejesconsulting.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ejesconsulting.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ejesconsulting.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ejesconsulting.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ejesconsulting.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ejesconsulting.wordpress.com/335/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=335&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ejesconsulting.wordpress.com/2011/02/01/javascript-obfuscation-to-the-max/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1cfb215bc57daaa50ce28d78c9909226?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ejes</media:title>
		</media:content>
	</item>
		<item>
		<title>Happy New Year</title>
		<link>http://ejesconsulting.wordpress.com/2011/01/01/happy-new-year/</link>
		<comments>http://ejesconsulting.wordpress.com/2011/01/01/happy-new-year/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 02:48:29 +0000</pubDate>
		<dc:creator>ejes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ejesconsulting.wordpress.com/?p=331</guid>
		<description><![CDATA[Happy New Year to all&#8230;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=331&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Happy New Year to all&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ejesconsulting.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ejesconsulting.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ejesconsulting.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ejesconsulting.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ejesconsulting.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ejesconsulting.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ejesconsulting.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ejesconsulting.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ejesconsulting.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ejesconsulting.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ejesconsulting.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ejesconsulting.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ejesconsulting.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ejesconsulting.wordpress.com/331/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=331&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ejesconsulting.wordpress.com/2011/01/01/happy-new-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1cfb215bc57daaa50ce28d78c9909226?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ejes</media:title>
		</media:content>
	</item>
		<item>
		<title>ubuntu Headless Video Recoding with Handbreak CLI</title>
		<link>http://ejesconsulting.wordpress.com/2010/10/05/ubuntu-headless-video-recoding-with-handbreak-cli/</link>
		<comments>http://ejesconsulting.wordpress.com/2010/10/05/ubuntu-headless-video-recoding-with-handbreak-cli/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 14:08:58 +0000</pubDate>
		<dc:creator>ejes</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[divx]]></category>
		<category><![CDATA[handbrake]]></category>
		<category><![CDATA[mp4]]></category>
		<category><![CDATA[PPA]]></category>
		<category><![CDATA[recode]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://ejesconsulting.wordpress.com/?p=323</guid>
		<description><![CDATA[I have a lot of movies.  A lot. They are all in a digital format of some sort or another on my NAS server. I like uniformity, that is, I like all my media in one format.  I have an iPhone (which I also love) so, I&#8217;ve been leaning (sadly) toward mp4 for my library. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=323&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have a lot of movies.  <span style="text-decoration:underline;">A lot</span>. They are all in a digital format of some sort or another on my NAS server.</p>
<p>I like uniformity, that is, I like all my media in one format.  I have an iPhone (which I also love) so, I&#8217;ve been leaning (sadly) toward mp4 for my library.  Also, sadly, my library has already been coded mostly in XviD (the open source DivX.)  So I need to convert my old &#8220;.avi&#8221; movies to &#8220;.mp4&#8243;.   This is called &#8220;<em>re-coding</em>.&#8221;</p>
<p>When I was initially thinking of doing headless recoding I was going to use <em>ffmepg</em>.  <em>ffmpeg</em> is amazing for doing things like this &#8211; and what it&#8217;s specifically designed for.  I however have been using &#8220;<em>HandBrake</em> (http://handbrake.fr/)&#8221; on my Mac and I really like the simplicity and it does a very good job.</p>
<p>Why mess with a good thing?</p>
<p>I found out that HandBrake has a command line client (http://handbrake.fr/downloads2.php) which is available in all operating systems except, Linux.  Ubuntu specifically.</p>
<p>Looking around I found that there are nightly &#8220;unsupported&#8221; development builds for Ubuntu, and since Handbrake is public software and any support you receive for it would be pure fluke; this unsupported version looked better and better.</p>
<p>More importantly there is an option to learn how to use this PPA (personal package archive) system that Ubuntu (https://launchpad.net/ubuntu/+ppas) has been tooting it&#8217;s horn over.</p>
<p>The &#8220;PPA&#8221; archive (available here: https://edge.launchpad.net/~stebbins/+archive/handbrake-snapshots) for Handbrake supports Maverick, Lucid, and Karmic &#8211; and since I can&#8217;t remember what my system is; I run a little <strong>lsb_release</strong>.</p>
<p><tt>root@ubuntu:~# lsb_release -a<br />
No LSB modules are available.<br />
Distributor ID: Ubuntu<br />
Description:    Ubuntu 10.04.1 LTS<br />
Release:        10.04<br />
Codename:       lucid<br />
root@ubuntu:~#</tt></p>
<p>Look at that, I run Lucid (Ubuntu 10.04).  It&#8217;s &#8220;supported.&#8221;</p>
<p>To add a PPA it&#8217;s actually very easy, you have to use a command called &#8220;<strong>add-apt-repository</strong>.&#8221;  I didn&#8217;t have it at first:</p>
<p><tt>root@ubuntu:~# add-apt-repository<br />
add-apt-repository: command not found<br />
root@ubuntu:~#</tt></p>
<p>But that&#8217;s easily fixed by installing &#8220;python-software-properties&#8221;</p>
<p><tt>root@ubuntu:~# apt-get install python-software-properties<br />
Reading package lists... Done<br />
Building dependency tree<br />
Reading state information... Done<br />
The following NEW packages will be installed:<br />
python-software-properties<br />
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.<br />
Need to get 0B/30.8kB of archives.<br />
After this operation, 1,126kB of additional disk space will be used.<br />
Selecting previously deselected package python-software-properties.<br />
(Reading database ... 54647 files and directories currently installed.)<br />
Unpacking python-software-properties (from .../python-software-properties_0.75.10.1_all.deb) ...<br />
Processing triggers for man-db ...<br />
Setting up python-software-properties (0.75.10.1) ...<br />
Processing triggers for python-central ...<br />
root@ubuntu:~#</tt></p>
<p>Then you can run, <strong>apt-add-repository</strong> with the correct repository information (found here: https://edge.launchpad.net/~stebbins/+archive/handbrake-snapshots):</p>
<p><tt>root@ubuntu:~# apt-add-repository ppa:stebbins/handbrake-snapshots<br />
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv 43D3A9F60C58A7169778E6FB8771ADB0816950D8<br />
gpg: requesting key 816950D8 from hkp server keyserver.ubuntu.com<br />
gpg: key 816950D8: "Launchpad HandBrake Snapshots" not changed<br />
gpg: Total number processed: 1<br />
gpg:              unchanged: 1<br />
root@ubuntu:~#</tt></p>
<p><em>(since I already ran it my output above will not match yours)</em></p>
<p>Once that&#8217;s installed, you can quickly use - <strong>apt-get install handbrake-cli</strong>, to install it:</p>
<p><tt>root@ubuntu:~# apt-get install handbrake-cli<br />
Reading package lists... Done<br />
Building dependency tree<br />
Reading state information... Done<br />
The following NEW packages will be installed:<br />
handbrake-cli<br />
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.<br />
Need to get 6,119kB of archives.<br />
After this operation, 13.9MB of additional disk space will be used.<br />
Get:1 http://ppa.launchpad.net/stebbins/handbrake-snapshots/ubuntu/ lucid/main handbrake-cli<br />
svn3570ppa1~lucid1 [6,119kB]<br />
Fetched 1,446kB in 7s (199kB/s)<br />
Selecting previously deselected package handbrake-cli.<br />
(Reading database ... 54665 files and directories currently installed.)<br />
Unpacking handbrake-cli (from .../handbrake-cli_svn3570ppa1~lucid1_i386.deb) ...<br />
Setting up handbrake-cli (svn3570ppa1~lucid1) ...<br />
root@ubuntu:~#</tt></p>
<p>Then you can simply use it:</p>
<p><tt>root@ubuntu:~# HandBrakeCLI<br />
Missing input device. Run HandBrakeCLI --help for syntax.<br />
root@ubuntu:~#</tt></p>
<p>Handbrake has a very good tutorial on how to use its command line client, and even has all the normal built in presets: http://trac.handbrake.fr/wiki/CLIGuide</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ejesconsulting.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ejesconsulting.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ejesconsulting.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ejesconsulting.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ejesconsulting.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ejesconsulting.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ejesconsulting.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ejesconsulting.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ejesconsulting.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ejesconsulting.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ejesconsulting.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ejesconsulting.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ejesconsulting.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ejesconsulting.wordpress.com/323/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=323&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ejesconsulting.wordpress.com/2010/10/05/ubuntu-headless-video-recoding-with-handbreak-cli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1cfb215bc57daaa50ce28d78c9909226?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ejes</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple Timesharing for ALL ANSI-C programs</title>
		<link>http://ejesconsulting.wordpress.com/2010/08/05/simple-timesharing-for-all-ansi-c-programs/</link>
		<comments>http://ejesconsulting.wordpress.com/2010/08/05/simple-timesharing-for-all-ansi-c-programs/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 13:47:05 +0000</pubDate>
		<dc:creator>ejes</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://ejesconsulting.wordpress.com/?p=313</guid>
		<description><![CDATA[A client of mine asked that I write a simple co-operative timesharing engine to be used in an embedded project.  Timesharing is quite an easy multitasking system and is frequently used in the embedded space because each process must willingly give up cpu control.  This is good if you have a critical task that must [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=313&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A client of mine asked that I write a simple co-operative timesharing engine to be used in an embedded project.  Timesharing is quite an easy multitasking system and is frequently used in the embedded space because each process must willingly give up cpu control.  This is good if you have a critical task that must not be interrupted before it completes.  Modern, more powerful cpus have the ability to turn off interrupts during execution (the instructions are sti and cli in the x86 world)  but not all processors support this.</p>
<p>Because I cannot be guaranteed that the microcontroller that i&#8217;m using has this, i opted to use a software interrupt that i call &#8220;swi&#8221;.  Realistically, you can turn this into a preemptive multitasking system by assigning the programmable interrupt to my &#8220;swi&#8221; function and have it execute at a pre-determined time.</p>
<p>anyway, i also wanted this to be somewhat compliant with normal POSIX programming, so I created a &#8220;fork&#8221; function.</p>
<p>It uses &#8220;setjmp&#8221; and &#8220;longjmp&#8221; to create save points in the &#8220;swi&#8221; and then call the next call on the process stack.  I was going to include a simple prioritizing system, but really it didn&#8217;t require it &#8211; i might still.</p>
<p>Anyway, the source is posted in my source code area. </p>
<p>(terms of use) This software is given to you without warrantee and warning that it worked for me, doesn&#8217;t mean it&#8217;ll work for you.  Feel free to use and modify it, and send me patches, I will gladly post them and of course give you full credit, as I expect you&#8217;d give me credit as well.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ejesconsulting.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ejesconsulting.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ejesconsulting.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ejesconsulting.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ejesconsulting.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ejesconsulting.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ejesconsulting.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ejesconsulting.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ejesconsulting.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ejesconsulting.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ejesconsulting.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ejesconsulting.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ejesconsulting.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ejesconsulting.wordpress.com/313/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ejesconsulting.wordpress.com&amp;blog=7864564&amp;post=313&amp;subd=ejesconsulting&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ejesconsulting.wordpress.com/2010/08/05/simple-timesharing-for-all-ansi-c-programs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1cfb215bc57daaa50ce28d78c9909226?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ejes</media:title>
		</media:content>
	</item>
	</channel>
</rss>
