Coding

Odd Git Licensing Message on OSX

Today,IOS 7 dropped to the general public. As usually comes with the release, there was an Xcode update. I updated.

 

For some time, I’ve been using the git bundled in Xcode as it makes it simpler to get updates as they come with Xcode. Today, that yielded an amusing message.

I use git via an alias in my .bashrc

alias git='xcrun git'

A simple version check reveals all:

 

git –version

xcode-git-message

Oops… git is apparently subject to Apple’s licenses.

Have fun RESTing!

Cheesy post titles aside…

I just discovered the very simple but incredibly useful RESTClient at: http://code.google.com/p/rest-client/ .

It’s a simple Java GUI app for testing out one’s REST services. You can choose your: URL, HTTP method, add any custom headers, add a body for PUT/POST, set auth info, SSL info, and do simple scripting.

This is an incredibly useful tool, AND a far cry better than doing it all on the command line with curl.

Updating RubyGems on Mac OS X 10.5 Leopard

I’m just posting a simple tip today.

I was wanting to play around with the very cool SASS meta-language using Compass. The language and tool are implemented in Ruby, which is pre-installed on OS X, but as I discovered, I needed a newer version of RubyGems.

I had already known I needed to update Gems, so I was doing the following:

$ sudo gem update

Eventually I got errors like this:

Updating installed gems...
Bulk updating Gem source index for: http://gems.rubyforge.org
Bulk updating Gem source index for: http://gems.github.com/
Attempting remote update of RedCloth
ERROR:  Error installing RedCloth:
    RedCloth requires RubyGems version >= 1.2
Attempting remote update of capistrano
ERROR:  Error installing capistrano:
    capistrano requires RubyGems version >= 1.2
Attempting remote update of net-sftp
ERROR:  Error installing net-sftp:
    net-sftp requires RubyGems version >= 1.2
Attempting remote update of net-ssh
ERROR:  Error installing net-ssh:
    net-ssh requires RubyGems version >= 1.2
Gems updated: RedCloth, capistrano, net-sftp, net-ssh

Turns out, to update RubyGems, one must update the gem system!

Logins with mod_rewrite, Cookies, and Javascript Redux

A while back I posted a simple solution for restricting website access in a situation where HTTP basic authentication couldn’t be used.

Not much more to the story, but I did make a few tweaks to my sample code. The mod_rewrite rule and javascript have been a tiny bit improved, so now after a successful login, it will try to redirect you to where you intended to go. (Previously, it always sent the user to /)