<?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>2Paths &#187; osx</title>
	<atom:link href="http://www.2paths.com/tag/osx/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.2paths.com</link>
	<description>Custom Software Technical Architecture, Design and Development in Vancouver, BC, Canada</description>
	<lastBuildDate>Mon, 27 Sep 2010 01:15:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unix shell grab bag</title>
		<link>http://www.2paths.com/2009/03/06/unix-shell-grab-bag/</link>
		<comments>http://www.2paths.com/2009/03/06/unix-shell-grab-bag/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 23:09:39 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Utilities]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://www.2paths.com/?p=818</guid>
		<description><![CDATA[
Largely for my own reference, here are some Unix shell tricks that have come up lately. If you&#8217;re using Linux, Mac OS X, or other Unix-like systems, these might be handy.
Redirecting output
When a process starts, it opens three file descriptors: file descriptor 0 for standard input (STDIN), file descriptor 1 for standard output (STDOUT), and [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Note to self: this really messes up with all the ampersands. Be sure to check the output if I ever change anything. --></p>
<p>Largely for my own reference, here are some Unix shell tricks that have come up lately. If you&#8217;re using Linux, Mac OS X, or other Unix-like systems, these might be handy.</p>
<h3>Redirecting output</h3>
<p>When a process starts, it opens three file descriptors: file descriptor 0 for standard input (STDIN), file descriptor 1 for standard output (STDOUT), and file descriptor 2 for standard error (STDERR). By default, the standard output and error just print to the terminal (so you see them on the screen), but you can redirect them to a file (e.g. for logging or just to cut down on gibberish that you&#8217;re not going to read anyway) by using &#8220;&gt;&#8221; to create/overwrite the file or &#8220;&gt;&gt;&#8221; to create/append the file.</p>
<p>I&#8217;ve used &#8220;find /&#8221; as the command in these examples because it takes a while to run and tends to produce plenty of output on STDOUT and STDERR.</p>
<p><code><br />
# Redirect STDOUT to a file, but leave STDERR to print on screen.<br />
# If the file exists, overwrite it.<br />
$ find / > /some/file.txt<br />
# Redirect STDOUT to a file, but leave STDERR to print on screen.<br />
# If the file exists, append to the end of it. If it doesn't exist, create it.<br />
$ find / >> /some/file.txt<br />
# Redirect STDOUT to the null device, which is a special file that silently discards everything.<br />
# Use this if you want to ignore STDOUT but keep an eye on STDERR.<br />
$ find / > /dev/null<br />
# Redirect both STDOUT and STDERR to the same file.<br />
$ find / > /some/file.txt 2>&#038;1<br />
# Redirect STDOUT and STDERR to different files.<br />
# The numbers refer to the file descriptors mentioned above.<br />
$ find / > /path/to/log.out 2>/path/to/log.err<br />
# ... or, more explicitly:<br />
$ find / 1>/path/to/log.out 2>/path/to/log.err<br />
</code></p>
<h3>Background processes</h3>
<p>Often you&#8217;ll want to start something running and keep working on something else. This is frequently done by redirecting the output to a file (or the <a href="http://en.wikipedia.org/wiki/Data_sink">null device</a>) by starting it in the background with the &#8220;&amp;&#8221; keyword.</p>
<p><code><br />
# Start a process in the background.<br />
$ find / &#038;<br />
# Start a process in the background and ignore all output.<br />
$ find / > /dev/null 2>&#038;1<br />
</code></p>
<p>To bring a background process back to the foreground, for example to stop it with ctrl+c or to provide input if it asks a question, use the &#8220;fg&#8221; command.</p>
<p>If you start several background processes, use the &#8220;jobs&#8221; command to list them. That will print the job number (different from the process ID) that you can use to bring a specific one back to the foreground with e.g. &#8220;fg 3&#8243; to bring back job 3.</p>
<p><code><br />
$ find / > /dev/null 2>&#038;1 &#038;<br />
$ cp file.dat /mnt/other_drive &#038;<br />
$ sleep 600 &#038;<br />
$ jobs<br />
[1]   Running             find / > /dev/null 2>&#038;1 &#038;<br />
[2]-  Running             cp file.dat /mnt/other_drive &#038;<br />
[3]+  Running             sleep 600 &#038;<br />
$ fg 3<br />
sleep 600<br />
</code></p>
<h3>Capturing process ID for simple start/stop scripts</h3>
<p>Putting those together, here&#8217;s a simple start/stop script that starts a command in the background and stores all output in a log file. It also uses the &#8220;$!&#8221; variable to record the process ID so it can kill the process later. Call the file &#8220;startstop.sh&#8221; and just run &#8220;startstop.sh start&#8221; to start it and &#8220;startstop.sh stop&#8221; to stop it.</p>
<p><code><br />
#!/bin/sh<br />
PID_FILE="test.pid"<br />
LOG_FILE="test.log"<br />
CMD="find /"<br />
if [ "$1" == "start" ]; then<br />
    echo "starting!"<br />
    $CMD > $LOG_FILE 2>&#038;1 &#038;<br />
    echo $! > $PID_FILE;<br />
fi<br />
if [ "$1" == "stop" ]; then<br />
    echo "stopping!"<br />
    kill `cat $PID_FILE`;<br />
    rm $PID_FILE;<br />
fi<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.2paths.com/2009/03/06/unix-shell-grab-bag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse update, fix for home and end keys</title>
		<link>http://www.2paths.com/2007/10/19/eclipse-update-fix-for-home-and-end-keys/</link>
		<comments>http://www.2paths.com/2007/10/19/eclipse-update-fix-for-home-and-end-keys/#comments</comments>
		<pubDate>Fri, 19 Oct 2007 17:32:27 +0000</pubDate>
		<dc:creator>gord</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://blog.2paths.com/eclipse-update-fix-for-home-and-end-keys.html</guid>
		<description><![CDATA[2Paths Eclipse Distro v2
I&#8217;ve put together a new disto of the latest Eclipse wtp with some added plugin goodness. I&#8217;ve found this version to be much more stable than v1, and it even works on Lorill&#8217;s machine without too much trouble. Among the new features is a regex tester plugin, and a filter plugin that [...]]]></description>
			<content:encoded><![CDATA[<p><strong>2Paths Eclipse Distro v2</strong><br />
I&#8217;ve put together a new disto of the latest Eclipse wtp with some added plugin goodness. I&#8217;ve found this version to be much more stable than v1, and it even works on Lorill&#8217;s machine without too much trouble. Among the new features is a regex tester plugin, and a filter plugin that allows you to run command line tools such as sed against a selection in the text editor.</p>
<p>Also note that I&#8217;ve put together a 2Paths preferences file that remaps the home and end keys in eclipse, and adds in the 2Paths code formatting templates. To import, once you&#8217;ve got the new eclipse up and running, select import and choose preferences.</p>
<p><a href="http://dev.2paths.com/~glea/blog/eclipse-2paths-v2.zip">Download Eclipse 2Paths Edition v2</a> (155.6MB)</p>
<p><strong>Fix for home and end keys</strong><br />
If you&#8217;re anything like me, you are used to having  your home and end keys go to the start of the line of text and the end of the line, respectively. The way OS X does it drives me insane, and I&#8217;ve finally found a solution that even fixes it in firefox: <a href="http://www.starryhope.com/tech/apple/2006/keyfixer/">KeyFixer</a>.</p>
<p>KeyFixer is a free utility that remaps those keys, there are 2 versions, the standard one that remaps it in OS X and most apps, and KeyFixer for Firefox which is self explanatory. I recommend installing them both if you want your home and end keys back.</p>
<p><a href="http://www.starryhope.com/downloads/KeyFixer.dmg">Download KeyFixer</a> (60KB)</p>
<p><a href="http://www.starryhope.com/downloads/keyfixer_firefox_0.2.dmg">Download KeyFixer for Firefox</a> (80KB)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.2paths.com/2007/10/19/eclipse-update-fix-for-home-and-end-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse WebTools 2.0 Released, time to update your IDE</title>
		<link>http://www.2paths.com/2007/07/03/eclipse-webtools-20-released-time-to-update-your-ide/</link>
		<comments>http://www.2paths.com/2007/07/03/eclipse-webtools-20-released-time-to-update-your-ide/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 00:52:24 +0000</pubDate>
		<dc:creator>gord</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://blog.2paths.com/eclipse-webtools-20-released-time-to-update-your-ide.html</guid>
		<description><![CDATA[The Eclipse WebTools team has released version 2.0 of the WebTools Platform along with the rest of the Europa release. From the release announcement:
             Eclipse developers will be particularly pleased with the debut of major features and/or specification      [...]]]></description>
			<content:encoded><![CDATA[<p>The Eclipse WebTools team has released version 2.0 of the WebTools Platform along with the rest of the <a href="http://www.eclipse.org/europa/">Europa release</a>. From the <a href="http://www.eclipse.org/webtools/news.php#permalink99">release announcement</a>:</p>
<blockquote><p><em>             Eclipse developers will be particularly pleased with the debut of major features and/or specification             updates to EJB3 JPA, JSP 2.0, JSF 1.2, Axis2 Web Services, Tomcat support, and source editing. This release             also introduces Java EE 5 project support. </em></p></blockquote>
<p>I&#8217;ve put together a new Eclipse bundle for everyone here at 2Paths. The package includes some useful plugins preinstalled (<a href="http://subclipse.tigris.org/">Subclipse</a>, <a href="http://springide.org/">SpringIDE 2.0</a>., <a href="http://jautodoc.sourceforge.net/">JAutoDoc</a>, and <a href="http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview/">JSEclipse</a>), as well as some performance and stability tweaks.</p>
<p><a href="http://frigga.2paths.com/~glea/blog/eclipse-2paths-v1.zip">Download</a> &#8211; Eclipse Europa 2Paths Edition (OS X, 155MB)</p>
<p>To ensure everyone is working with the same tools, you should configure your eclipse to automatically check for updates. This can be done by clicking on the Eclipse menu -> Preferences then Install/Update -> Automatic Updates.</p>
<p>If anyone has any problems with this release, just let me know and I can give you a hand getting things sorted out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.2paths.com/2007/07/03/eclipse-webtools-20-released-time-to-update-your-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse WTP 1.5.4 and 2.0RC1 for OS X</title>
		<link>http://www.2paths.com/2007/05/28/eclipse-wtp-154-and-20rc1-for-os-x/</link>
		<comments>http://www.2paths.com/2007/05/28/eclipse-wtp-154-and-20rc1-for-os-x/#comments</comments>
		<pubDate>Mon, 28 May 2007 18:59:08 +0000</pubDate>
		<dc:creator>gord</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://blog.2paths.com/eclipse-wtp-154-and-20rc1-for-os-x.html</guid>
		<description><![CDATA[I&#8217;ve downloaded and hand-configured the latest Eclipse WTP builds for your convenience. I&#8217;d included the Subclipse SVN plugin as well. If there are any other plugins you&#8217;d like to see by default in the future, let me know.
First of all, if you haven&#8217;t installed this update to the Java SWT libraries from Apple, do it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve downloaded and hand-configured the latest Eclipse WTP builds for your convenience. I&#8217;d included the <a href="http://subclipse.tigris.org/">Subclipse</a> SVN plugin as well. If there are any other plugins you&#8217;d like to see by default in the future, let me know.</p>
<p>First of all, if you haven&#8217;t installed this update to the Java SWT libraries from Apple, do it now. It should improve stability with Eclipse.</p>
<p>Download: <a href="http://dev.2paths.com/~glea/blog/j2se50release4swtcompatibility.dmg">SWT Compatibility Update</a> (188KB)</p>
<p>Eclipse WTP 1.5.4 is the latest update to the WTP 1.5 line. Not anything new, but contains numerous bug fixes etc.</p>
<p>Download: <a href="http://dev.2paths.com/~glea/blog/eclipse_wtp1.5.4.zip">Eclipse WTP 1.5.4</a> (183.9MB)</p>
<p>Eclipse WTP 2.0 RC1 is based on Eclipse 3.3 RC1 and appears to be fairly stable. Some of the new features are support for Tomcat 6, support for JPA projects (annotations, , mappings etc), built in support for web services, and spell checking. This is pre-release, so use at your own risk (I&#8217;ve been using it and it seems ok, although I keep my 1.5.4 around just incase).</p>
<p>Download: <a href="http://dev.2paths.com/~glea/blog/eclipse_wtp2_rc1.zip">Eclipse WTP 2.0RC1</a> (227MB)</p>
<p>Remember to update your copy of eclipse regularly to receive the latest bugfixes, or better yet, set it to auto update in preferences.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.2paths.com/2007/05/28/eclipse-wtp-154-and-20rc1-for-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>2Paths blog Widget for OSX</title>
		<link>http://www.2paths.com/2007/02/21/2paths-blog-widget-for-osx/</link>
		<comments>http://www.2paths.com/2007/02/21/2paths-blog-widget-for-osx/#comments</comments>
		<pubDate>Wed, 21 Feb 2007 21:11:33 +0000</pubDate>
		<dc:creator>gord</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Under the hood]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://blog.2paths.com/2paths-blog-widget-for-osx.html</guid>
		<description><![CDATA[I was messing around with some of the sample Dashboard widget code provided by Apple and came up with a widget that displays the latest entries on the 2Paths blog. Widgets are basically html + css + javascript, with a little ajax mixed in if desired, and as such they&#8217;re pretty simple to create and [...]]]></description>
			<content:encoded><![CDATA[<p>I was messing around with some of the sample Dashboard widget code <a title="Apple Sample Code" href="http://developer.apple.com/samplecode/AppleApplications/idxDashboard-date.html">provided</a> by Apple and came up with a widget that displays the latest entries on the 2Paths blog. Widgets are basically html + css + javascript, with a little ajax mixed in if desired, and as such they&#8217;re pretty simple to create and modify. The nice thing about coding them versus something you would access in your browser is that Dashboard is a known variable; you don&#8217;t need to worry about what it&#8217;s going to look like in 5 different browsers.</p>
<p>On a side note, <a title="The Daily Grind" href="http://microcore.dk/TheDailyGrind/index.php">The Daily Grind</a> is a time tracking widget that allows you to track the amount of time you&#8217;ve spent on a number of different tasks/projects. It wouldn&#8217;t take a lot of work to interface it with JIRA for our time tracking.</p>
<p>Download: <a title="2Paths Blog Widget" href="http://dev.2paths.com/~glea/2Paths-Blog-Widget.dmg">2Paths Blog Widget</a> (584KB)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.2paths.com/2007/02/21/2paths-blog-widget-for-osx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

