OSX – Brew Commands

Install Homebrew ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)” Show available versions available for install: brew versions [formula] Install/Switch to a different version: brew switch [formula] [version] Stop using a version brew unlink [formula]

Continue Reading 0

Tesseract OCR

OSX: brew install imagemagick brew install tesseract –all-languages Debian/Ubuntu: apt-get install imagemagick tesseract\* Sample Usage:    convert input image to grayscale using imagemagik convert input.png -colorspace Gray output.tif     decode with tesseract tesseract output.tif result; cat result.txt

Continue Reading 0

SparkleShare + Dashboard

SparkleShare: # Run all of the following commands as the root su # Fetch the Dazzle script curl https://raw.github.com/hbons/Dazzle/master/dazzle.sh \ –output /usr/bin/dazzle && chmod +x /usr/bin/dazzle # Run the initial setup dazzle setup # Link SparkleShare clients using their link codes (found # on the client in the SparkleShare folder) dazzle link # Create a […]

Continue Reading 1

Bash Script Hosts file Ad Blocker

Put in cron or run manually. #!/bin/bash # If this is our first run, save a copy of the system’s original hosts file and set to read-only for safety if [ ! -f /etc/hosts.bak ] then echo “Saving copy of system’s original hosts file…” sudo cp /etc/hosts /etc/hosts.bak sudo chmod 444 /etc/hosts.bak fi # Perform […]

Continue Reading

Misc useful OSX commands

Remove the “Last login” message from the Terminal touch .hushlogin Enable/Disable Firewall defaults write /Library/Preferences/com.apple.alf globalstate -int 1 0 = off 1 = on for specific services 2 = on for essential services   launchctl load -w /System/Library/LaunchDaemons/ssh.plist launchctl unload -w /System/Library/LaunchDaemons/ssh.plist launchctl list | grep ssh

Continue Reading 0

iPhone: Disable Camera Shutter Sound

1. Create a ‘dummy’ file called photoShutter.caf. 2. In the iPhone file sytem, navigate to /System/Library/Audio/UISounds 3. Replace the photoShutter.caf file with the ‘dummy’ file you created Now the camera shutter will not make a sound.

Continue Reading 0

Driftnet – misc scripts

#!/bin/bash mpixW=250 mpixH=300 if [ “x`which identify`” != x ] ; then echo `which identify` found! echo Tossing images less than $mpixW pixels. while true ; do read img imgType=$( expr `identify -format ‘%e’ “$img”` ) if [ “$imgType” == “jpeg” ] ; then sizeW=$( expr `identify -format ‘%w’ “$img”` ) sizeH=$( expr `identify -format […]

Continue Reading 0

Powered by recycled bites and bytes.