<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5887256</id><updated>2012-01-26T07:26:42.519-08:00</updated><title type='text'>Tech Bits</title><subtitle type='html'>Random Unix or software development tips and notes</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5887256.post-3303207950539711271</id><published>2011-11-04T08:22:00.000-07:00</published><updated>2011-12-14T06:50:08.384-08:00</updated><title type='text'></title><summary type='text'>Ruby, OptionParser, and Switches with Optional Arguments

Ruby's OptionParser supports switches with optional arguments. Both the official documentation and the pickaxe book give examples of various syntax choices like these:

"--switch [OPTIONAL]"
"--switch [=OPTIONAL]"
"--switch" "=[OPTIONAL]"

Somewhere along the way the first time I needed a switch with an optional argument I copied the third</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/3303207950539711271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=3303207950539711271' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/3303207950539711271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/3303207950539711271'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2011/11/ruby-optionparser-and-switches-with.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-8286896169226527234</id><published>2011-10-10T13:42:00.000-07:00</published><updated>2011-10-10T13:42:30.533-07:00</updated><title type='text'></title><summary type='text'>FIOS Router CLI and DHCP


I recently got Verizon FIOS service.  The router Verizon provides is an Actiontec MI424WR.  Verizon goes to some trouble to hide the Actiontec branding; but, for example, the Model Name field in the System Monitoring tab on mine says "MI424WR-GEN2".

Anyway, I wanted to get the DHCP lease database out of the router in order to populate that information into my own DNS </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/8286896169226527234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=8286896169226527234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/8286896169226527234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/8286896169226527234'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2011/10/fios-router-cli-and-dhcp-i-recently-got.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-2486755448904560419</id><published>2011-10-07T11:20:00.000-07:00</published><updated>2011-10-07T11:21:42.800-07:00</updated><title type='text'></title><summary type='text'>Python Packages

I'm new to the Python and Django world, having primarily worked with Ruby and Ruby on Rails for the last few years.  In reading about how to manage dependencies several folks referred to pip and distribute as the new hotness (literally).  Ok, fine, they're probably something like ruby gems, but what's the difference?

Looking over their respective pages (http://pypi.python.org/</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/2486755448904560419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=2486755448904560419' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/2486755448904560419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/2486755448904560419'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2011/10/im-new-to-python-and-django-world.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-7671498867093933814</id><published>2011-08-23T06:50:00.000-07:00</published><updated>2011-08-23T06:50:42.438-07:00</updated><title type='text'></title><summary type='text'>Upgraded to Mac OS 10.7 (Lion)?  Tried to update Macports with sudo port selfupdate and get:

Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: shell command failed (see log for details)


You probably still have the Snow Leopard version of Xcode installed.  Try to run Xcode, it will probably tell you that you need to upgrade.  Go delete the Install Xcode app</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/7671498867093933814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=7671498867093933814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/7671498867093933814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/7671498867093933814'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2011/08/upgraded-to-mac-os-10.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-3459059932563196865</id><published>2011-04-12T22:56:00.000-07:00</published><updated>2011-04-12T22:56:39.435-07:00</updated><title type='text'></title><summary type='text'>I'm working on a MacRuby project in Xcode.  I upgraded Xcode from 4.0 to 4.0.1 and Interface Builder stopped working right for my project.  New outlets weren't showing up so I couldn't connect them to UI elements.  I eventually realized that in the Xcode upgrade the MacRuby templates got wiped out.  A reinstall of MacRuby got things working again.</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/3459059932563196865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=3459059932563196865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/3459059932563196865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/3459059932563196865'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2011/04/im-working-on-macruby-project-in-xcode.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-8379002315432539206</id><published>2011-04-06T10:19:00.000-07:00</published><updated>2011-04-06T10:24:33.890-07:00</updated><title type='text'></title><summary type='text'>Filesystem Hierarchy Standard for Mac OS X

I frequently refer to the Filesystem Hierarchy Standard when trying to figure out where to put files on Linux systems.

I recently started doing some Mac development and was looking for an equivalent document.  Apple's File System Overview seems to cover similar ground.</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/8379002315432539206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=8379002315432539206' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/8379002315432539206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/8379002315432539206'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2011/04/i-frequently-refer-to-filesystem.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-1070184213565097412</id><published>2010-05-14T15:41:00.000-07:00</published><updated>2012-01-26T07:26:42.530-08:00</updated><title type='text'></title><summary type='text'>User-Friendly RESTful Routes in Rails

RESTful routes created via map.resources use the :id field for URLs for individual resources.  I.e. if user 'joebob' has an id of 42 then the URL for his resource is http://example.com/users/42

I find those URLs rather user-unfriendly.  Wouldn't http://example.com/users/joebob be nicer?

If you plan for this from the start you can fake out rails by using a </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/1070184213565097412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=1070184213565097412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/1070184213565097412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/1070184213565097412'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2010/05/user-friendly-restful-routes-in-rails.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-6539660371687990789</id><published>2010-04-05T15:37:00.000-07:00</published><updated>2010-04-05T15:37:25.983-07:00</updated><title type='text'></title><summary type='text'>I needed to set the UID for an account on my Mac OS X 10.6 (Snow Leopard) box.  Various posts online said that you can right click on an account in System Preferences -&gt; Accounts to access the Advanced Options.  But right clicking wasn't doing anything for me.  Finally I tried a Ctrl-click, the standard way to "right click" when you only have a one button mouse, and that worked.  My right button </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/6539660371687990789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=6539660371687990789' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6539660371687990789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6539660371687990789'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2010/04/i-needed-to-set-uid-for-account-on-my.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-1498200590066851464</id><published>2009-09-02T14:53:00.000-07:00</published><updated>2009-09-02T15:00:44.979-07:00</updated><title type='text'></title><summary type='text'>If your Ruby app using https or some other form of SSL is complaining about:net/http.rb:567: warning: can't set verify locationsThen you probably passed in a bogus path to your CA file or path.  In my case I had:http.ca_file = '/etc/pki/tls/certs/ca-bundle.crt'http.verify_mode = OpenSSL::SSL::VERIFY_PEERThat path is right on Red Hat, but I was running the script on my Mac laptop.  Whoops.  Fixed </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/1498200590066851464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=1498200590066851464' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/1498200590066851464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/1498200590066851464'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/09/if-your-ruby-app-using-https-or-some.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-4208612255304348779</id><published>2009-08-31T11:58:00.000-07:00</published><updated>2009-08-31T15:38:47.337-07:00</updated><title type='text'></title><summary type='text'>I've been using the workaround shown at http://blog.zenspider.com/2008/05/httpsssl-warning-cleanup.html for a while now to eliminate the "using default DH parameters" warning you get when using https in Ruby.  However, I recently tried to reference two of my libraries which contained the same workaround in a script and ran into a "stack level too deep" error as the two sets of code both tried to </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/4208612255304348779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=4208612255304348779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/4208612255304348779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/4208612255304348779'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/08/ive-been-using-workaround-shown-at.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-2016513502760998775</id><published>2009-08-25T10:24:00.000-07:00</published><updated>2009-08-25T10:33:19.396-07:00</updated><title type='text'></title><summary type='text'>Excel on the Mac defaults to portrait mode.  Nearly all spreadsheets I create I want in landscape and finally tracked down how to set this as the default.Open up a new documentSet it to landscape via File -&gt; Page SetupGo to File -&gt; Save AsSwitch to the /Applications/Microsoft Office 2008/Office/Startup/Excel folderSet the filename to WorkbookUncheck the Append file extension checkboxSaveQuit and </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/2016513502760998775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=2016513502760998775' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/2016513502760998775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/2016513502760998775'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/08/excel-on-mac-defaults-to-portrait-mode.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-6280092969367451675</id><published>2009-07-24T10:04:00.000-07:00</published><updated>2009-07-24T10:24:30.565-07:00</updated><title type='text'></title><summary type='text'>How to insert a new line above the current line in TextMate?  A la capital O in vi?  I couldn't find it in the TextMate book, nor searching around online.  A few seconds of fiddling on the keyboard turned it up though:  command-option-returnThis makes sense, as command-return inserts a new line below the current line.  Having now looked around some more this command-option-return key sequence is </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/6280092969367451675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=6280092969367451675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6280092969367451675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6280092969367451675'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/07/how-to-insert-new-line-above-current.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-1918044538942887381</id><published>2009-06-18T14:03:00.000-07:00</published><updated>2009-11-25T09:07:37.342-08:00</updated><title type='text'></title><summary type='text'>Update:  SourceForge no longer offers the Wikispaces wiki, this post is left up for historical curiosity.The default wiki for SourceForge projects is used to be called Wikispaces.  The CSS stylesheet configuration on the SourceForge Wikispaces is such that list items (HTML "li") are smaller than normal, and shrink as they are nested.  Top level list items are smaller than I would care for, and by</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/1918044538942887381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=1918044538942887381' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/1918044538942887381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/1918044538942887381'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/06/default-wiki-for-sourceforge-projects.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-1145297725017962975</id><published>2009-05-04T13:54:00.000-07:00</published><updated>2009-05-04T14:08:56.930-07:00</updated><title type='text'></title><summary type='text'>With the Oracle client 10.2.0.1.0 installer if you are automating the install with a response file, set UNIX_GROUP_NAME to something like say 'dba', then run the install but you are not in the dba group the install will fail with:SEVERE:S_OWNER_SYSTEM_EPERMI found nothing useful via a search for that error so I thought I'd post something.  It would seem that you need to set UNIX_GROUP_NAME to a </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/1145297725017962975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=1145297725017962975' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/1145297725017962975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/1145297725017962975'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/05/with-oracle-client-10.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-7132917032616915426</id><published>2009-04-24T17:47:00.000-07:00</published><updated>2009-04-24T17:55:52.080-07:00</updated><title type='text'></title><summary type='text'>I was working on building the mysql ruby gem.  My mysql install is in a non-standard location.  I could get the gem to build with syntax like:gem install mysql -- --with-mysql-config=/path/to/bin/mysql_configHowever, I noticed that the resulting library did not embed the path to the mysql library, ldd on the mysql.so indicated:libmysqlclient.so.16 =&gt; not foundI did not want to have to fiddle with</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/7132917032616915426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=7132917032616915426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/7132917032616915426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/7132917032616915426'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/04/i-was-working-on-building-mysql-ruby.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-2888028653396449537</id><published>2009-03-12T11:40:00.000-07:00</published><updated>2009-03-12T14:44:38.846-07:00</updated><title type='text'></title><summary type='text'>Speaking of Perl, Ruby and sorting, sort in both Perl and Ruby allow you to specify a code block to implement your own arbitrary sorting routine.  Perl's documentation shows you how you can define this as a subroutine and just reference the subroutine when you call sort.  This is handy both for re-use and when your sort routine is complex and doesn't easily fit on one line.  Ruby's sort </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/2888028653396449537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=2888028653396449537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/2888028653396449537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/2888028653396449537'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/03/speaking-of-perl-ruby-and-sorting-sort.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-6021240429607037579</id><published>2009-03-11T17:22:00.000-07:00</published><updated>2009-03-12T11:23:39.930-07:00</updated><title type='text'></title><summary type='text'>When sorting complex structures in Perl is is common to use syntax like:sort { $lname{$a} &lt;=&gt; $lname{$b} || $fname{$a} &lt;=&gt; $fname{$b} } @namesThe Perl sort documentation lists examples with this syntax.  True to form the Ruby sort documentation doesn't show examples of anything that complex.  Best I can tell anything like this doesn't work in Ruby:a &lt;=&gt; b || c &lt;=&gt; dAny way I write that I get back</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/6021240429607037579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=6021240429607037579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6021240429607037579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6021240429607037579'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/03/when-sorting-complex-structures-in-perl.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-7344407882044572412</id><published>2009-03-04T16:00:00.000-08:00</published><updated>2009-03-04T16:06:23.660-08:00</updated><title type='text'></title><summary type='text'>A couple of MacPorts errors I just encountered:Error: Unable to execute port: can't read "frameworks_dir": no such variableI had version 1.6 and it seems the recommendation to fix this is to update to 1.7 (via port selfupdate).  I started port in interactive mode, ran selfupdate, then tried my install again and got:Error: Unable to open port: can't read "porturl": no such variableI wasn't sure if</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/7344407882044572412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=7344407882044572412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/7344407882044572412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/7344407882044572412'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/03/couple-of-macports-errors-i-just.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-6600464623485932187</id><published>2009-01-15T14:46:00.001-08:00</published><updated>2009-01-15T14:52:46.792-08:00</updated><title type='text'></title><summary type='text'>It's a mystery to me why the FreeBSD folks don't publish this better (for example, a mention on http://www.freebsd.org/security/ doesn't seem unreasonable), but FreeBSD has an easy to use system for updating the base system:# freebsd-update fetchReview the changes to be applied, then# freebsd-update installIf there's a new kernel in there then you should reboot.  That's it.  Not quite sure when </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/6600464623485932187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=6600464623485932187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6600464623485932187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6600464623485932187'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/01/its-mystery-to-me-why-freebsd-folks.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-6700963524462543016</id><published>2009-01-06T18:01:00.001-08:00</published><updated>2009-01-08T14:20:35.810-08:00</updated><title type='text'></title><summary type='text'>Went looking around today for a way to generate charts/graphs in my Rails apps.  Wow are there a lot of choices.The executive summary is that I'm going to use the first Open Flash Chart plugin listed.  I'm adding charts mainly for the "wow, neat" effect and the Flash charts max out that aspect.  It seems like I might be able to work around the problems with printing.  My second choice would </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/6700963524462543016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=6700963524462543016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6700963524462543016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6700963524462543016'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2009/01/went-looking-around-today-for-way-to.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-1194627145946825838</id><published>2008-06-20T14:00:00.000-07:00</published><updated>2008-06-20T15:05:30.898-07:00</updated><title type='text'></title><summary type='text'>I haven't dug around in the commit logs enough to figure out when support was added (looks like it has been there a while), but with Rails 2.1 the documentation caught up and ActiveRecord::Serialization#to_xml supports nested includes.  Note that the syntax of the hash that :include is expecting is different from the syntax of the :include hash for find, for whatever reason, so check the </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/1194627145946825838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=1194627145946825838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/1194627145946825838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/1194627145946825838'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2008/06/i-havent-dug-around-in-commit-logs.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-312057623413669387</id><published>2008-06-16T16:28:00.000-07:00</published><updated>2008-06-18T09:59:25.365-07:00</updated><title type='text'></title><summary type='text'>I tried to install RHEL 5 x86_64 in a VMware Server 2.0 Beta 2 virtual machine.  The host system has a 64 bit CPU and the virtual machine had been configured for a 64 bit OS.  Nevertheless the installer failed with:Your CPU does not support long mode. Use a 32 bit distributionSome poking around turned up this VMware document.  In short I had to go into the BIOS on my host system and enable </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/312057623413669387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=312057623413669387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/312057623413669387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/312057623413669387'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2008/06/i-tried-to-install-rhel-5-x8664-in.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-5624356195118561373</id><published>2008-06-16T16:06:00.001-07:00</published><updated>2008-06-16T16:14:12.133-07:00</updated><title type='text'></title><summary type='text'>I moved my Cacti install from one host to another.  After dealing with some other issues the poller seemed to be running more-or-less alright.  But the rrd files in the rra directory weren't updating and the graphs weren't displaying.  There weren't any obvious errors in cacti.log.  Looking around on the web folks mostly pointed to issues with file permissions on the rrd files or the rra </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/5624356195118561373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=5624356195118561373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/5624356195118561373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/5624356195118561373'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2008/06/i-moved-my-cacti-install-from-one-host.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-7961766307100001075</id><published>2008-06-16T15:53:00.000-07:00</published><updated>2008-06-16T16:00:34.750-07:00</updated><title type='text'></title><summary type='text'>I had to install Firefox on a Red Hat Enterprise Linux 5 server to run the VMware Server web UI.  I did a 'yum install firefox', which pulled in a bunch of dependencies.  But firefox wouldn't start:% firefoxNo fonts found; this probably means that the fontconfig library is not correctly configured. You may need to edit the fonts.conf configuration file. More information about fontconfig can be </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/7961766307100001075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=7961766307100001075' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/7961766307100001075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/7961766307100001075'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2008/06/i-had-to-install-firefox-on-red-hat.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-6467339438346344221</id><published>2008-06-02T12:52:00.000-07:00</published><updated>2008-06-02T17:10:29.691-07:00</updated><title type='text'></title><summary type='text'>I'm working on enhancing nVentory to meet my employer's needs for an operations database.  I'm learning Ruby on Rails in the process and encountering a number of situations that seem poorly documented online.  I'm going to try to capture some of these here for posterity.  I'm starting this somewhat after the fact (having been working on this project for 5 or 6 weeks now), so these aren't </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/6467339438346344221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=6467339438346344221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6467339438346344221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/6467339438346344221'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2008/06/im-working-on-enhancing-nventory-to.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-110408784899534710</id><published>2004-12-26T10:58:00.000-08:00</published><updated>2004-12-26T11:04:08.996-08:00</updated><title type='text'></title><summary type='text'>Upgraded to Fedora Core 3?  yum-arch tells you it has been deprecated?  yum won't read your repositories anymore, complaining that repomd.xml doesn't exist?  You've been to http://linux.duke.edu/projects/metadata and it doesn't tell you what has replaced yum-arch?  Sigh, me too.  The magic answer is 'createrepo', there's an RPM for it that comes with FC3.</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/110408784899534710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=110408784899534710' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/110408784899534710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/110408784899534710'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2004/12/upgraded-to-fedora-core-3-yum-arch.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-109979777443218599</id><published>2004-11-06T19:16:00.000-08:00</published><updated>2004-11-06T19:22:54.433-08:00</updated><title type='text'></title><summary type='text'>Got myself a shiny new Nokia 6820 from AT&amp;T Wireless.  One of the attractions was the possibility of Internet access using Bluetooth from my PowerBook to the phone and GPRS/EDGE from the phone to the big I.  It took some poking around but it works and seems fairly speedy.  This page has a set of instructions for a different phone that apply pretty well.  I'm using the same "Nokia GPRS CID1" </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/109979777443218599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=109979777443218599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/109979777443218599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/109979777443218599'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2004/11/got-myself-shiny-new-nokia-6820-from-at.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-109045553796888695</id><published>2004-07-21T17:01:00.000-07:00</published><updated>2004-07-21T17:18:57.966-07:00</updated><title type='text'></title><summary type='text'>Notes to myself about how to use GPG:Export my own key for sending to others:gpg --armor --export [my name]Import another person's key:gpg --import [key file]  orgpg --keyserver [server] --search [their name]Then sign their key and indicate that I trust it (GPG will prompt for degrees of trust):gpg --edit-key [their name]  sign  trust  save</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/109045553796888695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=109045553796888695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/109045553796888695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/109045553796888695'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2004/07/notes-to-myself-about-how-to-use-gpg.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-106506366585306749</id><published>2003-10-01T19:54:00.000-07:00</published><updated>2009-11-25T09:03:59.494-08:00</updated><title type='text'></title><summary type='text'>Have you upgraded OpenSSH to 3.7.1p2 because of the security problems, do you have sshd configured to use PAM, and now your Windows clients can't connect?  Hey, what a coincidence, me too.If you look a little closer at the dialog box that the Windows client pops up when you do a Quick Connect, you'll notice that there is a pull down menu at the bottom labeled Authentication Method.  It defaults</summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/106506366585306749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=106506366585306749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/106506366585306749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/106506366585306749'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2003/10/have-you-upgraded-openssh-to-3.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5887256.post-106506420136215448</id><published>2003-08-25T20:03:00.000-07:00</published><updated>2009-11-25T09:03:59.497-08:00</updated><title type='text'></title><summary type='text'>Want to make sendmail's -bP flag work?  What's -bP do, you ask?  It prints the size of your mail queue (rather like the last line of mailq (aka sendmail -bp)) without printing all of the entries in the mail queue.First make sure your sendmail was compiled with shared memory support.  Run 'sendmail -bv -d0.12 root' and look for SM_CONF_SHM.  (Documented here)Then add the following to your </summary><link rel='replies' type='application/atom+xml' href='http://techbits.blogspot.com/feeds/106506420136215448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5887256&amp;postID=106506420136215448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/106506420136215448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5887256/posts/default/106506420136215448'/><link rel='alternate' type='text/html' href='http://techbits.blogspot.com/2003/08/want-to-make-sendmails-bp-flag-work.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/07377919426705058481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
