Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
Showing 21-23 of 23 total

Convert plist files from binary to xml and back again

Enter these two commands into the terminal to toggle plist preferences files between XML and Binary

To convert a binary .plist file to XML format for editing, type this in the Terminal:
plutil -convert xml1 some_file.plist

To convert an XML .plist file to binary for use:
plutil -convert binary1 some_other_file.plist

start postgres

Postgres was installed through darwinports, so

/opt/local/lib/postgresql81/bin/pg_ctl -D /opt/local/var/db/postgresql81/defaultdb/ start

shell/vim .rc's for Japanese support (UTF-8)

Get Japanese (and other multibyte, ascii-unfriendly languages) working in the Terminal.

.inputrc (bash)
set convert-meta off
set meta-flag on
set output-meta on


.cshrc (tcsh)
set dspmbyte=utf8


.vimrc
:set enc=utf-8
:set fenc=utf-8


And don't forget 'ls -w' or 'ls -v' to display files and directories.

Preferences: Uncheck 'Emulation > Escape non-ASCII characters';

More at Apple Support - Topic: Displaying foreign characters in the Terminal command line.
« Newer Snippets
Older Snippets »
Showing 21-23 of 23 total