<?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>Self As Team &#187; script</title>
	<atom:link href="http://blog.intraspectivecorp.com/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.intraspectivecorp.com</link>
	<description>Dallas based Ruby on Rails and Java Consulting</description>
	<lastBuildDate>Mon, 21 Sep 2009 02:06:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tweets to Make You Look Up</title>
		<link>http://blog.intraspectivecorp.com/2009/09/16/tweets-to-make-you-look-up/</link>
		<comments>http://blog.intraspectivecorp.com/2009/09/16/tweets-to-make-you-look-up/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 21:20:52 +0000</pubDate>
		<dc:creator>David Hainlin</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.intraspectivecorp.com/?p=65</guid>
		<description><![CDATA[As a space junkie, I frequent nasa.gov and astronomy picture of the day sites to marvel at the universe and our attempts to learn and explore it.  One of my favorite sites is the venerable Heavens Above created and run by Chris Peat.  If you haven&#8217;t checked it out, please do so soon [...]]]></description>
			<content:encoded><![CDATA[<p>As a space junkie, I frequent <a href="http://nasa.gov">nasa.gov</a> and <a href="http://antwrp.gsfc.nasa.gov/apod/astropix.html">astronomy picture of the day</a> sites to marvel at the universe and our attempts to learn and explore it.  One of my favorite sites is the venerable <a href="http://www.heavens-above.com/">Heavens Above</a> created and run by Chris Peat.  If you haven&#8217;t checked it out, please do so soon as it gives lots of very useful information for observing satellites such as space shuttles, international space station (which is large enough to be seen in the daylight hours), Hubble space telescope and hundreds of others.  If you register with the site or plug in your location, you can get lists of dates/times to see things like the space station fly overhead.  My kids think I&#8217;m a genius because I&#8217;ve been known to look down at my watch during dinner and announce that the ISS is about to fly overhead &#8211; we all run outside and I start a countdown and poof &#8211; right on cue &#8211; a big bright star starts a lazy, 5 minute pass overhead.  All thanks to Chris Peat&#8217;s great web site.  You can even get star maps and ground track paths to help you get oriented.</p>
<p>I sometimes forget to check the site so I setup an automatic twitter feed to send me reminders.  Was very easy to do &#8230;<br />
<span id="more-65"></span></p>
<p>The toughest thing about Heavens Above  is remembering to check it frequently.  This got me thinking &#8211; &#8220;wouldn&#8217;t it be nice if I got a text message about 10 minutes prior to a pass?&#8221;.  After thinking about it and looking around on the heavens above site, I concluded there wasn&#8217;t any api or service I could coax to do this, I decided to write a quick and dirty script.  I also found an <a href="http://blech.vox.com/library/post/moreabovelondon.html">blog</a> describing some work that Paul Mison had done at Hackday London a few years ago.  (I rarely have unique ideas&#8230;).  The gist is this, periodically, check for ISS passes over a particular location (Richardson, Texas in this case) and within about 15 minutes of the event, send an update to twitter listing time and starting location (sky direction).  I then could follow this twitter account (with mobile updates on) and now I can get notifications about when to look up and wave to our brave ISS crew (I even saw the ISS through the glare of lights at a high school football game).</p>
<p>The script is written in ruby and is setup to run as a cron job on one of my servers.  It uses specific latitude and longitude and time zone to pull visible passes for the ISS from heavens above.  It grinds up the html using Hpricot and looks for any passes with a magnitude greater then -1.0 (our seeing is better than that in Richardson but I wanted to limit the number of tweets.  To reduce the number of hits on Heavens Above, the script caches the information in a config file and only returns to  heavens above when it has tweeted about an event.  The specifics of lat/long and twitter account are stored in a config file so this can be used for other locations as well.  I&#8217;ve posted the hack on <a href="http://github.com/dhainlin/ISS-Tweets">github</a>.</p>
<p>If you live in/around Richardson, you can follow the <a href="http://twitter.com/richardsontxiss">richardsontxiss twitter</a> account and it will send you tweets when you can see the ISS.  It doesn&#8217;t take weather into account, but we are more likely to have clear weather than not.  The next passes aren&#8217;t until the 24th  so be patient if you do follow this.  They do have gaps in time where there are few passes but then there will be a storm of great opportunities within a few short days. </p>
<p>If you are wondering what your latitude and longitude is, there is a nifty hack you can use to get it from a google map.  Center the map on your location and enter the following in the browser url line: </p>
<pre style="color: green; font-size: smaller;">javascript:void(prompt('',gApplication.getMap().getCenter()));</pre>
<p>This will prompt you with the coordinates of the currently centered location on the map.  Cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intraspectivecorp.com/2009/09/16/tweets-to-make-you-look-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silly Simple Git Initialization for your Rails Projects</title>
		<link>http://blog.intraspectivecorp.com/2009/07/06/silly-simple-git-initialization-for-your-rails-projects/</link>
		<comments>http://blog.intraspectivecorp.com/2009/07/06/silly-simple-git-initialization-for-your-rails-projects/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 16:44:03 +0000</pubDate>
		<dc:creator>David Hainlin</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://blog.intraspectivecorp.com/?p=19</guid>
		<description><![CDATA[Simple script to 'git' your rails going.]]></description>
			<content:encoded><![CDATA[<p>It is such a joy to have such great technologies at our fingertips.  Ruby on Rails can be a fantastic productivity booster for projects but I often find I get huge benefits from it for simply exploring ideas or working up a quick functional prototype.  By adding on things like <a href="http://blog.intraspectivecorp.com/2008/03/01/boost-team-productivity-and-consistency-by-developing-and-using-rails-generators/">customized generators that suit your client&#8217;s configuration</a> and customizable menus, you can get to a workable prototype in record time (minutes to hours).  </p>
<p>Part of the benefit of working with rails projects is the speed with which you can refactor and scaffold your way into different configurations.  This can sometimes get you into trouble if an experiment or plugin doesn&#8217;t work.  The best solution I&#8217;ve found for this is to <strong>ALWAYS</strong> initialized your fresh rails project into a <a href="http://git-scm.com/">git</a> repository.  This is like having infinite  idea or skill mulligan&#8217;s for your project &#8211; a great safety net that let&#8217;s you go fast without fear.</p>
<p><a href="http://railscasts.com">Ryan Bates&#8217;s</a> excellent screen cast series had a nice review of using <a href="http://railscasts.com/episodes/96-git-on-rails">git with rails</a> and one of the commenters (<a href="http://notahat.com/">Pete Yandell</a>) offered a script to simplify life.  This script sets up a standard rails project into git with the proper ignores.  I modified the original script slightly to avoid placing .gitignore files into the empty directories within the .git directory.  This is a harmless change but it seems cleaner to me. Here is my version of it:</p>
<p><code><br />
#!/bin/sh<br />
cat <<EOF > .gitignore<br />
log/*.log<br />
tmp/**/*<br />
db/*.sqlite3<br />
coverage<br />
doc/app/*<br />
EOF<br />
find . -type d -empty -exec touch {}/.gitignore \;<br />
git init<br />
echo "TODO - provide project README" > README<br />
git add .<br />
git commit -a -m "Initial import."<br />
</code><br />
(here&#8217;s the <a href="http://gist.github.com/141509">gist</a>)</p>
<p>This script works great (on OS X anyway) for setting up a project in git. This allows me to extend the &#8216;prototype&#8217; from hours to multiple days if I need to without losing control or risking breaking the whole thing with a laps of concentration.  I can create branches for experimental ideas and quickly switch back and forth.  As long as my migrations are current and especially if I&#8217;m using data generators like <a href="http://populator.rubyforge.org/">populator</a>, I can switch between branches to show my client a few different ideas or behaviors within seconds.  </p>
<p>It is so great to have a (revisable) history of what I&#8217;ve done on a project.  I can also quickly stash an idea away to work on it later.  No matter what I do on the prototype, I can always recover back to some previous spot without much fuss or concern. </p>
<p>This technique works so well because it is all self contained within your rails directory and because it is such a low-overhead and fast approach. </p>
<p>The approach works like this:</p>
<ol>
<li>rails some_new_project</li>
<li>cd some_new_project</li>
<li>git-rails</li>
<li>work on project for minutes or weeks with frequent checkins</li>
<li>create branches, rebase, squash commits, what ever &#8211; repeat previous steps
<li>if want to keep it, move it to a public repo, if not simply rm -rf the entire directory&#8230;</li>
</ol>
<p>Rails and git are really two powerful tools that have greatly revolutionized my personal work flow.  I get to move quickly and with the assurance that I can undo any bad ideas.  Infinite idea mulligans.  I also get to practice using git even if my client is stuck on subversion (or worse).  I highly recommend ALWAYS setting up your rails projects this way.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.intraspectivecorp.com/2009/07/06/silly-simple-git-initialization-for-your-rails-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
