<?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>Web Design &#38; Marketing - Medina, Cleveland, Akron Ohio &#124; ETHODE &#187; Languages</title>
	<atom:link href="http://www.ethode.com/category/blog/development/languages/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ethode.com</link>
	<description>You&#039;re source for Development and Design in North East Ohio</description>
	<lastBuildDate>Mon, 23 Jan 2012 18:52:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>egrep and xargs saved my life &#8211; Replacing Line Endings</title>
		<link>http://www.ethode.com/655/egrep-and-xargs-saved-my-life-replacing-line-endings</link>
		<comments>http://www.ethode.com/655/egrep-and-xargs-saved-my-life-replacing-line-endings#comments</comments>
		<pubDate>Tue, 15 Mar 2011 14:23:01 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[dos line endings]]></category>
		<category><![CDATA[dos2unix]]></category>
		<category><![CDATA[fromdos]]></category>
		<category><![CDATA[line endings]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[todos]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[\n]]></category>
		<category><![CDATA[\r\n]]></category>
		<category><![CDATA[^M]]></category>

		<guid isPermaLink="false">http://www.ethode.com/?p=655</guid>
		<description><![CDATA[Here is a great solution for all of you looking to remove dos line endings recursively against a very large number of files containing dos style line endings]]></description>
			<content:encoded><![CDATA[<p>From time to time I run into situations where I have a file which contains window line endings.  Window line endings CRLF look like this to us linux peeps, \r\n &#8211; and can really be  a pain in a PHP script if it gets in there and interrupts the output of the file.  Typically this isn&#8217;t an issue if you transfer files and sites through a nice FTP client like Filezilla because these clients have a utility that will convert non-binary files based on the operating system on the destination.  You may have seen in files &#8220;^M&#8221; which is common when opening files in vi (I use vim) and the file is formatted in dos line endings.</p>
<p>So if you&#8217;re uploading or download to a Unix machine from a Windows (DOS based) machine the FTP client should auto-detect everything nicely and convert.  But for those developers out there whom wind up transferring massive projects, lets face it, you can&#8217;t simply download 100,000 files when you want to.  So, like many of us, we will zip up (or tar) an entire site and download it as 1 file, then upload to server and uncompress.</p>
<p>However, because we&#8217;re simply transferring a compressed file, the FTP client will never convert all of those awesome files formatted with DOS style line endings.  So I bet your next question is &#8220;so how can I fix all of these files without editing each by hand?&#8221;&#8230;</p>
<p>No fear this isn&#8217;t that hard  :-)</p>
<p><strong>The Solution</strong></p>
<p>The solution is fairly simple, use dos2unix, or fromdos depending on which flavor of linux you&#8217;re running.  But if you&#8217;re wanting to convert more than 5 files, this starts to be time consuming again.</p>
<p>So, if you would like to recursively find all files which have offending line endings, and pass those along to be converted we need to grep for those files, and then pipe the results to xargs so that for each file found we can mimic a call to dos2unix for us.</p>
<p><span style="color: #ff0000;"><strong>egrep -Ilr $&#8217;\r\n&#8217; * | xargs -p dos2unix</strong></span></p>
<p><strong>Explain it please&#8230;</strong></p>
<p>For the lovers of all things linux, you&#8217;re probably familiar with egrep and grep, they are outstanding search tools.  I have added to my egrep a couple arguments.  The lowercase L (-l) tells grep to print each file out with it&#8217;s path.  The capital &#8220;I&#8221; (-I) tells egrep to IGNORE all binary files&#8230; Because after all if you have 20,000 images out of the 30,000 files why waste your day having egrep search against those files.  Lastly we have the lowercase &#8220;r&#8221; (-r)&#8221; which tells egrep to search RECURSIVELY through all sub directories.</p>
<p>The output of this search is then passed (PIPED) to xargs.  If you&#8217;re not familiar with xargs, essentially it will take each line of output from this (each file name and path) and pass that to another command for you.  So if egrep finds 10 files that matches the search, xargs will combine those file names into a command for you.</p>
<p>xargs -p dos2unix then is essentially just replacing man for machine <img src='http://www.ethode.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The -p tells xargs to prompt you before executing each command, which I high suggest if you&#8217;ve never done this before.. Don&#8217;t get your self into a mess.. and <strong>ALWAYS BACKUPS FILES FIRST</strong>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ethode.com/655/egrep-and-xargs-saved-my-life-replacing-line-endings/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>7 Awesome New Features in dotCMS 1.9</title>
		<link>http://www.ethode.com/102/7-new-features-in-dotcms-1-9</link>
		<comments>http://www.ethode.com/102/7-new-features-in-dotcms-1-9#comments</comments>
		<pubDate>Wed, 23 Jun 2010 11:04:17 +0000</pubDate>
		<dc:creator>Joshua</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[CMS Products]]></category>
		<category><![CDATA[dotCMS 1.9]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[dotCMS]]></category>
		<category><![CDATA[Form Builder]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[Internationalization]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Multi Language]]></category>
		<category><![CDATA[multi-site]]></category>
		<category><![CDATA[Multi-Site CMS]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.ethode.com/?p=102</guid>
		<description><![CDATA[DotCMS 1.9 will be a monumental update to the current 1.7 version of the CMS project.  While 1.7 was and still is an outstanding platform, one can easily see why 1.9 will light the CMS world on fire.

I have compile a list of my top 10 favorite dotCMS features in 1.9, enjoy, and feel free to share you're in the comments.]]></description>
			<content:encoded><![CDATA[<p>DotCMS 1.9 will be a monumental update to the current 1.7 version of the CMS project.  While 1.7 was and still is an outstanding platform, one can easily see why 1.9 will light the CMS world on fire.</p>
<p>I have compile a list of my top 10 favorite dotCMS features in 1.9, enjoy, and feel free to share you&#8217;re in the comments.</p>
<p>1) <strong>Brand New UI</strong> &#8211;  This might not seem like a new &#8220;feature&#8221; but trust me it is.  The old UI, was a bit clunky and unfamiliar, however, the new interface is very intuitive and easy to use.  Also, the inline editor makes best use of the power presented with dotCMS, I couldn&#8217;t be happier with the new UI, and I definitely think the designers should get some props!  The new layout uses <a title="DOJO Ajax Toolkit" href="http://www.dojotoolkit.com" target="_blank">Dojo AJAX Toolkit</a> for almost everything.</p>
<p>2)  <strong>Multi-Site/Tenant Management</strong> &#8211; This feature speaks for it&#8217;s self, but until you really see the interface and see the power it&#8217;s hard to see the benefit.  I have attached a small screencast below to show you the power in the multi-site management system.</p>
<p>
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/dy2jQAiMzHk&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/dy2jQAiMzHk&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
</p>
<blockquote><p>In the words of dotCMS them selves:<br />
With dotCMS 1.9 multi-tenant capabilities, whole sites can be quickly created, shared and even be copied from existing web properties to help speed your &#8220;time to live&#8221;.  With our new host manager, administrators can provision hosts globally, changing permissions, themes, analytic code, able to make host-wide changes from a single friendly interface.</p></blockquote>
<p>3) <strong>WebServices and JSON API &#8211; </strong>This feature is huge for all of your developers out there who need to built onto dotCMS and make a more robust and custom solution.  This will allow you to access data from the site, manipulate your data and create your own tooling.  Need to create your own iPhone or Android app to interface with a site built on dotCMS 1.9?  If so, this feature is perfect for getting and passing data back and forth.</p>
<p>4) <strong>Internationalization &#8211; </strong>dotCMS 1.9 is now fully nationalized.  The product takes use of best practices and even allows localization of the administration panel.  dotCMS 1.9 will ship with English, Spanish, Romanian and German translations, but more will be coming soon and you can also create your own if need be.</p>
<p>5) <strong>Integrated Form Builder &#8211; </strong>This is another huge feature that frankly I&#8217;m surprised to see in this release.  With the amount of new features slated to be released in the new 1.9 version, it&#8217;s hard to believe that they found the time to integrate a new form builder product.  The Form Builder, does precisely what it sounds like; allows you to create your own forms using a GUI interface in the admin panel and then stores and reports the data back to you, the user.  This is very useful for large data collection projects, or anyone who ever uses forms.. Ever.. For any reason!  I&#8217;ve used Form Builders with previous CMS&#8217; like <a title="Joomla CMS" href="http://www.joomla.org" target="_blank">Joomla</a> but this implementation blows them all away.</p>
<p>6)  <strong>SUDO Logon Power &#8211; </strong> If you&#8217;re hosting multiple websites on this system, and for multiple owners/users this feature is a must.  I&#8217;m excited to get this feature in place, but basically this will allow you, the admin, to login as if you&#8217;re the other user.  You&#8217;ll see what they see, get restricted to what ever they&#8217;re restricted to, and you&#8217;ll really get a good feel for what your client is seeing.  Before, working in such environments you were forced to memorize or collect passwords while you were testing and tinkering around, but fumble with passwords no more, this feature will grow on you.</p>
<p>7) <strong>PHP &#8211; Ruby &#8211; Python &#8211; Groovy Plugin &#8211; </strong>Given the wide range of developers who use dotCMS I&#8217;m inclined to believe that this new plugin will be very popular.  This plugin will allow a developer to create code in <a title="PHP Language Home Page" href="http://www.php.net" target="_blank">PHP</a>, <a title="Ruby Programming Language" href="http://ruby-lang.org" target="_blank">Ruby</a>, <a title="Python Programming Language" href="http://www.python.org" target="_blank">Python</a>, or <a title="Groovy Programming Language" href="http://groovy.codehaus.org" target="_blank">Groovy</a> and integrate it into content.  This works similar to integrating JavaScript into HTML.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ethode.com/102/7-new-features-in-dotcms-1-9/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

