Great deal with Locko from binarynights

You can get it for just .99$ – harry up!

locko

If you have installed demo version and you have forgotten your master password (as I did) make sure to remove database file before starting Locko again

rm -rf ~/Library/Group Containers/J3CP9BBBN6.com.binarynights/Locko.lckdb

There is also great Locko manual. You can find it here.

Safari keeps asking me for keychain access

What worked for me are following settings

safari_1

safari_2

After cleaning all the stored passwords and disabling autofilling Safari eventually stopped to bother me with multiple questions regarding keychain access each time there were user/password fields on the web page.

Setting JAVA_HOME properly in Mavericks

export JAVA_HOME=$(/usr/libexec/java_home)

you can put it inside your ~/.profile.

Default icons for OS X – where can I find them?

If you are looking for all these fancy OS X icons (like ones below):

airportburnburnfolderFinderIconmacpro

You can find them here:

/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources

Just open Finder, choose from menu: Go -> Go to Folder … and paste above line.

Compare two XML files

Let’s say we have two files:

<!-- first file -->
<?xml version="1.0" encoding="UTF-8"?>
<sometag attr="1" attr2="2">
  Hello
</sometag>
<!-- second file -->
<?xml version="1.0" encoding="UTF-8"?>
<sometag attr2="2" attr="1">
  Hello
</sometag>

After cleaning with xmllint we can compare them.

xmllint --noblanks --c14n file_one.xml >file_one_tmp.xml;\
 xmllint --format -recover file_one_tmp.xml > file_one_canonical.xml
xmllint --noblanks --c14n file_two.xml >file_two_tmp.xml;\
 xmllint --format -recover file_two_tmp.xml > file_two_canonical.xml
diff file_one_canonical.xml file_two_canonical.xml

As you can see, the only difference lays in comments

2c2
< <!-- second file -->
---
> <!-- first file -->

XML files were transformed into normal form (http://en.wikipedia.org/wiki/Canonical%5FXML).

Mavericks – change computer name

In Mountain Lion it was enough to change settings inside

System Preferences -> Sharing -> Computer Name

In Mavericks, that’s not enough.

sudo scutil --set HostName $COMPUTER_NAME_GOES_HERE

OS X Maverics – USB based installation

1. Format USB drive using Disk Utility

format_usb

2. Use following command inside terminal

sudo /Applications/Install\ OS\ X\ Mavericks.app\
/Contents/Resources/createinstallmedia --volume\
 /Volumes/Untitled --applicationpath\
 /Applications/Install\ OS\ X\ Mavericks.app\
 --nointeraction

3. Restart mac book with Option key pressed

4. Choose USB as startup disk

5. Make sure to erase your previous installation of OS X in case you want to make really clean installation – otherwise system will be restored (e.g. you will have your previous user account)

Get full user name from console in Linux

Sometimes, simplest solutions are most efficient ones.

getent passwd `whoami`

nomachine server uninstall or disable – OS X – Mavericks

To uninstall or disable nomachine server on OS X:

All this, below, is wrong :)

I have figured out that this is not correct way to disable NX server. It uninstall client software as well.

sudo /Applications/NoMachine.app/ \
Contents/Frameworks/ \
bin/nxserver --uninstall
sudo /Applications/NoMachine.app/ \
Contents/Frameworks/ \
bin/nxserver --shutdown

And the procedure below, is OK :)

So, don’t disable nxserver as described above. Instead, do following:

sudo vi /Library/LaunchDaemons/com.nomachine.server.plist

and change

<key>RunAtLoad</key>
<true/>

to

<key>RunAtLoad</key>
<false/>

Update:

There is one more place you have to take care about

sudo vi /Library/LaunchAgents/com.nomachine.localnxserver.plist

and change

<key>RunAtLoad</key>
<true/>

to

<key>RunAtLoad</key>
<false/>

Packt is celebrating 2000th title – check this out

Packt is celebrating 2000th title released and they promote it with “buy one get one” promo. You can find details by clicking the banner below


2000th-Book-Home-Page-Banner

From my side, I suggest taking a look at following titles: Android Application Testing Guide and this one iPhone JavaScript Cookbook

←Older