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
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
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
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
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
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*
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.
Complete list of keyboard shortcuts for Google Chrome on Mac: Google Chrome Keyboard Shortcuts
Open Terminal (/Applications/Utilities/Terminal) zip -d file.zip \*.DS_Store That will remove all .DS_Store files from the zip archive.