I occasionally run into weird permission problems after a restore of files and folders on my machine, I think it has to do with OSX trying to protect me from myself.

Today I needed to fire up my coding environment on my Mac Mini, so I jumped into the folder for the code that I wanted to update using SourceTree, and did (what I thought was going to be) a quick pull, only to get a weird error message.

I figured it was probably something goofy, so I went to the command line, only to get another weird error:

Well, I’ve seen that before, and knew that message was probably because I’ve updated the OS a few times since I last coded. Basically it means the XCode command line tools are missing. Fixing that is easy: just run:

This fires up the Xcode installer, which will ask you if you want to install Xcode, or just the command line tools. In this case I don’t need Xcode, so I chose the latter.

That took a pretty long time (it was on “about a minute left” for at least 10 minutes), which was a bit worrisome, but not all that unusual.

Going back to the command line, I tried to do my “git pull” only to get another error:

OK, weird – why can’t it write that. Found a few things online that suggested running “git gc” might fix it, so I tried that, but that just gave me this error:

More curious Googling, and finding the suggestion to look at the extended file permissions, so I tried that:

Wait, what’s this “group:everyone deny delete” ? Well, no wonder I can’t run stuff that updates these folders. More Googling and I find the right switch for chmod to clear out the extended permissions:

Note that I had the two flags reversed the first time and the command told me it couldn’t find a file named “-R”. After running the above, the folder permissions looked more normal:

And my commands worked as expected.

For testing, sometimes I need to validate web behaviors like redirects on SSL, and one of the reasons I love the Mac is that it gives me a ready to roll Apache server. I actually run a local copy of my web site on my Mac, and have it set up as a virtual host so that I can just browse directly to it. Continue reading

I get a chuckle over this every time it happens. Something in one of the many synch tools I use does some sort of conversion of birth dates, and I end up with alerts on my Mac that tell me somebody is having a really great birthday:

Screen Shot 2015-01-25 at 10.46.55 AM

I also see the opposite where I’ll get a reminder that today is somebody’s second or third birthday.

In the case of the ones where they show up younger, it’s usually because wherever I got their birthdate from originally, they didn’t put in the year. So that usually ends up being the year that the contact was entered into my address book.

But in the case of the incredibly old dates, my address book typically has an 1800’s date, so my guess is it’s some system breaking on a date overrun. I’ve also noticed that sometimes these contacts have two birth dates in my address book (again, some symptom of a synch problem), so for instance Reinald has both a birthday in the 1800’s and one a littler more reasonable than that.

Screen Shot 2015-01-25 at 11.24.02 AM

Screen Shot 2014-09-27 at 12.18.14 PMI was updating my network to use a different subnet and realized that the last time I did that, my HP printer stopped working because a lot of the network drivers set the IP address into the printer settings.

So I figured that maybe I would need to update the printer’s IP address on my Mac. I looked at the printer settings and didn’t see anything that might work.

Continue reading

After getting my new Mac Mini pretty well set up with my development tools, I started playing with Amazon AWS. When trying to connect to one of my instances using their built in tool, Firefox bailed and I was presented with a prompt asking me if I wanted to install Java:

To open “Firefox,” you need a Java SE 6 runtime. Would you like to install one now?

Now this message looked very official, and I’d seen it before when starting up something on a new Mac that required Java, but since I’d already installed the latest JDK I was thoroughly confused. I thought, “OK, maybe you didn’t install Java after all”

So I popped open a terminal and

mini:~ robweaver$ java -version
java version “1.7.0_09″
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode.

OK, so that’s not it – so I changed browsers and tried the browser check at http://javatester.org again, only to get the same results …

Ouch – so I dug around a bit, and couldn’t find anything about how to fix it. And in fact the little bit I did find only confirmed that the browser plugin was active and the right version.

So finally I decided to punt and just let it install – Clicking the button to to let it start ran a package that looked like it was installing something, and when it was done another trip to javatester.org showed that somehow the plugin had been fixed and was now giving me the right version of Java in all my browsers.

Java Version tester

The only thing I can guess is that there was something that had to be set up on first use, but it did give me a start when being asked to install Java SE 6. Fortunately, whatever it did, it didn’t muck with my JVM and I’ll just have to hope that it didn’t break anything elsewhere.

 

I’m doing some work on a project that is using PHP, and have been working on setting up some continuous integration build scripts to make sure that we have a shot at catching errors before they make their way to production.

Recently some unit tests were added for the “forgot password” code, which uses the mcryp

t libraries which are not installed by default on Mac OSX, so I was seeing this error:


So some quick Google searches, and I found a couple of blogs with “how to” install the library (links at the end of this post), and proceeded to get this done.

First step was to download the mcrypt from SourceForge at http://sourceforge.net/project/showfiles.php?group_id=87941

Once I had the file, I opened a command prompt and ran:

Next I ran configure, setting the appropriate flags for my envirionment (note – I didn’t do this for the other configures, probably would have been a good idea):

This sets up the make file, so you can run the next two commands:

Next to make the PHP library, I needed the PHP source files, so I went out and grabbed PHP 5.3.15 (since that’s the version I have when I run php -version) by going to http://us3.php.net/get/php-5.3.15.tar.bz2/from/a/mirror. Note that you can simply change the version number in that URL to get the version you need.

Once I had that I did the following:

This of course gave me an error about autoconf not being installed:

From there I installed autoconf by doing the following:

Then back to the php mcrypt folder and reran the phpize step to and finish building:

Finally an edit to the php.ini file which was simply to add the extension:

And of course a quick restart of Apache and the extension shows up and I can run my unit tests successfully.

Related posts:

http://www.coolestguyplanettech.com/how-to-install-mcrypt-for-php-on-mac-osx-lion-10-7-development-server/

http://michaelgracie.com/2011/07/21/plugging-mcrypt-into-php-on-mac-os-x-lion-10-7/

Enhanced by Zemanta

Just a quick note – I was guided toward doxygen, which is a tool that does source code documentation. It has a DMG installer, that includes an executable to run doxygen with a wizard.

But since my purpose was to run doxygen in an Ant build script, I needed to install the command line version.

I simply looked inside the application, and was able to see that the executable was in /Applications/Doxygen.app/Contents/Resources/

Adding a symbolic link to /usr/local/bin (which is in my PATH) did the trick:

Enhanced by Zemanta

I updated to OS X Lion a couple of days ago, and for the most part it was a smooth transition.

This is the first upgrade where Apple is using their App Store concept to distribute the OS, so it was a bit scary to hit “Purchase” and watch nothing happen for half an hour while Mac OS X 10.7 downloaded in the background.

There’s no real indication of anything going on unless you happen upon the “Purchase” tab in the App Store App (seems a bit redundant, doesn’t it?):

App Store purchased items
After the long download, there was a typical OS install (well maybe not that typical, since it just worked) that ran for nearly an hour. Once that was done there were a couple of minor housekeeping items (like loading Java again separately for some reason), but all in all not much looked different than before.

I was happily exploring features like “Launchpad” and “Mission Control“, when I stumbled on a weird problem. My mouse wheel was scrolling the browser in reverse. That is, it was working in the more natural direction: scrolling the wheel up moved the text upward, and down moved things down.

At first I thought I had some weird virus, but when I upgraded my other Mac, I found the same issue. So I did a couple of quick searches on the Apple site, and found some mentions of the issue.

Apparently somebody at Apple decided the way things scroll has been backward all this time, and made the mouse default the other direction. There were some how-to fix it, but they showed screen shots from a Mac with an Apple mouse, which has a few more settings than what I saw:

Default Mouse Settings

While set this way, moving the mouse wheel up made the scroll bar go down, which was confusing to me, since that was what I always thought the wheel was tied to. But it did make the text scroll in the direction of the mouse wheel.

After a very short period, I got used to scrolling that way, but soon realized I’d be in trouble if I had to go to a Windows machine, so I simply unchecked the “when using gestures to scroll or navigate move content in the direction of finger movement” and I was back to “normal”.

Mouse settings

I’m sure at some point I’ll probably be sorry (like when I get an actual touch-screen Mac), but hopefully by then Apple will have a setting that will just make my mouse act like it does in Windows, and allow touch to act the way it should.

And then after all that, there is no DVD, no physical device in case something crashes. The theory is there’s a recovery partition (just like the old PC days), so you don’t need that.

Me being the old IT guy, I don’t trust that, so the next time I downloaded the Lion upgrade, I burned a DVD. The store will let you download the purchase again, but 4Gb still takes a long time, so media is king.

I got an email from Microsoft today (Office Insider) that included an article about how to add a calendar to Outlook that would give you the March Madness schedule in Outlook as an example of publicly shared calendars.

Publicly shared calendars are nothing new, they’ve been around for years: Apple created the webcal URI to access iCalendar files using WebDAV (over HTTP) for iCal.

So I figured Microsoft probably wouldn’t have reinvented the wheel here and tried clicking the link in the article to see if it would fire up iCal.

webcals dialog box

Turns out that the URI in the link was very slightly different than a standard iCalendar, so instead of the normal “webcal://” it starts with “webcals://”, which interestingly enough tried to fire up Outlook (in my Windows virtual machine).

Luckily this URI isn’t yet associated with a particular app, so I was able to click on the “Choose an Application” button and pick the iCal application.

Once iCal is chosen, the dialog box shows both Microsoft Outlook and iCal:after choosing iCal

After choosing the iCal application, and clicking “OK”, iCal fires up with a dialog asking you to enter the URL of the calendar you wish to subscribe to, with the URI from the web page showing:

iCal URL entry

Now clicking “Subscribe” of course doesn’t work, since iCal has no idea what to do with “webcals” as a URL.

So to fix this, you have to modify the URI to be either “webcal://” or “http://”  (turns out “https://” works as well).

So even though the URI is not quite the standard webcal one, it is possible to open as a web calendar with iCal, and the same trick works for Google Calendar. Just copy the URI from the link in the page (webcals://calendars.office.microsoft.com/pubcalstorage/9rc05lhz2204226/2011_NCAA_March_Madness_Calendar_Calendar.ics) by right clicking and copying the link:

copy link location

Going to my Google calendar, I then click the little “Add” button at the bottom of the “Other Calendars” area, and choose “Add by URL”.

This brings up the dialog box that lets me add the calendar, and I paste in the URL I copied before, and just edit the first part to be “https”:Add Calendar by URL

Since it’s already a public calendar, I didn’t check that box, although I’m thinking that makes it a public calendar on Google, which might make it easy to find with Google.  At any rate, now the calendar shows up for me both on iCal and Google (obviously it would work in Outlook as well had I followed the original link).

Google calendar with March MadnessiCal with March Madness

JetBlue Airways logo Category:Airline logos
Image via Wikipedia

I was on my way home from a business trip and wanted to print my boarding pass. Most hotels have a PC set up that is primarily for that purpose, and this one was no different.

The PC they provide is set up so that it wipes itself every time somebody logs in, which in theory protects you from somebody eavesdropping and/or stealing your information. The down side to this approach is that you’re stuck with whatever they decide is the right version of software to work with.

The problem (for me) came in because I was flying JetBlue. Now I love JetBlue, but they (for some unknown reason) use Flash in the page to print out your boarding pass.

You’d think this wouldn’t really be much of a problem, since I’m sure they probably have some sophisticated check that will catch if the browser doesn’t have Flash and redirect you.

… Except …

The PC did have Flash loaded, but the JetBlue page wanted a higher version installed than was on the machine. So the browser helpfully asked if I wanted to upgrade, which I said “yes” to, only to find that the generic login doesn’t have install permissions (surprise, surprise).

So I asked the desk to help, but they had even more locked down machines, so I figured I’d just have to punt.

Until I remembered that I had my Mac with me. I went to my room, ran through printing the boarding pass from the JetBlue site straight to PDF. Then I uploaded the PDF to my Google Docs.

Back down to the hotel computer, log into my Google Docs, open the PDF and presto – the boarding pass is printed !

Bottom line is that by relying on Google to connect me, I was able to get what I needed in spite of the software incompatibility. Once again I’m loving the cloud (and Google Apps).