Archive for the ‘OS-X’ Category.

Simple HTTP server in OS-X

If you need a quick way to share a directory
Open a terminal window, change to the directory you want to share and type

python -m SimpleHTTPServer 8080

It’s even better as an alias.

alias serve='echo Serving ${PWD} from ${HOSTNAME}:8080$;python -m SimpleHTTPServer 8080'

From Macworld

Expand a range of numbers

I always – always – forget the seq command
Continue reading ‘Expand a range of numbers’ »

Convert upper case to lower case

cat /tmp/blah | tr '[A-Z]' '[a-z]'

and to convert from lower case to upper case

cat /tmp/blah | tr '[a-z]' '[A-Z]'

NMAP tip

To scan an entire subnet for OS fingerprints and output to a grep-able file

nmap -oG XXX.txt -O 10.10.XXX.0/24

Dock Spacer in OS-X

To Add a space to your Dock in OS-X.

defaults write com.apple.dock persistent-apps -array-add '{ "tile-type" = "spacer-tile"; }'
killall Dock