Never been to DZone Snippets 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

« Newer Snippets
Older Snippets »
Showing 31-36 of 36 total

solve svn error "can't recode string" on Mac OS X

was getting this error on certain files until I added this to ~/.bash_profile :
   1  export LC_CTYPE="en_US.UTF-8"
   2  export LANG="en_US.UTF-8"

iTunes arrows search local library

A neat trick in iTunes 4.5 that changes the little arrows next to each artist/album/title to search your library for that string instead of the iTunes Music Store.

   1  defaults write com.apple.iTunes invertStoreLinks -bool YES

turn off disk image verification

   1  defaults write com.apple.frameworks.diskimages skip-verify true

Get a screenshot

   1  screencapture -S /tmp/screengrab.pdf ; sips -s format png /tmp/screengrab.pdf --out /tmp/screengrab.png; open /tmp/screengrab.png

Installing libjpeg on OS X

Get http://www.ijg.org/files/jpegsrc.v6b.tar.gz, and then:

   1  tar zxvf jpegsrc.v6b.tar.gz
   2  cd jpeg-6b
   3  cp /usr/share/libtool/config.sub .
   4  cp /usr/share/libtool/config.guess .
   5  ./configure --enable-shared --enable-static
   6  make
   7  sudo make install
   8  sudo ranlib /usr/local/lib/libjpeg.a

Check your Mac notebook's battery statistics

   1  /usr/sbin/ioreg -p IODeviceTree -n battery -w 0 | grep IOBatteryInfo

or

   1  ioreg -l -w0 | grep -i IOBatteryInfo
« Newer Snippets
Older Snippets »
Showing 31-36 of 36 total