<?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>Latest In Tech &#187; Scripting</title>
	<atom:link href="http://www.latestintech.com/category/software/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.latestintech.com</link>
	<description>get lit</description>
	<lastBuildDate>Mon, 28 Nov 2011 18:01:16 +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>Sorting Full Screen Apps in OS X&#8217;s Mission Control</title>
		<link>http://www.latestintech.com/sorting-full-screen-apps-in-os-xs-mission-control/</link>
		<comments>http://www.latestintech.com/sorting-full-screen-apps-in-os-xs-mission-control/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 03:06:41 +0000</pubDate>
		<dc:creator>sarvinc</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.latestintech.com/?p=420</guid>
		<description><![CDATA[Trying to sort full-screen apps in Lion? Here&#8217;s how System Preferences Mission Control Check &#8220;Automatically rearrange spaces based on most recent use This allows you to organize your full-screen apps by alt-tabbing through them (yeah not the greatest). Bonus: I&#8217;m still trying to get used to the three-finger swipes and accidentally alt-tab once in a [...]]]></description>
			<content:encoded><![CDATA[<p>Trying to sort full-screen apps in Lion? Here&#8217;s how</p>
<ul>
<li>System Preferences</li>
<li>Mission Control</li>
<li>Check &#8220;Automatically rearrange spaces based on most recent use</li>
</ul>
<p>This allows you to organize your full-screen apps by alt-tabbing through them (yeah not the greatest).</p>
<p>Bonus:<br />
I&#8217;m still trying to get used to the three-finger swipes and accidentally alt-tab once in a while. Alt-tabbing once I have my apps organized ruins everything. I&#8217;ve whipped up a automator app that simply toggles the preference for you. Toggle it to turn the preference on, sort your apps and toggle it again to turn the preference off.</p>
<p><a href='http://www.latestintech.com/wp-content/uploads/2011/08/Tab-Settings.app_.zip'>Tab Settings.app</a></p>
<p>I&#8217;d love to see what people do with it. Here&#8217;s the raw apple-script:<br />
<code>tell application "System Preferences"<br />
	activate<br />
	set the current pane to pane id "com.apple.preference.expose"<br />
end tell</p>
<p>tell application "System Events"<br />
	tell application process "System Preferences"<br />
		--get the name of every checkbox of group 2 of window "Mission Control"<br />
		click checkbox "Automatically rearrange spaces based on most recent use" of group 2 of window "Mission Control"<br />
	end tell<br />
end tell</p>
<p>tell application "System Preferences" to close every window</code></p>
<p>Here&#8217;s an updated Automator Service that doesn&#8217;t show the System Preferences pane when changing the Alt-Tab setting:</p>
<ul>
<li>Start Automator</li>
<li>Choose &#8220;Service&#8221;</li>
<li>Select the &#8220;Run Shell Script&#8221; action</li>
</ul>
<p>Copy and paste this into the workflow:<br />
<code>current_value=$(defaults read com.apple.dock mru-spaces)<br />
if [ $current_value = 1 ]<br />
then<br />
  defaults write com.apple.dock mru-spaces -bool No<br />
  /usr/local/bin/growlnotify -m "Automatically Rearrange is Turned Off"<br />
else<br />
  defaults write com.apple.dock mru-spaces -bool Yes<br />
  /usr/local/bin/growlnotify -m "Automatically Rearrange is Turned On"<br />
fi</p>
<p>killall Dock</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.latestintech.com/sorting-full-screen-apps-in-os-xs-mission-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install rar and unrar on a Mac OX 10.5+</title>
		<link>http://www.latestintech.com/install-rar-and-unrar-on-a-mac-ox-105/</link>
		<comments>http://www.latestintech.com/install-rar-and-unrar-on-a-mac-ox-105/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 02:55:09 +0000</pubDate>
		<dc:creator>sarvinc</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.latestintech.com/install-rar-and-unrar-on-a-mac-ox-105/</guid>
		<description><![CDATA[A great tutorial can be found here.]]></description>
			<content:encoded><![CDATA[<p>A great tutorial can be found <a href="http://www.robertvenema.nl/journal/archive/howto-command-line-unrar-on-mac-os-x/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.latestintech.com/install-rar-and-unrar-on-a-mac-ox-105/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl grabbing output from a shell command</title>
		<link>http://www.latestintech.com/perl-grabbing-output-from-a-shell-command/</link>
		<comments>http://www.latestintech.com/perl-grabbing-output-from-a-shell-command/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 22:00:19 +0000</pubDate>
		<dc:creator>sarvinc</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.latestintech.com/perl-grabbing-output-from-a-shell-command/</guid>
		<description><![CDATA[$result = `ls -l $file 2>&#038;1`;]]></description>
			<content:encoded><![CDATA[<p><code>$result = `ls -l $file 2>&#038;1`;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.latestintech.com/perl-grabbing-output-from-a-shell-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Re-configuring CPAN</title>
		<link>http://www.latestintech.com/re-configuring-cpan/</link>
		<comments>http://www.latestintech.com/re-configuring-cpan/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 16:42:56 +0000</pubDate>
		<dc:creator>sarvinc</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.latestintech.com/re-configuring-cpan/</guid>
		<description><![CDATA[sudo perl -MCPAN -e shell o conf init]]></description>
			<content:encoded><![CDATA[<p>sudo perl -MCPAN -e shell<br />
o conf init</p>
]]></content:encoded>
			<wfw:commentRss>http://www.latestintech.com/re-configuring-cpan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xargs choking on whitespace</title>
		<link>http://www.latestintech.com/xargs-choking-on-whitespace/</link>
		<comments>http://www.latestintech.com/xargs-choking-on-whitespace/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 16:59:53 +0000</pubDate>
		<dc:creator>sarvinc</dc:creator>
				<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.latestintech.com/xargs-choking-on-whitespace/</guid>
		<description><![CDATA[Every once in a while the normal recursive bash command doesn&#8217;t work and I resort to using find with xargs. Of course xargs hates whitespace and I often find myself working with files created by others. xargs chokes on whitespace thinking it&#8217;s an indication of a new file. The solution is to get find to [...]]]></description>
			<content:encoded><![CDATA[<p>Every once in a while the normal recursive bash command doesn&#8217;t work and I resort to using find with xargs. Of course xargs hates whitespace and I often find myself working with files created by others. xargs chokes on whitespace thinking it&#8217;s an indication of a new file. The solution is to get find to send null separated values instead of newline separated values, and get xargs to check for null characters instead of newlines. Both can be accomplished, find&#8217;s <code>-print0</code> sends null values, xarg&#8217;s <code>-0</code> will accept null values.</p>
<p>Here&#8217;s an example:<br />
<code>find ./website/ ! -perm -775 -print0 | xargs -0 chown production:wheel</code></p>
<p>via <a href="http://www.linuxdevcenter.com/pub/a/linux/lpt/09_22.html">linuxdevcenter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.latestintech.com/xargs-choking-on-whitespace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Catching System output from Perl</title>
		<link>http://www.latestintech.com/catching-system-output-from-perl/</link>
		<comments>http://www.latestintech.com/catching-system-output-from-perl/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 22:00:09 +0000</pubDate>
		<dc:creator>sarvinc</dc:creator>
				<category><![CDATA[OS]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.latestintech.com/catching-system-output-from-perl/</guid>
		<description><![CDATA[I&#8217;m too lazy to install a perl module, on a local computer, for a quick whois on a few domains. Catching the shell&#8217;s output is more convenient in this case. Instead of first writing and then reading from a file, it makes more sense to use a pipe. Here&#8217;s a quick example: #!/usr/bin/perl open (WHOIS, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m too lazy to install a perl module, on a local computer, for a quick whois on a few domains. Catching the shell&#8217;s output is more convenient in this case.</p>
<p>Instead of first writing and then reading from a file, it makes more sense to use a pipe. Here&#8217;s a quick example:</p>
<p><code><br />
#!/usr/bin/perl<br />
open (WHOIS, "/usr/bin/whois  ewayauto.com |");<br />
$i=1;<br />
while (<WHOIS>){<br />
print "Line # ".$i." ".$_;<br />
$i++;<br />
}<br />
print "All done!\n";<br />
close WHOIS;<br />
</code></p>
<p>Thanks to <a href="http://www.netadmintools.com/art269.html">netadmintools</a> for this one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.latestintech.com/catching-system-output-from-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find current user with in an Applescript</title>
		<link>http://www.latestintech.com/find-current-user-with-in-an-applescript/</link>
		<comments>http://www.latestintech.com/find-current-user-with-in-an-applescript/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 23:27:08 +0000</pubDate>
		<dc:creator>sarvinc</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.latestintech.com/find-current-user-with-in-an-applescript/</guid>
		<description><![CDATA[I&#8217;m in the middle of testing this, but it should work: set MyName to do shell script "whoami"]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the middle of testing this, but it should work:<br />
<code>set MyName to do shell script "whoami"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.latestintech.com/find-current-user-with-in-an-applescript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle</title>
		<link>http://www.latestintech.com/oracle/</link>
		<comments>http://www.latestintech.com/oracle/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 20:08:30 +0000</pubDate>
		<dc:creator>sarvinc</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.latestintech.com/oracle/</guid>
		<description><![CDATA[I&#8217;ve been trying to pick-up a little oracle db experience. In Oracle sqlplus, if you type ed or edit at the command prompt, sqlplus will put the last command into an editor buffer for easy editing. Here&#8217;s a quick tip for you; the default editor in Oracle sqlplus can be changed to vim pretty quickly. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to pick-up a little oracle db experience. In Oracle sqlplus, if you type ed or edit at the command prompt, sqlplus will put the last command into an editor buffer for easy editing. Here&#8217;s a quick tip for you; the default editor in Oracle sqlplus can be changed to vim pretty quickly.  </p>
<p>Here&#8217;s what you do:<br />
1. Create the file login.sql, with any editor, in your home directory<br />
2. Add the line &#8220;DEFINE _EDITOR=vim&#8221; to the file login.sql</p>
<p>From now on typing the command &#8220;ed&#8221; in to Oracle sqlplus will open the buffer with vim.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.latestintech.com/oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup data using Amazon&#8217;s S3 on the Mac</title>
		<link>http://www.latestintech.com/backup-data-using-amazons-s3-on-the-mac/</link>
		<comments>http://www.latestintech.com/backup-data-using-amazons-s3-on-the-mac/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 19:26:38 +0000</pubDate>
		<dc:creator>sarvinc</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[D.I.Y.]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.latestintech.com/backup-data-using-amazons-s3-on-the-mac/</guid>
		<description><![CDATA[There are other solutions to backups not involving Amazon&#8217;s S3. If you insist on using S3, this seems like the easiest solution, the comments hold particular value; suggested usage includes rdiffs and swapping out launchd for Automator and ical. Read the article here.]]></description>
			<content:encoded><![CDATA[<p>There are other solutions to backups <a href="http://www.latestintech.com/macfuse/">not involving Amazon&#8217;s S3</a>. If you insist on using S3, this seems like the easiest solution, the comments hold particular value; suggested usage includes rdiffs and swapping out launchd for Automator and ical.</p>
<p>Read the article <a href="http://vallery.net/2008/02/01/using-amazon-s3-to-automatically-backup-your-mac/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.latestintech.com/backup-data-using-amazons-s3-on-the-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bc a GNU CLI Calculator</title>
		<link>http://www.latestintech.com/bc-a-gnu-cli-calculator/</link>
		<comments>http://www.latestintech.com/bc-a-gnu-cli-calculator/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 19:15:36 +0000</pubDate>
		<dc:creator>sarvinc</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.latestintech.com/bc-a-gnu-cli-calculator/</guid>
		<description><![CDATA[Handy calculator for the command-line. Hey, it&#8217;s already on the mac.]]></description>
			<content:encoded><![CDATA[<p>Handy <a href="http://www.gnu.org/software/bc/">calculator</a> for the command-line. Hey, it&#8217;s already <a href="http://www.tuaw.com/2007/04/24/terminal-tip-command-line-calculator/">on the mac</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.latestintech.com/bc-a-gnu-cli-calculator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

