<?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>www.wallcity.org</title>
	<atom:link href="http://www.wallcity.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wallcity.org</link>
	<description>Zack Smith</description>
	<lastBuildDate>Tue, 27 Dec 2011 22:33:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>TIme Machine Drawning</title>
		<link>http://www.wallcity.org/2011/12/time-machine-drawning/</link>
		<comments>http://www.wallcity.org/2011/12/time-machine-drawning/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 03:10:05 +0000</pubDate>
		<dc:creator>acid</dc:creator>
				<category><![CDATA[art]]></category>

		<guid isPermaLink="false">http://www.wallcity.org/?p=480</guid>
		<description><![CDATA[
Here is my time machine drawing for Charles new ebook. I don&#8217;t get to draw often anymore, but It was kind of neat seeing how much illustrator has grown up since I last used it for this kind of thing.  The orginal design was found on the internet by charles and can be found [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wallcity.org/wp-content/uploads/2011/12/TimeMachine_Color.png"><img src="http://www.wallcity.org/wp-content/uploads/2011/12/TimeMachine_Color-286x300.png" alt="" title="TimeMachine_Color" width="286" height="300" class="aligncenter size-medium wp-image-482" /></a></p>
<p>Here is my time machine drawing for Charles new ebook. I don&#8217;t get to draw often anymore, but It was kind of neat seeing how much illustrator has grown up since I last used it for this kind of thing.  The orginal design was found on the internet by charles and can be found <a href="http://stungeonstudios.blogspot.com/2009/11/steampunk-sketch.html">here</a>, and my version can be found <a href="http://www.wallcity.org/static/TimeMachine_Color.pdf">here</a><span id="more-480"></span>.  Why am I posting it, I don&#8217;t know, along time ago I wanted to be an artist and now all I have is this and an <a href="https://www.facebook.com/media/set/?set=a.15891765125.46829.528690125&#038;type=1">album</a> or too elsewhere.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wallcity.org/2011/12/time-machine-drawning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Little Warranty Parser</title>
		<link>http://www.wallcity.org/2011/11/simple-little-warranty-parser/</link>
		<comments>http://www.wallcity.org/2011/11/simple-little-warranty-parser/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 10:01:52 +0000</pubDate>
		<dc:creator>acid</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.wallcity.org/?p=476</guid>
		<description><![CDATA[
if anyone is interested I have a python prototype of @glarriza&#8217;s warranty ruby script  that spits all keys out as a dict http://gist.github.com/1357622
I would have used his but I am writing something in python that needed this directly and I did not want to call an external command.
-Z
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wallcity.org/wp-content/uploads/2011/11/Screen-Shot-2011-11-11-at-2.03.43-AM.png"><img src="http://www.wallcity.org/wp-content/uploads/2011/11/Screen-Shot-2011-11-11-at-2.03.43-AM-150x150.png" alt="" title="Warranty Dict" width="150" height="150" class="aligncenter size-thumbnail wp-image-478" /></a><br />
if anyone is interested I have a python prototype of <a href="https://github.com/glarizza/scripts">@glarriza&#8217;s</a> warranty ruby script  that spits all keys out as a dict <a href="http://gist.github.com/1357622">http://gist.github.com/1357622</a></p>
<p>I would have used his but I am writing something in python that needed this directly and I did not want to call an external command.</p>
<p>-Z</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wallcity.org/2011/11/simple-little-warranty-parser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>system-type a new little command line</title>
		<link>http://www.wallcity.org/2011/11/system-type-a-new-little-command-line/</link>
		<comments>http://www.wallcity.org/2011/11/system-type-a-new-little-command-line/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 00:30:26 +0000</pubDate>
		<dc:creator>acid</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[objc]]></category>

		<guid isPermaLink="false">http://www.wallcity.org/?p=474</guid>
		<description><![CDATA[I just made a little command line grab it here:
https://github.com/acidprime/system-type
This little binary will tell you if you have a Laptop or Desktop.
It reads this value using the system-type in IOKit (IOPlatformExpertDevice).
You can parse this value your self using the ioreg (-l) command but Its not
formatted well, so I decided to make this as its a [...]]]></description>
			<content:encoded><![CDATA[<p>I just made a little command line grab it here:</p>
<p><a href="https://github.com/acidprime/system-type">https://github.com/acidprime/system-type</a></p>
<p>This little binary will tell you if you have a Laptop or Desktop.<br />
It reads this value using the system-type in IOKit (IOPlatformExpertDevice).<br />
You can parse this value your self using the ioreg (-l) command but Its not<br />
formatted well, so I decided to make this as its a pretty common request.<br />
For instance I once had a school district that wanted to turn off wireless<br />
on all Desktops as they were having MYNAME(37) bonjour name conflict issues.</p>
<p>There is a little example.command shell script to show you the two ways you<br />
would use this in your scripts. laptops are value 2 (exit 1) and Desktops are<br />
value 1 (exit 0). The exit values allow you to use standard logic built-in to<br />
run the command and use its exit value. Or if you think thats lame you can<br />
parse the text. To each there own but I like exit values</p>
<p>Known Issues:<br />
As I recall this does not cover PowerPC machines, but I have not seen an intel<br />
that does not use this value. Maybe iPad 3 will be 3 ;)</p>
<p>To Do:<br />
I will make a little installer for it as some point and put it in<br />
/usr/local/bin/system-type<br />
Could use some options as well such as controlling behaviour<br />
Maybe XML output, and put some other values?</p>
<p>Replacement for:</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash
declare -x awk=&quot;/usr/bin/awk&quot;
declare -x ioreg=&quot;/usr/sbin/ioreg&quot;
# Intel and future systems test
declare IOREG=&quot;$(&quot;$ioreg&quot; -l |
	&quot;$awk&quot; 'BEGIN {FS=&quot;[&lt;&gt;]&quot;}
	/.*\&quot;system-type\&quot;.=./{
	systype=$2
	if ( systype == 1 )
		{ print &quot;D&quot; ; exit 0 }
	# System type 1 is a Desktop
	else if ( systype == 2 )
		{ print &quot;L&quot; ; exit 0 }
	# System type 2 is a Laptop
	}')&quot;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wallcity.org/2011/11/system-type-a-new-little-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sample NSStatusItem Application</title>
		<link>http://www.wallcity.org/2011/11/sample-nsstatusitem-application/</link>
		<comments>http://www.wallcity.org/2011/11/sample-nsstatusitem-application/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 00:20:47 +0000</pubDate>
		<dc:creator>acid</dc:creator>
				<category><![CDATA[Preso]]></category>
		<category><![CDATA[cocoa]]></category>

		<guid isPermaLink="false">http://www.wallcity.org/?p=472</guid>
		<description><![CDATA[
Here is the sample NSStatusItem Application
 mentioned in my slides at Mac Tech Conf 2011 can be found here:
https://github.com/acidprime/StatusItem/downloads
]]></description>
			<content:encoded><![CDATA[<p><img style="display:block; margin-left:auto; margin-right:auto;" src="http://www.wallcity.org/wp-content/uploads/2011/11/NewImage.png" alt="ScriptMenu" title="NewImage.png" border="0" width="227" height="148" /></p>
<p>Here is the sample NSStatusItem Application<br />
 mentioned in my slides at <a href="http://www.mactech.com/conference">Mac Tech Conf 2011</a> can be found here:</p>
<p><a href="https://github.com/acidprime/StatusItem/downloads">https://github.com/acidprime/StatusItem/downloads</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wallcity.org/2011/11/sample-nsstatusitem-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with Textmate URI links</title>
		<link>http://www.wallcity.org/2011/03/textmate-uri-links/</link>
		<comments>http://www.wallcity.org/2011/03/textmate-uri-links/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 03:22:49 +0000</pubDate>
		<dc:creator>acid</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.wallcity.org/?p=461</guid>
		<description><![CDATA[So I have been doing allot of custom cocoa URL code over the last week, so I thought I would go look around for applications that have custom URL types. In my search I found the following url type for TextMate (txtmt). Here is an example that will open up text mates own info.plist and [...]]]></description>
			<content:encoded><![CDATA[<p>So I have been doing allot of custom cocoa URL code over the last week, so I thought I would go look around for applications that have custom URL types. In my search I found the following url type for <a href="http://www.macromates.com/">TextMate</a> (txtmt). Here is an example that will open up text mates own info.plist and show you were these are declared.</p>
<p>txmt://open?url=file:///Applications/TextMate.app/Contents/Resources/Info.plist&#038;line=&#038;column=36<br />
<a href="txmt://open?url=file:///Applications/TextMate.app/Contents/Resources/Info.plist&#038;line=&#038;column=36">Here is an example of this link</a><br />
There is a quick blog post about it <a href="http://blog.macromates.com/2007/the-textmate-url-scheme/" target="_blank">here</a> on their site. All in all I can see some pretty cool ideas for this, such as what I am big fan of which is interactive documentation. I am a big URL nerd and to mention one other cool one I knew about previously is<a href="http://www.panic.com/"> transmit&#8217;s</a> transmitreg:// which they use for serial numbers ,an awesome way to fill in serials that every vendor should do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wallcity.org/2011/03/textmate-uri-links/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Converting a Check Box value to Boolean</title>
		<link>http://www.wallcity.org/2011/03/converting-a-check-box-value-to-boolean/</link>
		<comments>http://www.wallcity.org/2011/03/converting-a-check-box-value-to-boolean/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 02:05:35 +0000</pubDate>
		<dc:creator>acid</dc:creator>
				<category><![CDATA[cocoa]]></category>

		<guid isPermaLink="false">http://www.wallcity.org/?p=453</guid>
		<description><![CDATA[Here is simple little objective c method that will take a IBOutlet and query its value to return a boolean. I typically need to do this to run a logical test on the interface value. My guess is properties &#038; bindings are the better way to do this but as BOOL is not an object [...]]]></description>
			<content:encoded><![CDATA[<p>Here is simple little objective c method that will take a IBOutlet and query its value to return a boolean. I typically need to do this to run a logical test on the interface value. My guess is properties &#038; bindings are the better way to do this but as BOOL is not an object  I am not quite sure how that would be done.</p>
<pre class="brush: cpp; title: ; notranslate">
-(BOOL)evaluateCheckBox:(NSButton *)evalButton
{
	// Gather data from interface
	if ( [evalButton state] == NSOnState ){
		return YES;
	}
	if ( [evalButton state] == NSOffState ){
		return NO;
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wallcity.org/2011/03/converting-a-check-box-value-to-boolean/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>European Macintosh System Administrators Meeting 2011</title>
		<link>http://www.wallcity.org/2011/03/european-macintosh-system-administrators-meeting-2011/</link>
		<comments>http://www.wallcity.org/2011/03/european-macintosh-system-administrators-meeting-2011/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 02:22:34 +0000</pubDate>
		<dc:creator>acid</dc:creator>
				<category><![CDATA[Preso]]></category>

		<guid isPermaLink="false">http://www.wallcity.org/?p=447</guid>
		<description><![CDATA[
Well its official , I will be speaking at the European Macintosh System Administrators Meeting 2011 in Göteborg, Sweden. Check out the details here.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://macsysadmin.se/2011/Home.html"><img src="http://macsysadmin.se/2011/Home_files/MacSysAdmin%2061.jpg" alt="" width="427" height="197" /></a></p>
<p>Well its official , I will be speaking at the European Macintosh System Administrators Meeting 2011 in Göteborg, Sweden. Check out the details <a href="http://macsysadmin.se/2011/Home.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wallcity.org/2011/03/european-macintosh-system-administrators-meeting-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pull the Script Name in BASH</title>
		<link>http://www.wallcity.org/2011/03/pull-the-script-name-in-bash/</link>
		<comments>http://www.wallcity.org/2011/03/pull-the-script-name-in-bash/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 08:56:57 +0000</pubDate>
		<dc:creator>acid</dc:creator>
				<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://www.wallcity.org/?p=428</guid>
		<description><![CDATA[I very often use the Script Name as the log file name, it allows me to make the logs
always match up to the script even though the code is the same in all scripts
here is a quick example on how to do that


#!/bin/bash
declare -x SCRIPT_PATH=&#34;$0&#34;
declare -x SCRIPT_NAME=&#34;${0##*/}&#34;

echo $SCRIPT_PATH

echo $SCRIPT_NAME

 A more raw example (Same Output):

#!/bin/bash
echo [...]]]></description>
			<content:encoded><![CDATA[<pre>I very often use the Script Name as the log file name, it allows me to make the logs
always match up to the script even though the code is the same in all scripts
here is a quick example on how to do that
<pre class="brush: bash; title: ; notranslate">

#!/bin/bash
declare -x SCRIPT_PATH=&quot;$0&quot;
declare -x SCRIPT_NAME=&quot;${0##*/}&quot;

echo $SCRIPT_PATH

echo $SCRIPT_NAME
</pre>
<p> A more raw example (Same Output):
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash
echo $0
echo ${0##*/}
</pre>
<p> Output:
<pre class="brush: bash; title: ; notranslate">
/Users/acid/Dropbox/code/bash/scriptname.sh
scriptname.sh
</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wallcity.org/2011/03/pull-the-script-name-in-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Folder Loop with Exclusions</title>
		<link>http://www.wallcity.org/2011/03/simple-folder-loop-with-exclusions/</link>
		<comments>http://www.wallcity.org/2011/03/simple-folder-loop-with-exclusions/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 00:31:45 +0000</pubDate>
		<dc:creator>acid</dc:creator>
				<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://www.wallcity.org/?p=419</guid>
		<description><![CDATA[


Here is a little loop that can exclude folders, I started it for some find
code that would exclude "system" files during a permissions change.

#!/bin/bash
OLDIFS=&#34;$IFS&#34;
IFS=$'\n'
for FOLDER in /* ; do
 [ -L &#34;$FOLDER&#34; ] &#38;&#38; continue
 if [ -d &#34;$FOLDER&#34; ] ; then
 if  [ &#34;$FOLDER&#34; != '/Volumes' ] &#38;&#38;
 [ &#34;$FOLDER&#34; != '/System' ] [...]]]></description>
			<content:encoded><![CDATA[<pre>
<pre>
<div id="_mcePaste">
<pre>Here is a little loop that can exclude folders, I started it for some find
code that would exclude "system" files during a permissions change.
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash
OLDIFS=&quot;$IFS&quot;
IFS=$'\n'
for FOLDER in /* ; do
 [ -L &quot;$FOLDER&quot; ] &amp;&amp; continue
 if [ -d &quot;$FOLDER&quot; ] ; then
 if  [ &quot;$FOLDER&quot; != '/Volumes' ] &amp;&amp;
 [ &quot;$FOLDER&quot; != '/System' ] &amp;&amp;
 [ &quot;$FOLDER&quot; != '/Network' ] &amp;&amp;
 [ &quot;$FOLDER&quot; != '/Recycled' ] &amp;&amp;
 [ &quot;$FOLDER&quot; != '/cores' ] &amp;&amp;
 [ &quot;$FOLDER&quot; != '/dev' ] &amp;&amp;
 [ &quot;$FOLDER&quot; != '/net' ]
 then
 echo &quot;$FOLDER&quot;
 fi
 fi
done
IFS=&quot;$OLDIFS&quot;
</pre>
</pre>
</div>
</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wallcity.org/2011/03/simple-folder-loop-with-exclusions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple BASH Console User Check</title>
		<link>http://www.wallcity.org/2011/03/simple-console-check/</link>
		<comments>http://www.wallcity.org/2011/03/simple-console-check/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 00:19:26 +0000</pubDate>
		<dc:creator>acid</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.wallcity.org/?p=411</guid>
		<description><![CDATA[I have seen this in done pretty much the same way in all languages, so my continued effort to give away all my bash scripts so I never have to use it again, here is a quick little example of who to check for console users with bash,who and awk.

#!/bin/bash
declare -x who=&#34;${who:=&#34;/usr/bin/who&#34;}&#34;
declare -x awk=&#34;${awk:=&#34;/usr/bin/awk&#34;}&#34;
declare -xi [...]]]></description>
			<content:encoded><![CDATA[<p>I have seen this in done pretty much the same way in all languages, so my continued effort to give away all my bash scripts so I never have to use it again, here is a quick little example of who to check for console users with bash,who and awk.</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash
declare -x who=&quot;${who:=&quot;/usr/bin/who&quot;}&quot;
declare -x awk=&quot;${awk:=&quot;/usr/bin/awk&quot;}&quot;
declare -xi CONSOLE_USERS=&quot;$($who |
		$awk '/.*console/{++n}END{print n}')&quot;
declare -x CONSOLE_USER=&quot;$($who |
		$awk '/console/{print $1;exit}' )&quot;
if [ $CONSOLE_USERS -eq 0 ] ; then
	echo &quot;No console users present&quot;
else
	echo &quot;$CONSOLE_USER is logged in&quot;
fi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wallcity.org/2011/03/simple-console-check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

