When OS X refuses to remember your (Enterprise) WPA passwords

26. september 2012

Due to a password policy at work, we need to change the password for our Enterprise WPA network quite often. Unfortunately this has surfaced some weird bug in OS X, where it will prompt me for my password each time I log on the network, even though I can see it has been stored correctly in the Keychain. Got some tips from this post on the Apple Discussion forums, but it was not sufficient for me to get it working. I therefore present you the full five steps needed to fix this (at least in my case):

  1. Turn off Airport while doing this
  2. Open your Keychain (just search for «Keychain» in Spotlight) and remove the password associated with the WIFI you are having problems with
  3. Open Networks, press «Advanced» and remove your network from Airport
  4. Without closing the Advanced windows, open the tab marked «802.1X». This was the missing (crucial) step for me to get it working.
  5. Turn on Airport again, choose your network, and type in your username and password.

Hopefully you will no longer be prompted for your network password again!

[OS X] Better battery life while on the road.

10. februar 2012

After being annoyed for the last year that my MacBook Pro was eating up my battery life while in hibernation, I finally chose to investigate the matter further. Several articles describe the pmset command (here is one), but to make a long story short I wrote a script that will let my Mac enter hibernation mode (suspend to disk) immediately, without altering the settings (permanently at least).

I uploaded it to pastebin to increase the chances of it being spread. Link.

It should be pretty self explanatory, but to sum it up it does the following:

  1. Back up your existing hibernation settings
  2. Sets new ones that will suspend to disk and then cut power (not keeping any power to RAM)
  3. Hibernates (and shuts off)
  4. On power on, it restores the previous settings

If you find it useful, drop me a comment. Maybe I could make this into a small systray utility some day if someone finds it useful.

Matching Java method signatures with sed

10. november 2011

In the process of removing PMD warnings from our main product at work I was trying to automate some parts of this process by using sed (Stream EDitor), a command line program common on all Unices (such as OS X and Linux). I had already been using a regex in Vim to do remove final modifiers from methods on a file by file basis, but thought it might be quicker to do this using «find» and «sed» in stead. Boy was I wrong 🙂 But mainly just because of the different regex dialect of sed that took me a long time to figure out.

The problem was mainly due to trying to match square brackets, such as in «final public int[] myMethod(int[] args)». Les resten av dette innlegget »

Getting rid of Outlook reminders in Mac OS X

10. mars 2011

I just installed Office 2011 on my mac and tried using Outlook for a little while. Unsure of why, it seems to have somehow put all the elements from my iCal configured Google Calendar into my work calendar running on Exchange. Not sure how this happened though, but I nevertheless decided to continue using iCal to avoid any more troubles (and deleting hundreds of private calendar entries is a big pain!).

Anyway, Outlook still continued to throw reminders at me, something which was duplicating what iCal was already doing. So I searched for a possible solution, but the search turned out less than fruitful. I still found out how to do it though:

* Open the reminder app: /Applications/Microsoft Office 2011/Office/Microsoft Office Reminders.app
Use finder or just use Spotlight to find it.
* Press «Office-reminders» in the menu and press «Deactivate reminders». Voila!

If you ever want to turn them back on, repeat the above process, just swapping deactive for activate 🙂