Archive for January, 2014

Adding missing Keyboard Shortcuts to Mac OS X and OS X applications

There is a really cool feature in Mac OS X that enables you to add missing Keyboard shortcuts in OS X applications. For instance, I was missing a shortcut for Clearing the working environment in RStudio which removes the variables in the current workspace. To add this I added a keyboard shortcut for this in the App Shortcuts section in the System Preferences -> Keyboard -> Shortcuts section

Screen Shot 2014-01-24 at 19.31.14

If you want add shortcuts for sub-menu items you do this by using a “->” between the menu item names (see the File->New File->Text File example in the above screenshot).

I also very frequently select text and want to search for that on Google in a new Safari window, so I added a new shortcut for this in the Services section. The preferences for this look like this:

Screen Shot 2014-01-24 at 19.40.26

Tags:

Mac OS X X11 continously keeps craching

If some program requests to start X11 and X11 does not work you can end up in the situation that X11 keeps crashing even though you press “Quit”. This is due to X11 (and friends) are launched from “lunchctl”. To stop this use:


launchctl list

This gives you a set of jobs under “launchctl’s” command. You want to remove the “org.x.startx” job. This is done with:


launchctl remove org.x.startx

X11 should now stop keep crashing… 🙂

Bank ID pÄ Mac OX Mavericks

Detta funkade 2014-01-14 (Mac OS X Mavericks 10.9.1, BankId 4.19.4, Safari 7.0.1)

Med Safari, ladda ner BankId frÄn Skandiabanken
Passordet som man ska mata in i BankId applikationen för Certifikatet (BankID) pÄ fil mÄste ha minst 12 tecken, varav minst en siffra och minst fyra bokstÀver.
Dubbelkolla att det blir ett giltigt “Valid to”.

Nu kan man logga in pÄ FörskrÀpningskassan.

Puckat nog kan den skapa en BankId token UTAN ett giligt “Valid To” som ligger i Bank ID appen (och ser ok ut om man inte kollar pĂ„ ValidTo), men den gĂ„r inte att anvĂ€nda. NĂ€r man försöker logga in pĂ„ t.ex. FörskrĂ€pningskassan eller Skandiabanken med BankId som bara har ett Certifikat utan giltigt “Valid To” sĂ„ Ă€r Drop Down rutan för “Certificate” ut-grĂ„ad och man kan inte skriva in passord.

Screen Shot 2014-01-14 at 11.22.56

Unix date on format “day month time CET year” to something that EXCEL interprets as a date

The below formula converts:

Unix Date: Tue Dec 10 13:18:11 CET 2013

In Excel cell A1 into an

Excel understandable date: 2013-12-10 13:18:11

Formula in B1:
=RIGHT(A1;4)&”-“&IF(LEN(MATCH(MID(A1;5;3);{“JAN”;”FEB”;”MAR”;”APR”;”MAY”;”JUN”;”JUL”;”AUG”;”SEP”;”OCT”;”NOV”;”DEC”};0))>1;MATCH(MID(A1;5;3);{“JAN”;”FEB”;”MAR”;”APR”;”MAY”;”JUN”;”JUL”;”AUG”;”SEP”;”OCT”;”NOV”;”DEC”};0);”0″&MATCH(MID(A1;5;3);{“JAN”;”FEB”;”MAR”;”APR”;”MAY”;”JUN”;”JUL”;”AUG”;”SEP”;”OCT”;”NOV”;”DEC”};0))&”-“&MID(A1;9;2)&” “&MID(A1;12;2)&”:”&MID(A1;15;2)&”:”&MID(A1;18;2)

In Sweden the argument separator in Excel is “;” while otherplace it can be “,” so you might have to change that in the formula.

Elegant! (Joke)