<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Michael Schubert</title>
 <link href="http://schubert.cx/atom.xml" rel="self"/>
 <link href="http://schubert.cx/"/>
 <updated>2010-01-23T10:22:56-08:00</updated>
 <id>http://schubert.cx/</id>
 <author>
   <name>Michael Schubert</name>
 </author>

 
 <entry>
   <title>Subtle issue with ~/.ssh/config</title>
   <link href="http://schubert.cx//2009/11/02/subtle-issue-with-ssh-config.html"/>
   <updated>2009-11-02T00:00:00-08:00</updated>
   <id>http://schubert.cx//2009/11/02/subtle-issue-with-ssh-config</id>
   <content type="html">&lt;h1&gt;Subtle issue with ~/.ssh/config&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;2 Nov 2009 &amp;#8211; New York&lt;/p&gt;
&lt;p&gt;Ran into a bizarre issue with &lt;sub&gt;/.ssh/config the other day. Essentially the problem seems to be that when you add an &amp;#8220;IdentityFile&amp;#8221; entry you need to specify the full path (&lt;/sub&gt;/.ssh/some_key will work) and not just the name of the file in the ~/.ssh directory. Now you may think that this is always required but either it does not work on &lt;span class=&quot;caps&quot;&gt;OSX&lt;/span&gt; or it only works on Ubuntu. But it definitely work on Ubuntu. I have not had a chance to check it out on a third operating system yet.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Control inversely relates to value?</title>
   <link href="http://schubert.cx//2009/07/21/control-inversely-relates-to-value.html"/>
   <updated>2009-07-21T00:00:00-07:00</updated>
   <id>http://schubert.cx//2009/07/21/control-inversely-relates-to-value</id>
   <content type="html">&lt;h1&gt;Control inversely relates to value?&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;21 Jul 2009 &amp;#8211; New York&lt;/p&gt;
&lt;p&gt;This leads us to the odd conclusion that strict control is something that matters a lot on relatively useless projects and much less on useful projects. It suggests that the more you focus on control, the more likely you’re working on a project that’s striving to deliver something of relatively minor value.&lt;/p&gt;
&lt;p&gt;– Tom DeMarco ( &lt;a href=&quot;http://www2.computer.org/cms/Computer.org/ComputingNow/homepage/2009/0709/rW_SO_Viewpoints.pdf&quot;&gt;source&lt;/a&gt; )&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Injecting compile time constants into an iPhone project</title>
   <link href="http://schubert.cx//2009/04/29/injecting-compile-time-constants-into-an-iphone-project.html"/>
   <updated>2009-04-29T00:00:00-07:00</updated>
   <id>http://schubert.cx//2009/04/29/injecting-compile-time-constants-into-an-iphone-project</id>
   <content type="html">&lt;h1&gt;Injecting compile time constants into an iPhone project&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;29 Apr 2009 &amp;#8211; New York&lt;/p&gt;
&lt;p&gt;So you have your iPhone project and you need to dynamically set constant string referenced in your code from an environment variable (think: for localization and with stringWithFormat substitution). What to do?&lt;/p&gt;
&lt;p&gt;Suppose you had an environment variable FOO_BAR with a value of “Hello”&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Project &amp;#8594; Edit Project Settings&lt;/li&gt;
	&lt;li&gt;Add User Defined Setting&lt;/li&gt;
	&lt;li&gt;User Defined value of “OTHER_CFLAGS” (in non-iphone projects this should already be defined)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Give it a value of:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
-DFOO_BAR=@\&quot;$(FOO_BAR)\ World\&quot;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;You can now do:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
NSString *titleText = NSLocalizedString(@&quot;Title&quot;, nil);
titleText = [NSString stringWithFormat: titleText, FOO_BAR];
[title setText:titleText];
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And now title (in my case it is a UILabel) will have text of “Hello World”&lt;/p&gt;
&lt;p&gt;Why the xcode project does not define an empty OTHER_CFLAGS build setting by default is beyond me but it is not cool.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Creating (and removing) remote Git branches</title>
   <link href="http://schubert.cx//2009/04/29/creating-and-removing-remote-git-branches.html"/>
   <updated>2009-04-29T00:00:00-07:00</updated>
   <id>http://schubert.cx//2009/04/29/creating-and-removing-remote-git-branches</id>
   <content type="html">&lt;h1&gt;Creating (and removing) remote Git branches&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;29 Apr 2009 &amp;#8211; New York&lt;/p&gt;
&lt;p&gt;Creating and removing remote git branches is to put it mildly, less then obvious so incase you were wondering how or keep forgetting…&lt;/p&gt;
&lt;p&gt;Here is the original post and source of all of this.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://schubert.cx/files/git-create-branch.sh&quot;&gt;git-create-branch&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;
&amp;lt;/code&amp;gt;
#!/bin/sh
# git-create-branch
if [ $# -ne 1 ]; then
  echo &quot;Usage: ${0} branch_name&quot;
  exit 127
fi
branch_name=$1
current_branch=`git branch -a | grep \*`
if [ &quot;${current_branch}&quot; != &quot;* master&quot; ]; then
  git co master 2&amp;gt;&amp;amp;1 &amp;gt;/dev/null
fi
local_branch=`git branch -a | grep ${branch_name} | head -n1`
remote_branch=`git branch -a | grep remotes/origin/${branch_name} | tail -n1`
if [ &quot;${remote_branch}&quot; != &quot; remotes/origin/${branch_name}&quot; ]; then
  git push origin origin:refs/heads/${branch_name}
  git fetch origin
else
  echo &quot;Remote branch 'remotes/origin/${branch_name}' already exists&quot;
fi

if [ &quot;${local_branch}&quot; != &quot; ${branch_name}&quot; ]; then
  git checkout --track -b ${branch_name} origin/${branch_name}
  git pull
else
  echo &quot;Local branch '${branch_name}' already exists!&quot;
fi
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://schubert.cx/files/git-remove-branch.sh&quot;&gt;git-remove-branch&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
#!/bin/sh
# git-remove-branch

if [ $# -ne 1 ]; then
  echo &quot;Usage: ${0} branch_name&quot;
  exit 127
fi
branch_name=$1
current_branch=`git branch -a | grep \*`
if [ &quot;${current_branch}&quot; != &quot;* master&quot; ]; then
  git co master 2&amp;gt;&amp;amp;1 &amp;gt;/dev/null
fi
local_branch=`git branch -a | grep ${branch_name} | head -n1`
remote_branch=`git branch -a | grep origin/${branch_name} | tail -n1`
if [ &quot;${local_branch}&quot; != &quot; ${branch_name}&quot; ]; then
  echo &quot;No local branch '${branch_name}' found&quot;
else
  git branch -D &quot;${branch_name}&quot;
fi
if [ &quot;${remote_branch}&quot; != &quot; origin/${branch_name}&quot; ]; then
  echo &quot;No remote branch 'origin/${branch_name}' found&quot;
else
  git push origin :&quot;${branch_name}&quot;
fi
&lt;/code&gt;
&lt;/pre&gt;</content>
 </entry>
 
 <entry>
   <title>Migrating ownership of a git (hub) repo</title>
   <link href="http://schubert.cx//2009/04/28/migrating-ownership-of-a-github-repo.html"/>
   <updated>2009-04-28T00:00:00-07:00</updated>
   <id>http://schubert.cx//2009/04/28/migrating-ownership-of-a-github-repo</id>
   <content type="html">&lt;h1&gt;Migrating ownership of a git (hub) repo&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;28 Apr 2009 &amp;#8211; New York&lt;/p&gt;
&lt;p&gt;For when you don’t want to fork; you need to change code ownership.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
git clone git@github.com:originaluser/originalrepo.git
cd originalrepo
git remote rm origin
git remote add origin git@github.com:newuser/newrepo.git
git push origin master
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;That was easy. Keep in mind this is just the repo. &lt;span class=&quot;caps&quot;&gt;AFAIK&lt;/span&gt; there is no way to migrate the wiki or the tracker.&lt;/p&gt;
&lt;p&gt;For all your devs who need to switch over to the new repo it should just be a matter of:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
git remote rm origin
git remote add origin git@github.com:newuser/newrepo.git
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Remember to take care of your branches as well. I wonder how you do this with hg and bitbucket.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Handy OSX Software - The Unarchiver</title>
   <link href="http://schubert.cx//2009/04/27/handy-osx-software-the-unarchiver.html"/>
   <updated>2009-04-27T00:00:00-07:00</updated>
   <id>http://schubert.cx//2009/04/27/handy-osx-software-the-unarchiver</id>
   <content type="html">&lt;h1&gt;Handy &lt;span class=&quot;caps&quot;&gt;OSX&lt;/span&gt; Software &amp;#8211; The Unarchiver&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;27 Apr 2009 &amp;#8211; New York&lt;/p&gt;
&lt;p&gt;I can’t remember how I stumbled across this but I can’t believe it took this long (either for this to exist or for me to find it). &lt;a href=&quot;http://wakaba.c3.cx/s/apps/unarchiver.html&quot;&gt;The Unarchiver&lt;/a&gt; is a replacement for the built-in archive unpacker program in Mac OS X.&lt;/p&gt;
&lt;p&gt;Crucially it can handle .rar and stuffit (.sit) files (and a lot more). This means one unpacker to rule them all, no more UnRarX and StuffIt Deluxe.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Bad Error Message (In Flex)</title>
   <link href="http://schubert.cx//2009/03/17/bad-error-message-in-flex.html"/>
   <updated>2009-03-17T00:00:00-07:00</updated>
   <id>http://schubert.cx//2009/03/17/bad-error-message-in-flex</id>
   <content type="html">&lt;h1&gt;Bad Error Message (In Flex)&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;17 Mar 2009 &amp;#8211; New York&lt;/p&gt;
&lt;p&gt;Had some flex code that generated the following compile-time error:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
1061: Call to a possibly undefined method fooBar through a reference with static type mx.controls.VideoDisplay.
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Already I have a problem with this. If the message is “possibly undefined” then I would expect it to be a warning that an exception &lt;strong&gt;may&lt;/strong&gt; occur at runtime if indeed the message does not exist (you see the same thing in Obj-C if you don’t declare a method in your header but that is done correctly).&lt;/p&gt;
&lt;p&gt;With this confusion in mind I run off to see why this is a compile-time error and found this &lt;a href=&quot;http://livedocs.adobe.com/flex/2/langref/compilerErrors.html&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You are calling a method that is not defined.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;… … in what sense then is it “possibly” undefined?&lt;/p&gt;</content>
 </entry>
 
 
</feed>