Archive | OSX

OSX Wireless / Airport Terminal Commands

Make airport app available: sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport Airport app commands: Supported arguments: -c[<arg>] –channel=[<arg>] Set arbitrary channel on the card -z –disassociate Disassociate from any network -I –getinfo Print current wireless status, e.g. signal info, BSSID, port type etc. -s[<arg>] –scan=[<arg>] Perform a wireless broadcast scan. Will perform a directed scan if the […]

Continue Reading 0

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

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

Powered by recycled bites and bytes.