There are always times when you zip, gzip and bzip2 files and directories to try and gain the highest compression ratio you can. But, have you tried LZMA compression? LZMA compression routinely obtains the highest compression ratio for any file type or directory of files. If you haven’t tried it, give it a try in… Continue reading Why To Use LZMA Compression
Pure insight into OS X & Mac computing.
Quickly Run A HTTP Server From Any Directory
Python makes it easy to run a simple http server from any directory on your system. From command line execute the following command from the directory you would like the server to run from: $ python -m SimpleHTTPServer 8080 A simple http server will be running with the root being whatever directory you executed the… Continue reading Quickly Run A HTTP Server From Any Directory
Debug and Inspect Webpages on AVD (Android Emulator) Browsers
There is a lot of documentation on the web on ways to debug websites for Android using their AVD (Android Virtual Device/Emulator). But I thought to make a simple step-by-step instruction to get a web debugger up and running for an AVD. Weinre is the debugger that I use. You can download weinre build from… Continue reading Debug and Inspect Webpages on AVD (Android Emulator) Browsers
SD Card Backup Image – Raspberry Pi Disk Clone
To make a backup / clone of an SD card from within OS X, open Terminal and run $ sudo dd if=/dev/disk2 bs=1m | gzip > ~/Desktop/raspberry_clone.gz (If you’re not sure what /dev/disk the SD card is, run $ diskutil list and you’ll see where the SD Card is mounted). It can take a while… Continue reading SD Card Backup Image – Raspberry Pi Disk Clone
Batch Rename files in 1 Shell Command
i=0; for x in *.jpg; do cp $x “image_$i.jpg”; i=$(($i+1)); done The above command will copy all jpeg files in a directory and give them a new name with an iterating numerical value. So if you had five images in a directory: bird.jpg, cat.jpg, dog.jpg, fish.jpg and hamster.jpg Executing the above command in the directory… Continue reading Batch Rename files in 1 Shell Command
Quick Command Line Compress with Zip
It’s always nice to have an easy and quick command to compress a directory, remove the git info as well as the .DS_Store files. zip -r9 directory_name.zip directory_name -x *.git* *.DS_Store*
Optimize PNG 24 With Transparency In OSX
An amazing tool for optimizing PNG-24 images with transparency in OSX: http://pngmini.com/ This optimizing program can drastically reduce a PNG-24’s size.
Chrome Browser Keywboard Shortcuts
Complete list of keyboard shortcuts for Google Chrome on Mac: Google Chrome Keyboard Shortcuts
Remove .DS_Store file from zip files
Open Terminal (/Applications/Utilities/Terminal) zip -d file.zip \*.DS_Store That will remove all .DS_Store files from the zip archive.
Convert PostScript Type 1,2 to TrueType font