<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkYDQ3s9cCp7ImA9WhVUF0U.&quot;"><id>tag:blogger.com,1999:blog-10753561</id><updated>2012-05-23T09:36:12.568-04:00</updated><category term="logging" /><category term="flash" /><category term="bug" /><category term="conversion" /><category term="cloud-storage" /><category term="selenium" /><category term="memento" /><category term="algorithms" /><category term="duck-typing" /><category term="cfcunit" /><category term="query" /><category term="daos" /><category term="getfullyear" /><category term="iteration" /><category term="software development" /><category term="t-sql" /><category term="applescript" /><category term="picasa" /><category term="breadcrumbs" /><category term="distance" /><category term="email" /><category term="pets" /><category term="taskswitchxp" /><category term="c++" /><category term="plsql" /><category term="baseball" /><category term="virtual-machine" /><category term="facebook" /><category term="scripting" /><category term="whiteboard" /><category term="semantic" /><category term="java" /><category term="site-feature" /><category term="webservices" /><category term="friendfeed" /><category term="ical" /><category term="graphics" /><category term="sci-fi" /><category term="unittesting" /><category term="google-chrome" /><category term="int" /><category term="rownum" /><category term="citrix" /><category term="filestream" /><category term="google-adsense" /><category term="delicious" /><category term="mac" /><category term="unit testing" /><category term="pear" /><category term="ubuntu" /><category term="blogging" /><category term="svn" /><category term="google" /><category term="ruby" /><category term="virtualization" /><category term="smtp" /><category term="gparted" /><category term="visual-studio" /><category term="grandcentral" /><category term="fitpro" /><category term="groupthink" /><category term="percent" /><category term="nUnit" /><category term="geeks" /><category term="cf9" /><category term="lua" /><category term="openoffice" /><category term="web-browsers" /><category term="project planning" /><category term="video-conferencing" /><category term="frameworks" /><category term="opensource" /><category term="editplus" /><category term="computer" /><category term="sql-server-2005" /><category term="docking" /><category term="huntington-wv" /><category term="doubleclick" /><category term="tdd" /><category term="cf8" /><category term="nokogiri::xml::nodeset" /><category term="classifieds" /><category term="automator" /><category term="tricks" /><category term="handbrake" /><category term="p2p" /><category term="picasaweb" /><category term="newspaper" /><category term="music" /><category term="yslow" /><category term="freeware" /><category term="dependency-injection" /><category term="sizer" /><category term="webhooks" /><category term="regex" /><category term="meta" /><category term="turing" /><category term="fit" /><category term="data structures" /><category term="sql" /><category term="unix" /><category term="twitter" /><category term="virus" /><category term="icalendar" /><category term="samba" /><category term="standards" /><category term="comma" /><category term="macports" /><category term="decimal" /><category term="gmail" /><category term="calendar" /><category term="installation" /><category term="firebug" /><category term="junit" /><category term="clob" /><category term="unit-testing" /><category term="slickedit" /><category term="tails" /><category term="dpc" /><category term="at+t" /><category term="phone" /><category term="library" /><category term="dell" /><category term="source-code" /><category term="windows xp" /><category term="continuous-integration" /><category term="css" /><category term="googleFiberHTG" /><category term="fantasy" /><category term="row_number" /><category term="access-denied" /><category term="pl/sql developer" /><category term="repair" /><category term="wordwrap" /><category term=".net" /><category term="float" /><category term="folder-action" /><category term="palin" /><category term="utility" /><category term="xml" /><category term="mysql" /><category term="table-of-contents" /><category term="lightning" /><category term="web3.0" /><category term="regular expression" /><category term="offtopic" /><category term="image-manipulation" /><category term="elevation-api" /><category term="extended-ascii" /><category term="oracleclob" /><category term="seleniumMX" /><category term="webdevelopment" /><category term="android" /><category term="xcode" /><category term="integration" /><category term="sql-server" /><category term="applications devleopment" /><category term="priorities" /><category term="dropbox" /><category term="modeling" /><category term="itunes" /><category term="ping.fm" /><category term="prototype" /><category term="enums" /><category term="recursion" /><category term="structured blogging" /><category term="dragdrop" /><category term="yahoo" /><category term="customtags" /><category term="design patterns" /><category term="google-calendar" /><category term="songs" /><category term="javascript" /><category term="fitrunner" /><category term="coldfusion" /><category term="binary-search" /><category term="critical trip point" /><category term="daydreaming" /><category term="map" /><category term="sports-songs" /><category term="string.spllit" /><category term="http" /><category term="photos" /><category term="yahoo-pipes" /><category term="console" /><category term="doxies" /><category term="social networking" /><category term="scientific-notation" /><category term="amazon" /><category term="browser" /><category term="peer review" /><category term="avi" /><category term="refurbished" /><category term="windows" /><category term="football" /><category term="pipes" /><category term="array_map" /><category term="video-chat" /><category term="pixelspace" /><category term="ant" /><category term="quicksort" /><category term="php" /><category term="patterns" /><category term="stream" /><category term="views" /><category term="random" /><category term="oop" /><category term="weighted arrays" /><category term="null" /><category term="binarysearch" /><category term="beans" /><category term="moveabletype" /><category term="blogger" /><category term="web2.0" /><category term="generics" /><category term="cfeclipse" /><category term="pattern" /><category term="poi" /><category term="windows7" /><category term="coldspring" /><category term="aggregation" /><category term="windows-vista" /><category term="git coldbreadcrumbs" /><category term="inkspace" /><category term="functional-programming" /><category term="resize" /><category term="google+" /><category term="tools" /><category term="books" /><category term="cfunit" /><category term="development" /><category term="vm" /><category term="offline" /><category term="last.fm" /><category term="gateways" /><category term="mountain-lion" /><category term="gdrive" /><category term="parsing" /><category term="api" /><category term="url parsing" /><category term="cf" /><category term="lion" /><category term="chrome" /><category term="win32" /><category term="classification" /><category term="custom-mappings" /><category term="form-processing" /><category term="buzz" /><category term="virii" /><category term="jrun" /><category term="git" /><category term="bug-tracking" /><category term="latitude" /><category term="bookmarklet" /><category term="rss" /><category term="spam" /><category term="mediamonkey" /><category term="resource" /><category term="mashup" /><category term="xmlHttpRequest" /><category term="computation" /><category term="contribution" /><category term="sql server ce" /><category term="iis" /><category term="ics" /><category term="information" /><category term="synchronization" /><category term="memory" /><category term="wordpress" /><category term="genealogy" /><category term="lotus notes" /><category term="ui" /><category term="phone number" /><category term="nokogiri" /><category term="nokogiri::xml::node" /><category term="datetime" /><category term="longitude" /><category term="lootly" /><category term="compact-edition" /><category term="gotcha" /><category term="form-validation" /><category term="subversion" /><category term="ink" /><category term="ioc" /><category term="passport" /><category term="amazon web services" /><category term="support" /><category term="dom" /><category term="nokogiri::xml::reader" /><category term="perl" /><category term="acpi" /><category term="cac-cards" /><category term="executor" /><category term="irb" /><category term="prioritization." /><category term="flock" /><category term="wsdl" /><category term="agilifier" /><category term="tortoisesvn" /><category term="excel" /><category term="data processing" /><category term="linewrap" /><category term="stupid mistakes" /><category term="calendar-aggregation" /><category term="cruisecontrol" /><category term="uml" /><category term="test driven development" /><category term="textarea" /><category term="london" /><category term="anchor" /><category term="share" /><category term="embedded" /><category term="math" /><category term="drawing" /><category term="antfit" /><category term="pivotal-tracker" /><category term="sqlite" /><category term="url-parsing" /><category term="interoperability" /><category term="bookmarks" /><category term="ie" /><category term="tip" /><category term="blackberry" /><category term="computer-science" /><category term="adsense" /><category term="att" /><category term="getyear" /><category term="google-maps" /><category term="numbers" /><category term="cfqueryparam" /><category term="calculator" /><category term="socialthing" /><category term="hardy-heron" /><category term="openid" /><category term="column renaming" /><category term="browser-share" /><category term="plsql_split" /><category term="lottery" /><category term="singleton" /><category term="printing" /><category term="functions" /><category term="hreview" /><category term="validation" /><category term="mapreduce" /><category term="c#" /><category term="urchin" /><category term="firefox" /><category term="maxlength" /><category term="user-defined-function" /><category term="travel" /><category term="iphone" /><category term="cast" /><category term="tips" /><category term="sports" /><category term="shortcuts" /><category term="diagrams" /><category term="surface" /><category term="eclipse" /><category term="model-glue" /><category term="file-sharing" /><category term="aws" /><category term="blogs" /><category term="vb.net" /><category term="partition manager" /><category term="reporting" /><category term="windows-xp" /><category term="reviews" /><category term="heap" /><category term="rpc" /><category term="iis7" /><category term="security" /><category term="dogs" /><category term="subeclipse" /><category term="customer service" /><category term="curation" /><category term="pearl" /><category term="notre dame" /><category term="bash" /><category term="unsafe temperature" /><category term="oracle" /><category term="cardinal-points" /><category term="microformats" /><category term="xUnit" /><category term="caldav" /><category term="social-computing" /><category term="open-standards" /><category term="html" /><category term="factories" /><category term="smarttab" /><category term="plotting" /><category term="screen-resizer" /><category term="testing" /><category term="m4v" /><category term="plugins" /><category term="stubs" /><category term="uri" /><category term="cpu-usage" /><category term="singletons" /><category term="debugging" /><category term="alttab" /><category term="apple" /><category term="udf" /><category term="im" /><category term="enumerations" /><category term="whine" /><category term="read-write-web" /><category term="string" /><category term="blatant self promotion" /><category term="ryanparker" /><category term="herald-dispatch" /><category term="python" /><category term="issues" /><category term="graphing" /><category term="sugarsync" /><category term="chat" /><category term="thunderbird" /><category term="blackberry bold" /><category term="smart-quotes" /><category term="apache" /><category term="linux" /><category term="google-voice" /><category term="ajax" /><category term="objectmother" /><category term="chrome-os" /><category term="sorting" /><category term="draft" /><category term="blog" /><category term="ascii" /><category term="period" /><category term="cruisecontrol.rb" /><category term="bold" /><category term="outlook" /><category term="microsoft" /><category term="cfc" /><category term="seamcarving" /><category term="mxunit" /><category term="utilities" /><category term="google-analytics" /><title>In the Trenches</title><subtitle type="html">Covering Software Engineering, ColdFusion, Java, Design Patterns, .Net, and a smattering of other languages from deep in the trenches.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://code.rawlinson.us/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://code.rawlinson.us/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>338</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/InTheTrenches" /><feedburner:info uri="inthetrenches" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CEcFSXw9eip7ImA9WhVWE0s.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-1299299593050373663</id><published>2012-04-25T09:53:00.000-04:00</published><updated>2012-04-25T09:53:38.262-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-25T09:53:38.262-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="gdrive" /><category scheme="http://www.blogger.com/atom/ns#" term="cloud-storage" /><category scheme="http://www.blogger.com/atom/ns#" term="photos" /><category scheme="http://www.blogger.com/atom/ns#" term="dropbox" /><category scheme="http://www.blogger.com/atom/ns#" term="sugarsync" /><title>Cloud Storage - What's a Guy to Do?</title><content type="html">I have a lot of photos; but I'm no photographer. &amp;nbsp;In fact, most of the photos are the sucky kind that only members of my family could ever like. &amp;nbsp;But we do like them - they represent various important moments in our lives. &amp;nbsp;Thus, it is important to me that I preserve them.&lt;br /&gt;
&lt;br /&gt;
A few years ago a friend of mine had his photo harddrive crash on him. &amp;nbsp;He didn't have a backup. &amp;nbsp;He lost a lot of photos that were incredibly important to him. &amp;nbsp;That hit home pretty hard so I made sure to keep a physically synced external harddrive backup of all my photos.&lt;br /&gt;
&lt;br /&gt;
A year later another friend came to me looking for help. &amp;nbsp;His laptop and his external harddrive had both died at the same time; probably some kind of power surge or something. &amp;nbsp;Either way, he had lost all of his photos that he had religiously backed up to his external harddrive. &amp;nbsp;That hit home again so I started syncing my photos to the cloud.&lt;br /&gt;
&lt;br /&gt;
I signed up with TextDrive along time ago. &amp;nbsp;They are &lt;a href="http://www.joyent.com/"&gt;Joyent&lt;/a&gt; now; but when I signed up as part of their "Mixed Lunch" plan or something like that the account came with a few bonuses. &amp;nbsp;One was a "&lt;a href="https://www.strongspace.com/"&gt;StrongSpace&lt;/a&gt;" account with 25GB of space. &amp;nbsp;This was way before things like Dropbox existed. &amp;nbsp;The tools provided by TextDrive weren't nill but I found some good windows tools that would SSH to my StrongSpace and do an rsync backup of my photos. &lt;br /&gt;&lt;br /&gt;Then StrongSpace was sold and my space was bumped to 50GB! &amp;nbsp;Perfect, I have about 40GB of photos now. &amp;nbsp;But, StrongSpace kind of sucks for viewing your files online. &amp;nbsp;And, because I basically just backup photos, I wanted a better solution so I paid for the 80GB plan with picasaweb at Google. &amp;nbsp;Then I setup Picasa to sync all my photos there. &amp;nbsp;This had the added benefit of making all of my photos available in the photo gallery of my Android phone. &amp;nbsp;I was pretty happy with my setup; &amp;nbsp;two remote backups and the local external drive.&lt;br /&gt;
&lt;br /&gt;
Then I changed jobs. &amp;nbsp;I took my external laptop with me and hooked it up to my Mac (a new computing experience for me), installed Picasa and told it to sync. &amp;nbsp;It re-uploaded all of my photos and my 80GB was suddenly full. &amp;nbsp;Not good. &amp;nbsp;I ended up installing the Google command line tools and deleting all my photos from picasaweb. &amp;nbsp;I haven't re-synced to that service. &amp;nbsp;Thus my 80GB of space has been laying fallow.&lt;br /&gt;
&lt;br /&gt;
I've used DropBox since about when it came on to the scene; I'm a cloud storage hipster. &amp;nbsp;I love the service but I've been unwilling to spend the $200/year to get 100GB of space. &amp;nbsp;I'm kind of cheap. &amp;nbsp;I have a SkyDrive account through my new job but I never used it so I missed out on getting 25G for free; so I'm stuck at the 7GB entry point announced this week. &amp;nbsp;Plus, I'm not sure Microsoft is really a better option for me than Google is - plus I already have the grandfathered 80GB for $20/year plan on Google so why not use Google Drive?&lt;br /&gt;
&lt;br /&gt;
Well, &lt;a href="http://weblog.raganwald.com/"&gt;Raganwald&lt;/a&gt; is why. &amp;nbsp;He seems like a pretty smart guy and he has some real concerns with Google and his concerns keep me thinking and second guessing my decisions to be so tightly tied into the Google Cloud. &amp;nbsp;I use them for Email, Calendaring, Blogging, Google+, Maps, heck just about everything. &amp;nbsp;Do I have anything to really worry about with Google? &amp;nbsp;I don't know but Reg's concerns keep on niggling in the back of my mind.&lt;br /&gt;
&lt;br /&gt;
Google Drive came out yesterday and my 80GB was bounced to 85GB. &amp;nbsp;That's plenty of room for me to sync all of my photos to it; plus because it works like Dropbox, all the photos will also sync to my home computer - and I can setup a local rsync on it to mirror the images to yet another external harddrive. &amp;nbsp;That would give me four local copies and the two cloud copies. &amp;nbsp;If I lost my photos at that point - well fuck it.&lt;br /&gt;
&lt;br /&gt;
Google Drive has some cool features. &amp;nbsp;I like the way it provides a web-client viewer for so many different file types (35 I think). &amp;nbsp;That in itself is pretty damn handy. &amp;nbsp; But it is one more way to tie myself to Google. &amp;nbsp;They are currently one huge single point of failure for my online life. &amp;nbsp;I don't like single points of failure so I'm tempted to use a different service for my photo syncing. &amp;nbsp;And, if I'm going to switch, maybe I should take Reg's concerns to heart as I pick an alternative; thus I probably want to avoid MS as well. &amp;nbsp;Sure, Microsoft isn't exactly an advertising business like Google is - but it would be&amp;nbsp;naive&amp;nbsp;to think they aren't also in advertising.&lt;br /&gt;
&lt;br /&gt;
So where does that leave me? &amp;nbsp;Here are the options I am considering: &amp;nbsp;Dropbox and SugarSync. &amp;nbsp;Why? Well they are the only two I've either used or have had wholeheartedly recommended to me by other Cloud Storage Hipsters of course. &amp;nbsp;In either case I think I would get the 100GB plan so SugarSync is a full $50 a year cheaper. &amp;nbsp;The question I then have to answer is "Is Dropbox worth an additional $50/year?" &amp;nbsp;And, remember, I'm kind of cheap. &amp;nbsp;However, I have to remind myself not to compare the pricing of either with that offered by Google since Google augments my low rate by mining my data.&lt;br /&gt;
&lt;br /&gt;
Here is &lt;a href="http://news.cnet.com/8301-1023_3-57419587-93/google-drive-is-not-for-everyone-so-try-these-alternatives/"&gt;an article that does a brief rundown of the differences between a variety of different cloud storage services&lt;/a&gt;. &amp;nbsp;Again, I'm just focusing on SugarSync and Dropbox and, honestly, based on this article I can't see a reason to not go with SugarSync for my purpose of keeping all of my photos backed up to the cloud and between my home and work computers.&lt;br /&gt;&lt;br /&gt;So what do you suggest? &amp;nbsp;SugarSync, Dropbox, or is there some other service that just kicks ass, cares about privacy, and will do just what I need at a reasonable cost? &amp;nbsp;Let me know because I need to make a choice!&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-1299299593050373663?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BASZqt-aCkHgF8s8__t5a9N8ZL4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BASZqt-aCkHgF8s8__t5a9N8ZL4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BASZqt-aCkHgF8s8__t5a9N8ZL4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BASZqt-aCkHgF8s8__t5a9N8ZL4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/AE3qawMbCxo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/1299299593050373663/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=1299299593050373663" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1299299593050373663?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1299299593050373663?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/AE3qawMbCxo/cloud-storage-whats-guy-to-do.html" title="Cloud Storage - What's a Guy to Do?" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/04/cloud-storage-whats-guy-to-do.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cDSHY7cSp7ImA9WhVSF04.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-1802925570694393211</id><published>2012-03-14T10:24:00.002-04:00</published><updated>2012-03-14T10:24:39.809-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-14T10:24:39.809-04:00</app:edited><title>Remove Ubunutu Dual Boot with Windows 7</title><content type="html">My linux luck continued with a failure in getting Ubuntu 11.10 to work properly right out of the box so I decided to uninstall it. &amp;nbsp;However, removing it isn't nearly as simple as installing it was. &amp;nbsp;Here are the steps you need:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;You need to remove the linux partition(s) - I used the free tool &lt;a href="http://www.partition-tool.com/personal.htm"&gt;EASUS Partition Master&lt;/a&gt;, removed all of the non windows and non-recovery partitions, and then stretched out my windows partition to reclaim that space.&lt;/li&gt;
&lt;li&gt;After you setup the new partition rules your computer has to reboot. &amp;nbsp;After the bios screen the unix boot loader Grub will still appear offering to start linux or windows. &amp;nbsp;Start windows but then hit f8 to get to the recovery menu for windows.&lt;/li&gt;
&lt;li&gt;Pick to start windows in recovery mode; a graphical user interface will open. &amp;nbsp;Eventually you'll have the chance to pick from a small menu of about eight options, pick the "Command Line" option (or console).&lt;/li&gt;
&lt;li&gt;At the command line enter "bootrec /fixmbr" without the quotes. This will get rid of grub. &amp;nbsp;It's almost instantaneous.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Restart your computer; EASUS Partition Master will then do it's partition resizing foo. &amp;nbsp;This isn't instantaneous so just have some patience.&lt;/li&gt;
&lt;li&gt;You're done.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-1802925570694393211?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kUV3zb6SIv733fmOHumCQvAoxok/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kUV3zb6SIv733fmOHumCQvAoxok/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kUV3zb6SIv733fmOHumCQvAoxok/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kUV3zb6SIv733fmOHumCQvAoxok/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/u10w_I6ZfT0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/1802925570694393211/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=1802925570694393211" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1802925570694393211?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1802925570694393211?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/u10w_I6ZfT0/remove-ubunutu-dual-boot-with-windows-7.html" title="Remove Ubunutu Dual Boot with Windows 7" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/03/remove-ubunutu-dual-boot-with-windows-7.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UBQ30zeSp7ImA9WhVTFUs.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-3849130107984081671</id><published>2012-02-29T19:23:00.003-05:00</published><updated>2012-02-29T20:27:32.381-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-29T20:27:32.381-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iis7" /><category scheme="http://www.blogger.com/atom/ns#" term="windows" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><category scheme="http://www.blogger.com/atom/ns#" term="pear" /><title>Install PHP PEAR on Windows 7</title><content type="html">This seems like it should be obvious but it turns out getting PEAR isn't straight forward. &amp;nbsp;The documentation at pear.php.net is inaccurate for a windows install where you use the installer at php.iis.net to install PHP on IIS7. It turns out there is no go-pear.bat file in your php directory after installing this way. &amp;nbsp;However, after some trial and error and a bit of luck I figured out this seven steps to getting PEAR installed.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Download go-pear.phar at&amp;nbsp;&lt;a href="http://pear.php.net/go-pear.phar"&gt;http://pear.php.net/go-pear.phar&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;put that file in your php home directory.&lt;/li&gt;
&lt;li&gt;open a command window as administrator; move to your php home directory&lt;/li&gt;
&lt;li&gt;enter "php go-pear.phar" without quotes&lt;/li&gt;
&lt;li&gt;accept the default value for everything it asks about; system wide, path options, updating your php.ini etc&lt;/li&gt;
&lt;li&gt;once the script is done pear is installed; you just have one last step&lt;/li&gt;
&lt;li&gt;in windows explorer go to your php home directory and double click on PEAR_ENV.reg to update your registry&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-3849130107984081671?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BnH9ZvDxUAmgZwhUcL-30jV9g80/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BnH9ZvDxUAmgZwhUcL-30jV9g80/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BnH9ZvDxUAmgZwhUcL-30jV9g80/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BnH9ZvDxUAmgZwhUcL-30jV9g80/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/QmVanc6TPIc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/3849130107984081671/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=3849130107984081671" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3849130107984081671?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3849130107984081671?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/QmVanc6TPIc/install-php-pear-on-windows-7.html" title="Install PHP PEAR on Windows 7" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/02/install-php-pear-on-windows-7.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YAQnoycSp7ImA9WhVTFUg.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-9066373321399956432</id><published>2012-02-29T16:32:00.000-05:00</published><updated>2012-02-29T16:32:23.499-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-29T16:32:23.499-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="map" /><category scheme="http://www.blogger.com/atom/ns#" term="smart-quotes" /><category scheme="http://www.blogger.com/atom/ns#" term="array_map" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title>PHP array_map in practice</title><content type="html">Last week I spent some time making sure I understood how map and reduce actually work and what their purposes are. &amp;nbsp;This week I needed to use map while fixing a silly problem. &amp;nbsp;Some of this background info will be pure cruft to most of you but hopefully it will be enlightening in it's own way.&lt;br /&gt;
&lt;br /&gt;
There is an application somewhere in our organization that utilizes an access database to store a catalog of information. &amp;nbsp;This catalog is then made available for consumption within our web properties via a webservice that is written in php and which returns the data contained within the database in either json or xml format.&lt;br /&gt;
&lt;br /&gt;
Here is the basic way the json was being generated previously:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="php" name="code"&gt;
 $rs=odbc_exec($conn,$sql);

 //declare an array to hold the query results
 $data = array();
 
 //populate the jobs array with the query result set
 while($curRow = odbc_fetch_array($rs)){
  $data[] = $curRow;
 } 
 echo json_encode(array('jobs'=&amp;gt;$jobs));
&lt;/pre&gt;
Very straight forward and, it appeared to work well until today.  Someone copied and pasted a descriptive field of one of the catalog items from a word document into the access database and a single smart quote (apostrophe really) worked its way into the data.  When this happened that field was rendered in the json as null even though there was clearly data contained within.
&lt;br /&gt;
It took me a little while to see that it was a smart quote buried in the middle of the paragraph of text but once I did I knew right away how to clean it out - using MAP; or in php paralance, array_map.  Combined with this nice function to &lt;a href="http://shiflett.org/blog/2005/oct/convert-smart-quotes-with-php"&gt;convert smart quotes&lt;/a&gt; I had a winning solution on my hand without having to add much code at all.  Here is the final version of that same code:
&lt;br /&gt;
&lt;pre class="php" name="code"&gt;
 $rs=odbc_exec($conn,$sql);

 //declare an array to hold the query results
 $data = array();
 
 //populate the jobs array with the query result set
 while($curRow = odbc_fetch_array($rs)){
  $data[] = array_map("convert_smart_quotes",$curRow);
 } 
 echo json_encode(array('jobs'=&amp;gt;$jobs));
&lt;/pre&gt;

Just updating that one line in the middle of my while loop let me make sure that every element in every row was clean of nasty smart quotes by telling array_map to call the convert_smart_quotes function on each element.  I have to say I really do like the power and simplicity of map (and reduce).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-9066373321399956432?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VlADNwdZqJlIFnEGE4fDAjoEfdA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VlADNwdZqJlIFnEGE4fDAjoEfdA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VlADNwdZqJlIFnEGE4fDAjoEfdA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VlADNwdZqJlIFnEGE4fDAjoEfdA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/pXBcmItecEQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/9066373321399956432/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=9066373321399956432" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/9066373321399956432?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/9066373321399956432?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/pXBcmItecEQ/php-arraymap-in-practice.html" title="PHP array_map in practice" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/02/php-arraymap-in-practice.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEINRn84fSp7ImA9WhVWFUg.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-8514255530740419403</id><published>2012-02-27T13:24:00.001-05:00</published><updated>2012-04-27T15:56:37.135-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-27T15:56:37.135-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="macports" /><category scheme="http://www.blogger.com/atom/ns#" term="xcode" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><category scheme="http://www.blogger.com/atom/ns#" term="mountain-lion" /><category scheme="http://www.blogger.com/atom/ns#" term="lion" /><title>Rollback from Mountain Lion to Lion</title><content type="html">&lt;b&gt;&lt;span style="color: red;"&gt;Disclaimer: Before you do this; if it doesn't work you can't blame me. &amp;nbsp;It worked OK for me but maybe I was just lucky.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Ok, with that out of the way here's the lowdown. &amp;nbsp;I installed the developer preview of Mac OS X Mountain Lion and immediately started to notice some things that I really needed wouldn't work anymore. &amp;nbsp;No parallels, macports had issues and couldn't compile things with XCode 4.4 (what is required for Mt Lion), and quite a bit more dealing with things that depended on macports or the compiler within xcode.&lt;br /&gt;
&lt;br /&gt;
So what did I do? &amp;nbsp;I tried to be creative and everything failed.&lt;br /&gt;
&lt;br /&gt;
Oh, and I didn't have a time machine snapshot of my system before the upgrade. &amp;nbsp; Anyway, I eventually went to google to find some solutions and found this posting explaining how to &lt;a href="http://kurrytran.blogspot.com/2012/02/how-to-uninstall-mountain-lion-os-x.html"&gt;install uninstall Mountain Lion&lt;/a&gt; except it doesn't show you how to uninstall Mountain Lion at all; it just shows you how to install Lion on another partition. &amp;nbsp;It does, however, have the key to the castle so to speak and I'll get into that in a little bit.&lt;br /&gt;
&lt;br /&gt;
Before you can install Lion you need a copy of Lion. &amp;nbsp;Makes sense right? &amp;nbsp;Well I didn't have a copy but the aforementioned post told me I could get it using my apple dev center account but then it said I couldn't&amp;nbsp;because&amp;nbsp;I was running mountain lion and that I'd need to get it another way. &amp;nbsp;Well damn.&lt;br /&gt;
&lt;br /&gt;
Later in the article he said you have to fool the system to let you install lion on the other partition by changing the version number of Mountain Lion. &amp;nbsp;I thought, well, what if I just do that now so I can get a copy of Lion and BAM! it worked. &amp;nbsp;So here are the basic steps.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&amp;nbsp;I use sublime as my text editor and I have a command alias to launch sublime using the word sublime from the terminal..&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;$ sublime&amp;nbsp;&lt;span style="background-color: white; color: #4f4f4f; font-size: 13px; line-height: 18px; text-align: left;"&gt;/System/Library/CoreServices/SystemVersion.plist&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;It will ask you for your password; enter it then change the two version instances from 10.8 to 10.7&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;Save the file; you'll be asked for your password again; enter it.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;Now download Lion. &amp;nbsp;If you don't have an dev center account I guess you can pay the $30.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;wait a while. &amp;nbsp;Lion is big and it takes a long time to download. &amp;nbsp;It kind of freaked me out because it showed it going into my "Applications" at first but then it felt like nothing was happening. &amp;nbsp;Have some patience; go read reddit for a while.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;Eventually the download will finish and the Lion installer will open automatically. &amp;nbsp;Notice, nowhere in this list did I tell you to make a new partition. &amp;nbsp;Screw that step!&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;Install right over mountain lion. &amp;nbsp;Just pick the partition you normally have things on and GO.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: red; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;&lt;b&gt;WAIT WAIT.. finish reading this before you go...IT'S REALLY IMPORTANT&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;When the install is done your machine will reboot and prompt you to login but you won't be able to. &lt;a href="http://www.gibni.com/cant-login-after-os-x-lion-install-solved"&gt;&amp;nbsp;Lion hates your old passwords and gets rid of them all&lt;/a&gt; - you can't login yet. &amp;nbsp;Just reboot again and wait for the screen to go completely black then hold down &amp;nbsp;cmd+r&amp;nbsp;&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;HOLD THEM DOWN; don't just press and release. &amp;nbsp;HOLD THEM BOTH until a window opens called "Utilities"&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;In the main menu bar there is a services option, click on it and find terminal. &amp;nbsp;If it isn't services just look in each menu until you find terminal; open terminal&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;in the terminal window type "resetpassword" without the quotes and hit enter&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;A new windows opens and it shows you all of your old accounts. &amp;nbsp;Find yours and reset your password.&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;While you're at it reset the administrator password.&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;Once your down with that close all the windows then in the system menu pick restart&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;This time you don't have to hold down any keys.&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;Eventually the login screen will pop up; login as yourself&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;Now go to the system menu and install any updates so you're nice and secure.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
That worked for me (I also reinstalled xcode 4.3 from the app store after that).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Good luck&lt;/div&gt;
&lt;br /&gt;
-------&lt;br /&gt;
Some&amp;nbsp;additional&amp;nbsp;notes:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;After you re-install XCode 4.3; go to preferences, downloads, and install the command line tools&lt;/li&gt;
&lt;li&gt;I also reinstalled macports to be on the safe side&lt;/li&gt;
&lt;li&gt;parallels still doesn't work for me after the rollback.. I will reinstall parallels and hope for the best &lt;b&gt;UPDATE:&lt;/b&gt; uninstall and reinstall fixed it.&lt;/li&gt;
&lt;li&gt;because of some changes to mail; rolling back left me with a broken mail app; not a deal breaker as I can just use outlook as we get our mail from an exchange server at the office.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;UPDATE&lt;/b&gt;: you can't use the systems preferences panel for setting desktop backgrounds after doing this. &amp;nbsp;You can still set your primary monitor background using the "right click, services menu" on the image you wan to make your wallpaper.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-8514255530740419403?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uG4Ll3aJhaBY1bEfmzyt_PQo7BY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uG4Ll3aJhaBY1bEfmzyt_PQo7BY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uG4Ll3aJhaBY1bEfmzyt_PQo7BY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uG4Ll3aJhaBY1bEfmzyt_PQo7BY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/Ox_IgHOT2p8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/8514255530740419403/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=8514255530740419403" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/8514255530740419403?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/8514255530740419403?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/Ox_IgHOT2p8/rollback-from-mountain-lion-to-lion.html" title="Rollback from Mountain Lion to Lion" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>9</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/02/rollback-from-mountain-lion-to-lion.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMESHY-eyp7ImA9WhRbGEk.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-3168018163570127583</id><published>2012-02-09T23:33:00.001-05:00</published><updated>2012-02-09T23:33:29.853-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-09T23:33:29.853-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="m4v" /><category scheme="http://www.blogger.com/atom/ns#" term="handbrake" /><category scheme="http://www.blogger.com/atom/ns#" term="avi" /><category scheme="http://www.blogger.com/atom/ns#" term="applescript" /><category scheme="http://www.blogger.com/atom/ns#" term="itunes" /><category scheme="http://www.blogger.com/atom/ns#" term="automator" /><category scheme="http://www.blogger.com/atom/ns#" term="apple" /><title>Handbrake, Applescript, Automator, and iTunes Together as a Folder Action</title><content type="html">Yesterday I posted about my initial attempt at automatically converting .avi files with handbrake to m4v files and having them automatically added to iTunes. &amp;nbsp;That plan worked fine if the items dropped into my watched folder were all of the type .avi AND they weren't in a subdirectory.&lt;br /&gt;
&lt;br /&gt;
Tonight I decided to try and address these two deficincies. &amp;nbsp;First I can now handle the case where a folder is the "input" parameter; though my knowledge of applescript is so deficient I can only deal with one layer of directory heirarchy - sorry, no recursion. &amp;nbsp;I also now test for the extension of the file being processed to make sure it is an .avi before proceeding (otherwise I just skip the file).&lt;br /&gt;
&lt;br /&gt;
Yesterday I also made the script look a little more generic by hiding some of the elements of my directory structure by using words like "me" - today I decided to just post it as I wrote it. &amp;nbsp;You will have to change some variable values to make this work on your system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;on run {input, parameters}
 repeat with x in input

  -- need to determine if input is a file or a directory..
  set details to (info for x without size)
  set allFiles to {}

  if kind of details is "folder" then
   -- if it is a folder, we need to grab all the contents as a list
   set tempFiles to list folder (x) without invisibles
   repeat with y in tempFiles
    set the end of allFiles to ((x as string) &amp;amp; y) as alias
   end repeat
  else
   -- if it is a file then we make a one item list..
   set the end of allFiles to x as alias
  end if
  
  -- now loop over the list we just made.
  repeat with i in allFiles
   
   -- only process avi files.
   if name extension of (info for i) is "avi" then
    try
     set text item delimiters to ":"
     set file_name to last text item of (i as text)
     set text item delimiters to ""
    on error
     set text item delimiters to ""
    end try
    
    set origFilepath to quoted form of POSIX path of (i as alias)
    set newFileName to "" &amp;amp; (characters 1 thru -5 of file_name as string) &amp;amp; ".m4v"
    set newFilepath to "/Users/bill/temp_movies/mp4/" &amp;amp; newFileName &amp;amp; ""
    
    
    --apple uses colons as delimiters while the  Untitled=drive; Users=directory; me=username; mp4=temp directory..
    set finalPath to ("Untitled:Users:bill:temp_movies:mp4:" &amp;amp; newFileName)
    
    
    --start the conversion; shell command uses the forward slash as the delimiter; hence two finalpath defined.
    set shellCommand to "nice /Applications/HandBrakeCLI -i " &amp;amp; origFilepath &amp;amp; " -o " &amp;amp; newFilepath &amp;amp; " --preset=\"AppleTV 2\";"
    do shell script shellCommand
    
    --I've told itunes to copy files on import; this way I don't have m4v's laying all over the place
    tell application "iTunes"
     add finalPath
    end tell
    
    --after the import is done I delete the m4v file I just created (from the temp directory)
    tell application "Finder"
     delete finalPath
    end tell
    
    -- prepare the movie for later deletion..
    set trashPath to "Untitled:Users:bill:temp_movies:to_trash:"
    tell application "Finder"
     move i to folder trashPath
    end tell
   end if
  end repeat
 end repeat
 return input
end run
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-3168018163570127583?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RxxHxYgbMsVo-AfDek5alskVAPY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RxxHxYgbMsVo-AfDek5alskVAPY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RxxHxYgbMsVo-AfDek5alskVAPY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RxxHxYgbMsVo-AfDek5alskVAPY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/xLwQZc8_PvA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/3168018163570127583/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=3168018163570127583" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3168018163570127583?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3168018163570127583?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/xLwQZc8_PvA/handbrake-applescript-automator-and.html" title="Handbrake, Applescript, Automator, and iTunes Together as a Folder Action" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/02/handbrake-applescript-automator-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MCRXg5eSp7ImA9WhRbF0Q.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-2597278994803871217</id><published>2012-02-08T23:44:00.000-05:00</published><updated>2012-02-09T08:51:04.621-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-09T08:51:04.621-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="m4v" /><category scheme="http://www.blogger.com/atom/ns#" term="conversion" /><category scheme="http://www.blogger.com/atom/ns#" term="folder-action" /><category scheme="http://www.blogger.com/atom/ns#" term="handbrake" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><category scheme="http://www.blogger.com/atom/ns#" term="avi" /><category scheme="http://www.blogger.com/atom/ns#" term="applescript" /><category scheme="http://www.blogger.com/atom/ns#" term="automator" /><title>Automatically convert .avi to .m4v and add to iTunes using Automator</title><content type="html">That is a long title but not nearly as long and arduous as my process of figuring out how to do what it says. &amp;nbsp;Here is the scenario...&lt;br /&gt;
&lt;br /&gt;
Let's say you and your mom are sharing a dropbox folder and she plops in an .avi of her recent performance in the community theater where she lives. &amp;nbsp;You don't really like the avi format and would prefer it in the m4v format and inside iTunes so you can watch it on your TV using your apple tv. &amp;nbsp;What is one way to do that?&lt;br /&gt;
&lt;br /&gt;
Well, I'm going to tell you. &amp;nbsp;Now, trust me, this probably isn't the best way; but it works and that's all I wanted. &amp;nbsp;Initially I tried the export movies task in automator but the resultant video wasn't working in iTunes - I'm not sure why. &amp;nbsp;Therefore I resulted to using the Handbrake CLI from within an apple script via automator. &amp;nbsp;Here is the script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;on run {input, parameters}
 repeat with i in input
  try
   set text item delimiters to ":"
   set file_name to last text item of (i as text)
   set text item delimiters to ""
  on error
   set text item delimiters to ""
  end try
  
  set origFilepath to quoted form of POSIX path of (i as alias)
  set newFileName to "" &amp;amp; (characters 1 thru -5 of file_name as string) &amp;amp; ".m4v"
  set newFilepath to "/Users/me/mp4/" &amp;amp; newFileName &amp;amp; ""
  

  --apple uses colons as delimiters while the  Untitled=drive; Users=directory; me=username; mp4=temp directory..
  set finalPath to ("Untitled:Users:me:mp4:" &amp;amp; newFileName)
  
  
  --start the conversion; shell command uses the forward slash as the delimiter; hence two finalpath defined.
  set shellCommand to "nice /Applications/HandBrakeCLI -i " &amp;amp; origFilepath &amp;amp; " -o " &amp;amp; newFilepath &amp;amp; " --preset=\"AppleTV 2\";"
  do shell script shellCommand
  
  --I've told itunes to copy files on import; this way I don't have m4v's laying all over the place
  tell application "iTunes"
   add finalPath
  end tell
  
  --after the import is done I delete the m4v file I just created (from the temp directory)
  tell application "Finder"
   delete finalPath
  end tell
  
 end repeat
 
 return input
end run
&lt;/pre&gt;
&lt;br /&gt;
Basically to use this you create a new automator "Folder Action" using an "Apple Script"  paste this entire thing into the script (replacing anything apple puts there by default).  Then pick the folder you want to watch.  I noticed that the task usually fires off about 10 seconds after an .avi file shows up in the directory.&lt;br /&gt;
&lt;br /&gt;
This still needs something to confirm the file that just plopped into the watch directory is an actual .avi file. &amp;nbsp;I didn't worry about that though it is probably &amp;nbsp;not too hard to add that check (though with apple script and its' crazy syntax I wouldn't bet on it).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-2597278994803871217?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RX_91b4tgQSrRhgZZhlQa4bf9BY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RX_91b4tgQSrRhgZZhlQa4bf9BY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RX_91b4tgQSrRhgZZhlQa4bf9BY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RX_91b4tgQSrRhgZZhlQa4bf9BY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/strsU82OOC8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/2597278994803871217/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=2597278994803871217" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2597278994803871217?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2597278994803871217?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/strsU82OOC8/automatically-convert-avi-to-m4v-and.html" title="Automatically convert .avi to .m4v and add to iTunes using Automator" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/02/automatically-convert-avi-to-m4v-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMMQHcyeCp7ImA9WhRbFkk.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-8031778929063746359</id><published>2012-02-07T16:01:00.001-05:00</published><updated>2012-02-07T16:01:21.990-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-07T16:01:21.990-05:00</app:edited><title>2 Months of Mac : The Good and the Bad</title><content type="html">I started using a mac two months ago after over twenty years of windows use. &amp;nbsp; However, rather than reiterate my opinion on both of my blogs (personal and technical) I've posted the full story over on my personal blog and I'm just putting a link to it here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://blog.rawlinson.us/two-months-with-a-mac-the-good-and-the-bad"&gt;http://blog.rawlinson.us/two-months-with-a-mac-the-good-and-the-bad&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I don't like cross linking like this but I hope you'll understand that this is a topic that might be interesting to both my technical friends/followers and my non-technical friends/family. &amp;nbsp;I hope you'll click through and read it and, maybe even comment with some helpful tips and tricks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-8031778929063746359?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9NYC61as20vhtxJs0KY-9O2B3tU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9NYC61as20vhtxJs0KY-9O2B3tU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9NYC61as20vhtxJs0KY-9O2B3tU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9NYC61as20vhtxJs0KY-9O2B3tU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/ydUz1YNCtqQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/8031778929063746359/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=8031778929063746359" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/8031778929063746359?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/8031778929063746359?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/ydUz1YNCtqQ/2-months-of-mac-good-and-bad.html" title="2 Months of Mac : The Good and the Bad" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/02/2-months-of-mac-good-and-bad.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUDRXs6fSp7ImA9WhRUFko.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-7966658252184910798</id><published>2012-01-27T09:07:00.002-05:00</published><updated>2012-01-27T09:07:54.515-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-27T09:07:54.515-05:00</app:edited><title>Enable/Disable an Enrollment in Blackboard Learn using IMS XML</title><content type="html">Honestly, this seemed like it would be a straight forward process. &amp;nbsp;Blackboard certainly hints at it being simple and straightforward. &amp;nbsp;But it turns out disabling (and re-enabling) an enrollment isn't as obvious as you might hope.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;XML&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
There is a bit of conflicting documentation but this is how we ended up getting it to work using Blackboard Learn 9.1 SP 8.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;login to blackboard learn&lt;/li&gt;
&lt;li&gt;go to the system admin tab&lt;/li&gt;
&lt;li&gt;go to data integration&lt;/li&gt;
&lt;li&gt;select student information system integrations&lt;/li&gt;
&lt;li&gt;select your xml integration option (I'm not going into how to create one)&lt;/li&gt;
&lt;li&gt;in the little arrow drop down pick "Edit"&lt;/li&gt;
&lt;li&gt;make sure on the Enrollments row that "deletes" is set to "Disable"&lt;/li&gt;
&lt;li&gt;go back to the Student information system integrations page&lt;/li&gt;
&lt;li&gt;using the arrow drop down pick "Advanced Configuration"&lt;/li&gt;
&lt;li&gt;use the arrow drop down on enrollment and pick "Field Mapping"&lt;/li&gt;
&lt;li&gt;CHECK the "change or update?" box for "Row Status"&lt;/li&gt;
&lt;li&gt;Tell it to use a "Custom Script" and paste in this script:&lt;br /&gt;
&lt;pre class="javascript" name="code"&gt;var rs = true;
if ( data.rolesToAddOrUpdate.get(0).status = 0 ) {
rs = false;
}
rs;
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;span style="color: red;"&gt;&lt;b&gt;WARNING&lt;/b&gt;&lt;/span&gt;: &amp;nbsp;If you don't setup blackboard as indicated then including recstatus=3 as an attribute on the ROLE node will cause the enrollment to be DELETED from blackboard. &amp;nbsp;This will cause all artifacts created by that user within that class to be&amp;nbsp;disassociated&amp;nbsp;from them; thus if they are re-enrolled in the class they won't be tied to any of those artifacts. &amp;nbsp;Many of the artifacts will still be there; they'll just be associated with Anonymous.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
By disabling the enrollment the artifacts remain&amp;nbsp;associated&amp;nbsp;with the user so that when they are reenrolled in the class they don't have to re-upload all of their assignments etc.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This process is useful for dealing with drops/holds on students as well so that their enrollment in the class isn't deleted (though it does disappear from the students interface) until their enrollment is reinstated.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: large;"&gt;Flat Files&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
If you are using the flat file (pipe delimited) process between banner and blackboard things are more straightforward. &amp;nbsp;You just have to include the column "ROW_STATUS" with a value of "disabled" in order to disable an enrollment and "enabled" to enable the enrollment.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
A disabled enrollment using either of these methods will appear in to an administrator (and perhaps in some other scenarios) with a small red circle to the left of the enrollment record.&lt;br /&gt;
&lt;br /&gt;
You can learn about more of the process and the difficulties that were experienced in our transition from Vista to Learn over at &lt;a href="http://www.jcummings.net/ims-enterprise-1-1-vista-xml-integration-blackboard-learn-9-and-processing-enrollment-changes/"&gt;John Cummings blog&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-7966658252184910798?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Sy1_JaCOFdLmvaqfomaREcaQnBc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Sy1_JaCOFdLmvaqfomaREcaQnBc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Sy1_JaCOFdLmvaqfomaREcaQnBc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Sy1_JaCOFdLmvaqfomaREcaQnBc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/LDSwfvAdu_4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/7966658252184910798/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=7966658252184910798" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/7966658252184910798?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/7966658252184910798?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/LDSwfvAdu_4/enabledisable-enrollment-in-blackboard.html" title="Enable/Disable an Enrollment in Blackboard Learn using IMS XML" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/enabledisable-enrollment-in-blackboard.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMESXs4eCp7ImA9WhRUFko.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-2270655549084872409</id><published>2012-01-27T08:46:00.001-05:00</published><updated>2012-01-27T08:53:28.530-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-27T08:53:28.530-05:00</app:edited><title>Force Wordpress to be Case-Insensitive</title><content type="html">We recently had a minor annoyance happen when some marketing material was sent out that had a url with a capital "B" in it; such as http://www.mysite.com/Bill instead of http://www.mysite.com/bill. &amp;nbsp;Our webserver runs IIS so it is case-insensitive but wordpress, which is being used to host the hypothetical "bill" website is written in PHP which is case sensitive. &lt;br /&gt;
&lt;br /&gt;
Fortunately it is fairly easy to change this default behavior without using URL rewrite rules (which are limited to suckness on IIS 6 anyway). &amp;nbsp;Wordpress Plugins to the rescue!&lt;br /&gt;
&lt;br /&gt;
Our wordpress install uses a multi-site setup with over 150 sites so clearly this is a plugin you'd want to network activate. &amp;nbsp;Sadly, for some reason, network activate didn't do the trick. Instead the plugin had to go in the mu-plugins directory (mu-plugins = must use plugins; they are forced onto every site and loaded before anything else basically).&lt;br /&gt;
&lt;br /&gt;
I found the prefect plugin code over at &lt;a href="http://www.unfocus.com/2007/08/31/case-insensitive-permalinks-plugin-for-wordpress/"&gt;unfocus.com's website&lt;/a&gt;&amp;nbsp;but I renamed it to something that made a little more sense for us (from a maintenance perspective) in the future. Here is the code of the plugin in case that site goes away someday.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="php" name="code"&gt;
 &amp;lt;?php
  /*
  Plugin Name: case-insensitive-url
  Plugin URI: http://www.unfocus.com/projects/
  Description: A plugin to make wordpress case insensitive in regards to urls.
  Version: 1.0a
  Author: Kevin Newman
  Author URI: http://www.unfocus.com/projects/
  */
  function case_insensitive_url() {
   if (preg_match('/[A-Z]/', $_SERVER['REQUEST_URI'])) {
    $_SERVER['REQUEST_URI'] = strtolower($_SERVER['REQUEST_URI']);
    $_SERVER['PATH_INFO']   = strtolower($_SERVER['PATH_INFO']);
   }
  }
  add_action('init', 'case_insensitive_url');
 ?&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
That's it.  This now runs automatically at the beginning of every page load and insures that each request is handled in a case-insensitive manner.  I'm not sure what, if any real, performance impact this has, but it is worth the cost for the reliability of knowing all incoming urls are treated the same regardless of case.  It's too expensive in terms of reputation and marketing dollars to have&amp;nbsp;pamphlets, postcards, and flyers printed that point to a 404 error if we don't do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-2270655549084872409?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/M1oqkA8OKtagyTeBMpdmcwJF49Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M1oqkA8OKtagyTeBMpdmcwJF49Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/M1oqkA8OKtagyTeBMpdmcwJF49Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M1oqkA8OKtagyTeBMpdmcwJF49Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/I2CQhkLjIFo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/2270655549084872409/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=2270655549084872409" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2270655549084872409?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2270655549084872409?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/I2CQhkLjIFo/force-wordpress-to-be-case-insensitive.html" title="Force Wordpress to be Case-Insensitive" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/force-wordpress-to-be-case-insensitive.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQBQXw9eip7ImA9WhRUEEQ.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-3345405321054684234</id><published>2012-01-20T16:52:00.001-05:00</published><updated>2012-01-20T16:52:30.262-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-20T16:52:30.262-05:00</app:edited><title>Create App Shortcut on Mac for MacPorts installed program</title><content type="html">This is here just so I remember how to do this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;create a new automator task&lt;/li&gt;
&lt;li&gt;type = application&lt;/li&gt;
&lt;li&gt;add a node: "Run Applescript"&lt;/li&gt;
&lt;li&gt;in the body of the method add&lt;br /&gt;&lt;pre style="background-attachment: initial; background-clip: initial; background-color: #f5fdff; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(16, 135, 164); border-left-style: solid; border-left-width: 5px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 10px; padding-right: 5px; padding-top: 5px; text-align: left; vertical-align: baseline; width: auto;"&gt;&lt;code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;do shell script "/opt/local/bin/{executable_name} &amp;amp;"&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;change {executable_name} to the right value; for example if launching pidgin change it to pidgin&lt;/li&gt;
&lt;li&gt;save the task to your Applications directory&lt;/li&gt;
&lt;li&gt;profit?&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Thanks go to this StackOverflow/&lt;a href="http://superuser.com/questions/179842/create-alias-desktop-shortcut-of-an-application-installed-by-macports"&gt;SuperUser post&lt;/a&gt; that answered this for me.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I was a failure at using Platypus which was the other suggestion.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-3345405321054684234?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sDcGptNeTbFhW_J5N1DEXRUFlfk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sDcGptNeTbFhW_J5N1DEXRUFlfk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sDcGptNeTbFhW_J5N1DEXRUFlfk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sDcGptNeTbFhW_J5N1DEXRUFlfk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/8tdVA8mr7lk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/3345405321054684234/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=3345405321054684234" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3345405321054684234?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3345405321054684234?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/8tdVA8mr7lk/create-app-shortcut-on-mac-for-macports.html" title="Create App Shortcut on Mac for MacPorts installed program" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/create-app-shortcut-on-mac-for-macports.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkECRnozcSp7ImA9WhRUEEU.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-563579441995335424</id><published>2012-01-20T14:44:00.000-05:00</published><updated>2012-01-20T14:44:27.489-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-20T14:44:27.489-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="nokogiri::xml::reader" /><category scheme="http://www.blogger.com/atom/ns#" term="nokogiri::xml::node" /><category scheme="http://www.blogger.com/atom/ns#" term="nokogiri" /><category scheme="http://www.blogger.com/atom/ns#" term="xml" /><category scheme="http://www.blogger.com/atom/ns#" term="nokogiri::xml::nodeset" /><title>Parsing Large XML Documents in Ruby</title><content type="html">Today I was given a fairly large XML file (roughly 32 Mb) that I needed to parse in order to see if there was a match between a concatenation between two node values and the contents of a separate file that had comma separated values in it. &amp;nbsp;Always looking for an excuse to use a different language than I normally do I decided to attack this in Ruby because I remember it being particularly good at handling File IO.&lt;br /&gt;
&lt;br /&gt;
I'm going to present two solutions to this problem here. &amp;nbsp;I'm sure they can both be improved. &amp;nbsp;However, the second solution was the one I settled on because it is substantially more performant.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Example 1 - Using SimpleXML&lt;/span&gt;&lt;br /&gt;
Look, I don't know Ruby well at all so when I saw a library called SimpleXML I thought - "sweet that's right up my alley!" &amp;nbsp;It really was easy to use but, as you'll see, it wasn't the right tool for this particular job.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="ruby" name="code"&gt;require 'rubygems'
 require 'xmlsimple'

 duplicates = Array.new()
 enrollments = Array.new()


 # read in the xml of enrollments
 puts "reading in enrollment file; this could take a while."
 data = XmlSimple.xml_in('students.xml')

 puts "enrollment file loaded; now to parse it!"
 cnt = 0
 data['membership'].each do |course|
  courseId = course["sourcedid"][0]["id"][0].strip
  course["member"].each do |student|
   studentId = student["sourcedid"][0]["id"][0].strip
   enrollmentId = studentId &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; courseId
   enrollments.push(enrollmentId)
  end
  cnt++
  if cnt &amp;gt; 9 then
   p "."
   cnt = 0
  end
 end


 #read in the comma delimited list..
 puts "reading in the drop file"
 drops = File.readlines("term_drops.lis");
 drops.delete_at(drops.length-1)


 drops = drops.collect{|x| x.strip}

 puts "comparing..."

 duplicates = enrollments &amp;amp; drops

 if duplicates.size &amp;gt; 0 then
  puts "found the following duplicate enrollments"
  puts duplicates
 else
  puts "YES! no duplicates found"
 end
&lt;/pre&gt;
&lt;br /&gt;
By far the slowest part of this process was the line data = XmlSimple.xml_in('students.xml') - in fact with my large XML file I got bored and gave up waiting for it to load.  What I needed was a parser that would pull in one node of the document at a time.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Nokogiri&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
It turns out there are a few solutions but I settled on Nokogiri and I'm glad I did. Honestly, the documentation is a little confusing but the library itself works great.

&lt;br /&gt;
&lt;pre class="ruby" name="code"&gt;require 'rubygems'
 require 'nokogiri'

 duplicates = Array.new()
 enrollments = Array.new()


 puts "reading in drops file"
 drops = File.readlines("term_drops.lis");
 drops.delete_at(drops.length-1)
 drops = drops.collect{|x| x.strip}


 puts "reading in enrollment file; this could take a while."
 data = Nokogiri::XML::Reader(File.open("students.xml"))

 data.each do |node|
  if(node.name == "membership" &amp;amp;&amp;amp; node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT)
   doc = Nokogiri::XML(node.outer_xml)
   classId = doc.xpath("//sourcedid/id")[0].inner_text.strip
   studentId = doc.xpath("//member/sourcedid/id")[0].inner_text.strip
   enrollmentId = studentId &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; classId

   if drops.include?(enrollmentId) then
    puts  enrollmentId
   end
  end
 end
&lt;/pre&gt;
&lt;br /&gt;
As you can see both scripts are pretty short - ruby really is nice for this kind of stuff. &amp;nbsp;I also do a few weird things in both concerning the way I pull in my comma delimited flat file (I drop off the last line for instance but I don't really have to).&lt;br /&gt;
&lt;br /&gt;
Their were a couple little gotcha's I ran into using Nokogiri. &amp;nbsp;First is that when I do the data.each do |node| block it literally will iterate over every node in the document down to the most distant child. &amp;nbsp;Thus I needed to filter things out by using the node.name check. &amp;nbsp;Secondly, when it iterates it actually deals with every node twice; once on entering the node and once on exiting it. &amp;nbsp;That is why I am checking for the node_type as well as the node.name.&lt;br /&gt;
&lt;br /&gt;
Also, and this was just stupidity on my part, in order for me to do the xpath query on the node (after creating a small xml document using Nokogiri) I had to use outer_xml and not inner_xml. &amp;nbsp;Using inner_xml worked ok when I was just searching for the classId because when I created the document using inner_xml it actually ignored all sibling nodes to the sourcedid node. &lt;br /&gt;
&lt;br /&gt;
I also don't really know xpath all that well thus there is probably a better way for me to make sure I'm only getting the first sourcedid when I ask for classId instead of ALL sourcedid values in the document when I fire of the xpath query. &amp;nbsp;I'm not really sure; if there is feel free to let me know in the comments.&lt;br /&gt;
&lt;br /&gt;
Overall this code is pretty rough and specialized for this one off task I was asked to do but hopefully the Nokogiri code will help others as they parse an xml document while looking for values that might be spread out over various nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-563579441995335424?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sSPajdDH-ViHzCunENyrutNgtbg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sSPajdDH-ViHzCunENyrutNgtbg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sSPajdDH-ViHzCunENyrutNgtbg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sSPajdDH-ViHzCunENyrutNgtbg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/3kOUAvJzJdY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/563579441995335424/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=563579441995335424" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/563579441995335424?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/563579441995335424?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/3kOUAvJzJdY/parsing-large-xml-documents-in-ruby.html" title="Parsing Large XML Documents in Ruby" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/parsing-large-xml-documents-in-ruby.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAGRnk-cSp7ImA9WhRVGUU.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-3306506263312708766</id><published>2012-01-19T10:25:00.000-05:00</published><updated>2012-01-19T10:25:27.759-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-19T10:25:27.759-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="bash" /><category scheme="http://www.blogger.com/atom/ns#" term="samba" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><category scheme="http://www.blogger.com/atom/ns#" term="automator" /><title>Mount Samba Share on MAC to a Location of Your Choice - at Login</title><content type="html">One thing I've discovered in my move from Windows to MACs is that it isn't as easy to consistently mount a windows share to a consistent location in your file system.  Initially I wasn't even sure if it was possible.  The built in GUI doesn't really give you an option.  For instance if you are mounting the following two shares : smb://server1/d$ and smb://server2/d$ it is possible that one will end up at /Volumes/d$ and the other will end up at /Volumes/d-1$ or something like that.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;The problem is it isn't easy to tell by looking which one is server1 and which one is server 2's mount point.  Thus, if you mount them in an inconsistent order server1 could end up at /Volumes/d$ once and then /Volumes/d-1$ the next time.  It's not an ideal situation.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Now you may already be asking - who cares?  If you setup an automator script with you login things will always be mounted in the same order and be at the same volume location and you'll just get used to knowing where things are.  True.  However, I work on a team and one of the things I also want to be able to do is have an ant script that can reliably run on each person's machine that can access these various samba shares (imagine one click deployment to a samba share?)

Thus I need a way to consistently have all this stuff in a place that does two things: 

&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Be a nice human readable location on the file system so you instantly know what should be there&lt;/li&gt;
&lt;li&gt;Is the same on everyones machine and exists in an easy to recreate way for new members of the team.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Thus I am using an automator task that uses both an applescript and a bash script to achieve my result. &amp;nbsp;The apple script part is used to request the users login password for the windows domain which is then used in the bash script when mounting the samba shares.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
So here is the apple script part:
&lt;br /&gt;
&lt;pre class="javascript" name="code"&gt;on run {input, parameters}
 tell application "System Events"
  set the_password to "password"
  display dialog "Please enter your Windows password: " default answer "" buttons {"OK", "Cancel"} default button "OK" with icon 2 with title "Password" with hidden answer
  set the_password to text returned of the result
 end tell
 return {the_password}
end run

&lt;/pre&gt;
&lt;div&gt;
I stole that bit from &lt;a href="http://aricsblog.blogspot.com/2006/09/running-shell-commands-with-automator.html"&gt;Aric Friesen&lt;/a&gt;.  I removed a bunch of his script but the basic core part of it remains unchanged.  In my automator task the second step is to "Run Shell Script" were you Pass Input as arguments.  Here is my bash script:
&lt;/div&gt;
&lt;pre class="javascript" name="code"&gt; #!/bin/bash

 echo $1
 if [ ! -d ~/windows ]; then
 mkdir ~/windows
 fi
 if [ ! -d ~/windows/server1-d ]; then
  mkdir ~/windows/server1-d
 else
  umount ~/windows/server1-d
 fi
 if [ ! -d ~/windows/server2-d ]; then
  mkdir ~/windows/server2-d
 else
  umount ~/windows/server2-d
 fi


 mount_smbfs "//DOMAIN;USERNAME:$1@SERVER1/d$" ~/windows/server1-d
 mount_smbfs "//DOMAIN;USERNAME:$1@SERVER2/d$" ~/windows/server2-d

&lt;/pre&gt;
&lt;div&gt;
There may seem like some extraneous fluff in there but I want to make sure it works no matter if the drives have ever been mounted before.  It turns out to mount a drive to a predetermined location you have to have a directory created at that location already.  The mount_smbfs command will then change that directory into a mount point.  Thus I have some checks to make sure my directories already exist and that the mounts haven't already happened before I try to mount to them.  I would prefer if I could tell that the directory were actually already being used as a mount point (so I could skip mounting it) but I couldn't find a reliable way to identify if a directory was a mount point and what it was actually pointing to.
&lt;br /&gt;
&lt;br /&gt;
Once I had this automator process setup I saved it as an application called "MountNetworkDrives". &amp;nbsp;From there you can make it execute on login by following these simple steps:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Open System Preferences&lt;/li&gt;
&lt;li&gt;Click on Users &amp;amp; Groups&lt;/li&gt;
&lt;li&gt;Using the "Current User" select "Login Items"&lt;/li&gt;
&lt;li&gt;Click on the small "+" at the bottom of the right panel&lt;/li&gt;
&lt;li&gt;Find your new application "MountNetworkDrives" and add it&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
And Voila! &amp;nbsp;You have created a consistent way to setup mounts on your mac. &amp;nbsp;Now you can share that automator script with your teammates. &amp;nbsp;Just have them change the username value in the bash script step and it is good to go.&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-3306506263312708766?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YtUz9qn4ey0MVM8rY96p4pL-4BY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YtUz9qn4ey0MVM8rY96p4pL-4BY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YtUz9qn4ey0MVM8rY96p4pL-4BY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YtUz9qn4ey0MVM8rY96p4pL-4BY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/s0rNhzmkkpI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/3306506263312708766/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=3306506263312708766" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3306506263312708766?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3306506263312708766?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/s0rNhzmkkpI/mount-samba-share-on-mac-to-location-of.html" title="Mount Samba Share on MAC to a Location of Your Choice - at Login" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/mount-samba-share-on-mac-to-location-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UMR3w8eCp7ImA9WhRVE0U.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-322714952702397541</id><published>2012-01-11T14:13:00.000-05:00</published><updated>2012-01-12T11:21:26.270-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-12T11:21:26.270-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql" /><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><title>MySQL CAST and CONCAT</title><content type="html">&lt;span style="font-size: large;"&gt;CAST&lt;/span&gt;&lt;br /&gt;
This is just here to help me remember.  In MySQL if you want to CAST an int into a string you use:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;CAST(x AS CHAR)&lt;/pre&gt;
I had assumed it would be VARCHAR but I was wrong.  As a further &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/data-type-overview.html"&gt;reference here is info on all of the TYPES supported by MySQL&lt;/a&gt;.  What I find interesting is the fact that MySQL does have a VARCHAR type but you can't cast an int to it.  Why Not?

In the end it doesn't matter too much; the CHAR option worked.

&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;span style="font-size: large;"&gt;CONCAT&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
A similarly odd behavior is how you concatenate strings in MySQL. &amp;nbsp;I had thought I would use &amp;amp; or || but &amp;nbsp;both of those return a 0 if you use them to concatenate. &amp;nbsp;Instead you have to wrap all of the strings you want to concatenate up into a call to the CONCAT function like so:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;CONCAT('http://www.rawlinson.us/blog', page_name, '/datafiles/?file_id', CAST(file_id AS VARCHAR)) as url&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-322714952702397541?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lqU7ETT8ulzxZSZbzZJjIVRI3ns/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lqU7ETT8ulzxZSZbzZJjIVRI3ns/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lqU7ETT8ulzxZSZbzZJjIVRI3ns/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lqU7ETT8ulzxZSZbzZJjIVRI3ns/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/SkkFM3mxl3Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/322714952702397541/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=322714952702397541" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/322714952702397541?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/322714952702397541?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/SkkFM3mxl3Q/mysql-cast-and-concat.html" title="MySQL CAST and CONCAT" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/mysql-cast-and-concat.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UCRHkzfip7ImA9WhRVE0U.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-5004204922499895805</id><published>2012-01-11T14:05:00.000-05:00</published><updated>2012-01-12T11:21:05.786-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-12T11:21:05.786-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title>How many Days|Weeks|Months Ago? [php]</title><content type="html">Yesterday I wrote a simple wordpress plugin that checks an rss feed and finds posts in that feed that contain specific keywords. &amp;nbsp;Any posts found that are also younger than n number of days are then displayed at the top of a page just as if they were posts in the wordpress blog.&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
When I was display the data though I thought it would be nice if the pubdate sent with the feed actually showed up as "2 days ago..." or "4 months ago.." or whatever was applicable. &amp;nbsp;Thus, I did what any good lazy coder does I googled to see if anyone had written this up in PHP already and sure enough someone had.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I found this function on the &lt;a href="http://drupal.org/node/61565#comment-198230"&gt;drupal support community message boards posted by someone named "drenei"&lt;/a&gt;&lt;/div&gt;

&lt;pre class="php" name="code"&gt;
   &amp;lt;?php
   function ago($timestamp){
   $difference = time() - $timestamp;
   $periods = array("second", "minute", "hour", "day", "week", "month", "years", "decade");
   $lengths = array("60","60","24","7","4.35","12","10");
   for($j = 0; $difference &amp;gt;= $lengths[$j]; $j++)
   $difference /= $lengths[$j];
   $difference = round($difference);
   if($difference != 1) $periods[$j].= "s";
   $text = "$difference $periods[$j] ago";
   return $text;
  }
   ?&amp;gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-5004204922499895805?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oQetcoSaU6t4WM2TsqCNf1pdkm8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oQetcoSaU6t4WM2TsqCNf1pdkm8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oQetcoSaU6t4WM2TsqCNf1pdkm8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oQetcoSaU6t4WM2TsqCNf1pdkm8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/v6Qz9oH9hFw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/5004204922499895805/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=5004204922499895805" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/5004204922499895805?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/5004204922499895805?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/v6Qz9oH9hFw/how-man-daysweeksmonths-ago-php.html" title="How many Days|Weeks|Months Ago? [php]" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/how-man-daysweeksmonths-ago-php.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIAQ3c-eSp7ImA9WhRQF00.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-4740647878146265475</id><published>2011-12-12T10:25:00.003-05:00</published><updated>2011-12-12T10:25:42.951-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-12T10:25:42.951-05:00</app:edited><title>Installing Ruby on a Mac fails with an error while running configure</title><content type="html">Today I tried to upgrade my Ruby version to the latest (1.9.3-p0) using RVM (Ruby Version Manager). &amp;nbsp;When I tried the install it failed with an error:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: red; font-family: 'Courier New', Courier, monospace;"&gt;ERROR: Error running ' ./configure --prefix=/Users/bill/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/bill/.rvm/usr ', please read /Users/bill/.rvm/log/ruby-1.9.3-p0/configure.log&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: red; font-family: 'Courier New', Courier, monospace;"&gt;ERROR: There has been an error while running configure. Halting the installation.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I wasn't sure what to do but after a bit of digging on google and some forums I found the solution. &amp;nbsp;But, before I give you that here is the reasoning I found for the issue:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="background-color: #fbfbfb; color: #333333; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 18px;"&gt;it works with 1.9.2 - BUT I was also not able to get RVM going on Lion. I have xcode 4.2.&lt;/span&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 18px;"&gt;The problem is that xcode uses LLVM GCC and not (standard? I forget the term) GCC.&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style="background-color: #fbfbfb; color: #333333; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #fbfbfb; color: #333333; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
Finally, here is how to get it to install without any issues:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fbfbfb; color: #333333; font-size: 12px; line-height: 18px;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;rvm install 1.9.3 --with-gcc=clang&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #fbfbfb; color: #333333; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
This solution was found via &lt;a href="https://github.com/plamoni/SiriProxy/issues/138#issuecomment-3032544"&gt;dcinzona&lt;/a&gt; at github. &amp;nbsp;He found the answer on &lt;a href="http://stackoverflow.com/questions/8259928/error-compiling-ruby-1-9-3-using-rvm-homebrew-or-macports"&gt;stackoverflow&lt;/a&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-4740647878146265475?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Y0iohjkAG0aYPuFwEG5P7OLQ_BA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y0iohjkAG0aYPuFwEG5P7OLQ_BA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Y0iohjkAG0aYPuFwEG5P7OLQ_BA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y0iohjkAG0aYPuFwEG5P7OLQ_BA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/Rzk9Y4Cx6Jg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/4740647878146265475/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=4740647878146265475" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4740647878146265475?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4740647878146265475?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/Rzk9Y4Cx6Jg/installing-ruby-on-mac-fails-with-error.html" title="Installing Ruby on a Mac fails with an error while running configure" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/12/installing-ruby-on-mac-fails-with-error.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQGR304cCp7ImA9WhRQEkU.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-2701977465151386280</id><published>2011-12-07T13:19:00.001-05:00</published><updated>2011-12-07T13:25:26.338-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-07T13:25:26.338-05:00</app:edited><title>Make F5 Refresh the page in Chrome on a Mac</title><content type="html">It turns out the F5 key doesn't do a page refresh on a mac.  That is a habit I just don't think I'll be able to break.  Fortunately, macs have a built in way to define application specific keyboard mappings.  Here are the instructions for mapping the F5 key to refresh in Chrome.&lt;br /&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Launch "System Preferences"&lt;/li&gt;
&lt;li&gt;Click the "Keyboard" icon&lt;/li&gt;
&lt;li&gt;Select "Keyboard Shortcuts" tab&lt;/li&gt;
&lt;li&gt;Hit the little "+" button under the main white area&lt;/li&gt;
&lt;li&gt;In the little pup-up window select "Google Chrome" as the Application&lt;/li&gt;
&lt;li&gt;Type in "Reload This Page" in the "Menu Title" field exactly as it appears in the Chrome's View menu (no quotes of course)&lt;/li&gt;
&lt;li&gt;Click inside the "Keyboard Shortcut" field and hit F5 key (or any desired combination)&lt;/li&gt;
&lt;li&gt;Restart Chrome to make it work&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;span style="font-family: arial, 'san serif'; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial, 'san serif'; font-size: 13px;"&gt;If you use safari this same process will work for that application as well&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial, 'san serif'; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial, 'san serif'; font-size: 13px;"&gt;Thanks to "paulcik" and his comment on the &lt;a href="http://www.google.com/support/forum/p/Chrome/thread?tid=73c83d887892a0a2&amp;amp;hl=en"&gt;google support forums&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-2701977465151386280?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/SQYDhf6Sm4YH7G-NW_kRiSmv9no/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SQYDhf6Sm4YH7G-NW_kRiSmv9no/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/SQYDhf6Sm4YH7G-NW_kRiSmv9no/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SQYDhf6Sm4YH7G-NW_kRiSmv9no/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/67mPDkgg4oY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/2701977465151386280/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=2701977465151386280" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2701977465151386280?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2701977465151386280?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/67mPDkgg4oY/make-f5-refresh-page-in-chrome-on-mac.html" title="Make F5 Refresh the page in Chrome on a Mac" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/12/make-f5-refresh-page-in-chrome-on-mac.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMBSXc5cCp7ImA9WhRSFk4.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-684161844937149820</id><published>2011-11-18T10:34:00.001-05:00</published><updated>2011-11-18T10:34:18.928-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-18T10:34:18.928-05:00</app:edited><title>My New Job</title><content type="html">For the past 12 years I have worked for a wonderful small company named Strictly Business Computer Systems.  During that time I've had the priviledge of working alongside some amazingly bright and talented people.  I will miss both the workplace and my coworkers enormously as I move forward towards a new opportunity at Marshall University.

I'll still be developing software using a variety of languages and tools and I'll still be blogging my solutions to weird little problems; I'll just be doing it with a little less focus on ColdFusion and a little more on PHP, .Net, and SharePoint.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-684161844937149820?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Seyf1G_Cxbh42xQFliI3M75izZ0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Seyf1G_Cxbh42xQFliI3M75izZ0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Seyf1G_Cxbh42xQFliI3M75izZ0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Seyf1G_Cxbh42xQFliI3M75izZ0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/V_UZ75D-8FA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/684161844937149820/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=684161844937149820" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/684161844937149820?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/684161844937149820?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/V_UZ75D-8FA/my-new-job.html" title="My New Job" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/11/my-new-job.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIAQnc_cSp7ImA9WhdaEEs.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-1178916033423262010</id><published>2011-10-17T13:28:00.004-04:00</published><updated>2011-10-19T18:32:23.949-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-19T18:32:23.949-04:00</app:edited><title>Can't Establish Security Trust Relationship with US Govt</title><content type="html">If you are ever working on a project for the US Govt and are accessing some site within their network (via a VPN) and you start to get security and trust relationship errors then you need to install the DoD certificates.  I found them at this &lt;a href="http://epfat.swf.usace.army.mil/Welcome.aspx"&gt;US Army Corps of Engineers Website&lt;/a&gt;.  I downloaded the zip file, ran the installer, and all of my trust problems with the government were resolved.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-1178916033423262010?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Q9wJ71Xt0xAeW4lGFYrfja9cS5s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q9wJ71Xt0xAeW4lGFYrfja9cS5s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Q9wJ71Xt0xAeW4lGFYrfja9cS5s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q9wJ71Xt0xAeW4lGFYrfja9cS5s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/mbtPzG6QW84" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/1178916033423262010/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=1178916033423262010" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1178916033423262010?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1178916033423262010?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/mbtPzG6QW84/cant-establish-security-trust.html" title="Can't Establish Security Trust Relationship with US Govt" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/10/cant-establish-security-trust.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkAHRX87cCp7ImA9WhdUE0w.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-1726029218245084277</id><published>2011-09-29T13:52:00.000-04:00</published><updated>2011-09-29T13:52:14.108-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-29T13:52:14.108-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="c#" /><category scheme="http://www.blogger.com/atom/ns#" term="sql-server" /><title>Create a C# Model From a SQL Server Table</title><content type="html">If you aren't using a framework of some sort that helps make this even easier here is a sql script that will help you generate a set of getters/setters for a SQL Server table in C#.&lt;br /&gt;
&lt;br /&gt;
I haven't tested it much (nil) but it looks like it will work ok. &amp;nbsp;Basically you can just cut and paste the records returned into your class definition and you'll be good to go. &amp;nbsp;You may, however, wish to fix the case of the property names to match the proper convention. &amp;nbsp;I'm not sure how to fix the case using just SQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;
SELECT 'public '  +
		CASE data_type
			WHEN 'bigint'		THEN 'int'
--			WHEN 'binary'		THEN 'raw'
			WHEN 'bit'		THEN 'int'
			WHEN 'char'		THEN 'char'
			WHEN 'datetime'		THEN 'DateTime'
			WHEN 'decimal'		THEN 'decimal'
			WHEN 'float'		THEN 'float'
--			WHEN 'image'		THEN 'long raw'
			WHEN 'int'		THEN 'int'
			WHEN 'money'		THEN 'double'
			WHEN 'nchar'		THEN 'string'
			WHEN 'ntext'		THEN 'string'
			WHEN 'nvarchar'		THEN 'string'
			WHEN 'numeric'		THEN 'int'
			WHEN 'real'		THEN 'decimal'
			WHEN 'smalldatetime'	THEN 'DateTime'
			WHEN 'smallmoney'	THEN 'double'
			WHEN 'smallint'		THEN 'int'
			WHEN 'text'		THEN 'string'
			WHEN 'timestamp'	THEN 'Date'
			WHEN 'uniqueidentifier' THEN 'string'
			--WHEN 'varbinary'	THEN 'raw'
			WHEN 'varchar'		THEN 'string'
			ELSE 'CHECK THIS.. ' + data_type + ' DataType'
		END + ' ' + COLUMN_NAME + ' { get; set; }'
	
FROM information_schema.columns
WHERE table_name = 'class'
&lt;/pre&gt;

There are also a  few data types in here I'm not sure I converted properly; this was just a quick one-off thing I put together for a friend.  So, if you have any suggestions or corrections please leave them in the comments and I'll update it as I go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-1726029218245084277?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qshBWMXgrwl0Kxwpbw1JvvX12pI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qshBWMXgrwl0Kxwpbw1JvvX12pI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qshBWMXgrwl0Kxwpbw1JvvX12pI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qshBWMXgrwl0Kxwpbw1JvvX12pI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/fk9IxpoJf8Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/1726029218245084277/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=1726029218245084277" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1726029218245084277?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1726029218245084277?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/fk9IxpoJf8Q/create-c-model-from-sql-server-table.html" title="Create a C# Model From a SQL Server Table" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/09/create-c-model-from-sql-server-table.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MEQXs_cSp7ImA9WhdVEUw.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-4440535021115292392</id><published>2011-09-15T16:44:00.000-04:00</published><updated>2011-09-15T16:43:20.549-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-15T16:43:20.549-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="project planning" /><category scheme="http://www.blogger.com/atom/ns#" term="prioritization." /><category scheme="http://www.blogger.com/atom/ns#" term="groupthink" /><category scheme="http://www.blogger.com/atom/ns#" term="priorities" /><title>How to Get Group Consensus</title><content type="html">This is a post I started writing a few years ago (March 2008) but never published for some reason...&lt;br /&gt;
&lt;br /&gt;
I don't have any first hand experience with the KJ Technique but it sounds pretty promising.&amp;nbsp; I can't explain it as well as this linked article does so I'll just send you there.&amp;nbsp; However, if you have already used this technique (or something like it) and have some feedback I'd love it if you left a comment.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.uie.com/articles/kj_technique/"&gt;The KJ-Technique: A Group Process for Establishing Priorities&lt;/a&gt;&lt;br /&gt;
I actually came across this article via Assaf Arkin's blog &lt;a href="http://blog.labnotes.org/2008/03/23/rounded-corners-198-less-is-the-new-black/"&gt;Labnotes&lt;/a&gt;.  I just started reading his blog last week so it's already paid off in introducing me to this new concept.&amp;nbsp; Thanks Assaf.  &lt;br /&gt;
&lt;br /&gt;
As I started reading the article on the KJ Technique I couldn't help but continually think about Assaf's idea of building this as a web service.&amp;nbsp; Well, actually, it kept focusing on potential UI designs for really bringing the power of the technique to a web-based application.&amp;nbsp; My conclusion? I'm not very good at UI design!&amp;nbsp; My focus was more on how to bring this concept to a distributed team without need of some kind of teleconference.&amp;nbsp; How can you simulate the sticky-notes that can be grouped - or regrouped by different non-directly-communicating team members? If you can come up with a good UI that clearly communicates the shift of a sticky from one group to another (or a total merging of groups) by a remote user to all other users in the group it would be fantastic.&amp;nbsp; In fact, if it was really clear what was going on all the time and everyone could keep messing with the virtual sticky-notes I almost think a distributed version of the KJ-Technique would be better than the one described in the article because it would really help enforce the "no discussion" rule for the first 2/3's of the process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-4440535021115292392?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/soii-fs8ptOiBg8b5Gas82TdYoI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/soii-fs8ptOiBg8b5Gas82TdYoI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/soii-fs8ptOiBg8b5Gas82TdYoI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/soii-fs8ptOiBg8b5Gas82TdYoI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/9LeKCe7Nhcw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/4440535021115292392/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=4440535021115292392" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4440535021115292392?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4440535021115292392?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/9LeKCe7Nhcw/how-to-get-group-consensus.html" title="How to Get Group Consensus" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/09/how-to-get-group-consensus.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkICQns7eCp7ImA9WhdVEUw.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-2344802762479398304</id><published>2011-09-15T16:29:00.001-04:00</published><updated>2011-09-15T16:29:23.500-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-15T16:29:23.500-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="debugging" /><category scheme="http://www.blogger.com/atom/ns#" term="console" /><title>console.log in IE</title><content type="html">If you're like me you've probably been happily working on a web project in chrome or firefox; using console.log to debug and then tried the site out in IE and had it fail due to a javascript error.  The error?  console is undefined of course.

Here is my simple and very limited solution to the problem.  At the beginning of my site, before any other javascript is defined I have this little snippet:

&lt;pre class="javascript" name="code"&gt;
var console = console || {
    log : function(text){
        /* 
        do nothing.. this prevents us from having errors
        in ie when we accidentally leave console.log calls in the js code
        on deployment:
        
        if we want a cheap console in ie just add alert(text); to this outside the comments
        */
       
    }
}
&lt;/pre&gt;


Basically what this does is it checks to see if console is defined, if so it returns the already defined console object.  If the console object isn't defined, then it returns a new object that contains a method of log.  The log method takes in a value and then does nothing with it.  The comment block tells you how you can make it do a bit more.  

There are plenty of more feature rich solutions to this problem out there but, in general, this works for me.  It's lightweight and easy to use.  I hope it saves you a few tiny headaches in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-2344802762479398304?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oRp9C0qM2JMDoIUomSs5XvcdQGo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oRp9C0qM2JMDoIUomSs5XvcdQGo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oRp9C0qM2JMDoIUomSs5XvcdQGo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oRp9C0qM2JMDoIUomSs5XvcdQGo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/Wv_a-KZ2nz0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/2344802762479398304/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=2344802762479398304" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2344802762479398304?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2344802762479398304?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/Wv_a-KZ2nz0/consolelog-in-ie.html" title="console.log in IE" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/09/consolelog-in-ie.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcNSXkyfCp7ImA9WhdQF0U.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-3509505516904466170</id><published>2011-08-19T17:06:00.001-04:00</published><updated>2011-08-19T17:08:18.794-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-19T17:08:18.794-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql" /><category scheme="http://www.blogger.com/atom/ns#" term="sql-server" /><category scheme="http://www.blogger.com/atom/ns#" term="oracle" /><title>Quickly Script a SQL Server View to Oracle Table</title><content type="html">I recently had a need to mirror a SQL server view in an Oracle database.  Without getting to detailed the basic premise is that a job runs once daily that copies data from the SQL Server via hetergenous data services into the Oracle table.  This allows some useful reporting queries to run that are joined across multiple Oracle schemas without having the slowdown involved with communicating directly over the heterogenous link on each query.&lt;br /&gt;
&lt;br /&gt;
Anyway, some of these views are stupid huge and I did not want to type each and every column name and column type. Thankfully there is a great resource inside SQL server that made my life quite a bit easier - the INFORMATION_SCHEMA.COLUMNS table.  It basically describes all the bits and pieces involved in all of the tables and views in your database.&lt;br /&gt;
&lt;br /&gt;
It's important to note that not all SQL server columns fit exactly into Oracle columns so I also needed to include a bit of logic to make &lt;a href="http://download.oracle.com/docs/cd/B19306_01/gateways.102/b14270/apa.htm"&gt;the translation between datatypes&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Here is the query:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;SELECT '"' + column_name + '"     ' +
		CASE data_type
			WHEN 'bigint'		THEN 'number(19)'
			WHEN 'binary'		THEN 'raw'
			WHEN 'bit'		THEN 'number(3)'
			WHEN 'char'		THEN 'char'
			WHEN 'datetime'		THEN 'timestamp'
			WHEN 'decimal'		THEN 'number(' + CAST(numeric_precision as varchar) + ',' + CAST(numeric_scale as varchar) + ')'
			WHEN 'float'		THEN 'float(49)'
			WHEN 'image'		THEN 'long raw'
			WHEN 'int'		THEN 'number(10)'
			WHEN 'money'		THEN 'number(19,4)'
			WHEN 'nchar'		THEN 'nchar'
			WHEN 'ntext'		THEN 'long'
			WHEN 'nvarchar'		THEN 'nchar'
			WHEN 'numeric'		THEN 'number(' + CAST(numeric_precision as varchar) + ',' + CAST(numeric_scale as varchar) + ')'
			WHEN 'real'		THEN 'float(23)'
			WHEN 'smalldatetime'	THEN 'date'
			WHEN 'smallmoney'	THEN 'number(10,4)'
			WHEN 'smallint'		THEN 'number(5)'
			WHEN 'text'		THEN 'long'
			WHEN 'timestamp'	THEN 'raw'
			WHEN 'uniqueidentifier' THEN 'char(36)'
			WHEN 'varbinary'	THEN 'raw'
			WHEN 'varchar'		THEN 'varchar2( ' + CAST(CHARACTER_MAXIMUM_LENGTH AS varchar) + ')'
			ELSE 'CHECK THIS.. ' + data_type + ' DataType'
		END + ', '
	

FROM information_schema.columns
WHERE table_name = 'your_table_or_view_name'
&lt;/pre&gt;&lt;br /&gt;
This will basically give you backa bunch of records that have the column name surrounded by quotes and then the type of the column followed by a comma.&lt;br /&gt;
&lt;br /&gt;
Once you have that you just need to prepend the "CREATE TABLE tablename (" bit at the beginning and remove the final comma and append a closing ");" and you've got a nice script to create a table.&lt;br /&gt;
&lt;br /&gt;
If you have a small table this probably isn't too helpful.  However, some of the views I have to mirror have over 250 columns!  &lt;br /&gt;
&lt;br /&gt;
It is possible that at times you will see a -1 in the datatype field.  If that happens it is because the length was set to "MAX" however I didn't really need to update my query to handle that so I'll leave that as an exercise for you if you need to handle that special case.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-3509505516904466170?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9typEWUTX_w3-5Ima0rnZ2XXAiQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9typEWUTX_w3-5Ima0rnZ2XXAiQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9typEWUTX_w3-5Ima0rnZ2XXAiQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9typEWUTX_w3-5Ima0rnZ2XXAiQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/cJBXPcBy-tI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/3509505516904466170/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=3509505516904466170" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3509505516904466170?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3509505516904466170?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/cJBXPcBy-tI/quickly-script-sql-server-view-to.html" title="Quickly Script a SQL Server View to Oracle Table" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/08/quickly-script-sql-server-view-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYFSXg-fyp7ImA9WhdSFkQ.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-4403651342944652230</id><published>2011-07-26T11:28:00.001-04:00</published><updated>2011-07-26T11:28:38.657-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-26T11:28:38.657-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="oracle" /><title>Oracle Error: ORA-12541 - TNS: no listener</title><content type="html">I was on vacation last week and when I returned, I could no longer connect to my local Oracle instance.  My C# apps and PL/SQL developer both reported a ORA-12541 TNS: no listener error.&lt;br /&gt;
&lt;br /&gt;
I hadn't changed anything before I left and I certainly hadn't changed anything as soon as I got back so I was a little perplexed.  Fortunately, there was a pretty easy solution which I extracted from &lt;a href="http://www.orafaq.com/wiki/ORA-12541"&gt;The Oracle FAQ&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Check your listeners status by going to the command line and entering the Listener Control Program using command LSNRCTL.  Once in the program enter the command: STATUS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool suggests you also start and stop the listener but that had no effect for me.  My listener just didn't want to work.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Recreate your listener.  Again, go to a command prompt but this time open up the Network Configuration Assistant using the command: netca&lt;/li&gt;
&lt;li&gt;Inside this tool you first need to delete your listener.  Mine was actually called "listener" and I just accepted all of the defaults when deleting it.  Once it is deleted, recreate it, again I used all of the defaults.&lt;/li&gt;
&lt;li&gt;After it was created I went back to the Listener Control Program (LSNRCTL) and ran the STATUS commaned.  This time it looked pretty good and, sure enough, my apps and PL/SQL Developer were able to connect to the database.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-4403651342944652230?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KC3t8vYM1zv9rj42p-c1j5QhoOY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KC3t8vYM1zv9rj42p-c1j5QhoOY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KC3t8vYM1zv9rj42p-c1j5QhoOY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KC3t8vYM1zv9rj42p-c1j5QhoOY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/1OF39fzMEYM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/4403651342944652230/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=4403651342944652230" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4403651342944652230?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4403651342944652230?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/1OF39fzMEYM/oracle-error-ora-12541-tns-no-listener.html" title="Oracle Error: ORA-12541 - TNS: no listener" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/07/oracle-error-ora-12541-tns-no-listener.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8MQ344fCp7ImA9WhZaF0Q.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-6931562731234979175</id><published>2011-07-04T11:54:00.000-04:00</published><updated>2011-07-04T11:54:42.034-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-04T11:54:42.034-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="google+" /><title>Google+ : My Favorite Feature So Far</title><content type="html">When I first heard about Google+ I thought that circles would be my favorite feature.  I thought having an easy way to filter who I published things to would be great.  And, so far, it is.  However, there is another aspect of circles that I like even more.  They are helping me find people who share my interests and who have interesting things to talk about.&lt;br /&gt;
&lt;br /&gt;
For example, with this Blog I talk about development stuff leaning mostly towards Cold Fusion development.  Thus when I was defining my circles I created a ColdFusion circle and put some folks like Sean Corfield and Marc Esher in my CF circle.  They both usually have interesting stuff to talk about in regards to CF and so I'm happy they both also put me into a circle that also seems to deal with development topics.&lt;br /&gt;
&lt;br /&gt;
These relationships were previously defined though.  We've all communicated in some fashion or another online either via twitter, a forum, or facebook.  Because of these relationships I trust that the people they are talking to about development stuff actually care about it and probably have something to add to the conversation at some point.  Thus, when one of them posts about a development topic to a limited audience I can look at the other members of the limited audience and instantly find other people who share that particular interest. I can't, necessarily, hear what they have to say - but I can begin to form a new relationship with these people by putting them in one of my circles.&lt;br /&gt;
&lt;br /&gt;
Once they are in my circle they will start to see some of my content on that topic.  If they like what I have to say they will most likely add me to their development circle and then I'll start hearing what they have to say and we will begin an online relationship around our shared interest in development..  If they don't like what I have to say they will just ignore me and the relationship will be terminated - which is fine.  &lt;br /&gt;
&lt;br /&gt;
This works for any topic I'm interested in.  I might have a C# circle or a Disc Golf or a Mountain Bike circle and, in each, I might find; via the extended circles, others who share my interest and who I might want to have a lasting conversation with.&lt;br /&gt;
&lt;br /&gt;
Circles, for me, aren't as much about filtering for who hears what I have to say but are about finding people who have something to say I want to hear.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-6931562731234979175?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RSNqTEINsLRSWMjb6xAjjI22r4E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RSNqTEINsLRSWMjb6xAjjI22r4E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RSNqTEINsLRSWMjb6xAjjI22r4E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RSNqTEINsLRSWMjb6xAjjI22r4E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/KMj75iqlVug" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/6931562731234979175/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=6931562731234979175" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/6931562731234979175?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/6931562731234979175?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/KMj75iqlVug/google-my-favorite-feature-so-far.html" title="Google+ : My Favorite Feature So Far" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAACB7Y/TBaFfSEr6Hg/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/07/google-my-favorite-feature-so-far.html</feedburner:origLink></entry></feed>

