April 10, 2013
Many times you’d like to see the progress of a copy but sadly `cp` doesn’t have that feature.
Many posts online will show bash scripts that pipe `cp` into `grep`/`awk`/etc or use tools like `pv`. Alas, there is a much more simple way. Use `rsync`.
rsync -a --progress SOURCE_FOLDER DESTINATION_FOLDER
Throw the `—stats` flag for some stats after the transfer is done.
rsync -a --stats --progress SOURCE_FOLDER DESTINATION_FOLDER
March 25, 2013
If you’d like to do time sensitive conditionals on Apache, the following will help you get started. This is useful if you’d like certain content to be displayed based on time.
<!--#config timefmt="%Y%m%d%H%M" -->
<!--#if expr="$DATE_LOCAL < 201303281140" -->
<!--#elif expr="$DATE_LOCAL >= 201303281140 && $DATE_LOCAL <= 201303281205"-->
What we do here is set the time format to `%Y%m%d%H%M` which is year, month, day, hour, minute. For example “201303281140” for March 28th, 2013 at 11:40am.
Then if the current server time is before set time, we display `before.html`; if the time is during our two times, we display `during.html`; else we display `after.html`.
September 29, 2012
Warning: The following steps WILL format the device. Be sure to do a complete backup before preceeding.
- Download the Android SDK.
- Install the SDK as instructed.
- Follow the instructions on this page from the Android SDK’s “Adding Platforms and Packages”
- Check and install the “Android SDK Platform-Tools” only.
- You should have a directory called
android-sdk-mac_x86. Within that, there should be directory called
- Go as instructed to the “Return To Stock” page. Second post will have the FASTBOOT images. For stock Jelly Bean search for FH05. There is 6 files that need to download.
- Place all the downloaded files inside
- Shut down the device, then press and hold Volume Up, Volumn Down, and Power at the same time. This will enter to the bootloader.
- Connect the device via USB to the computer.
- Open terminal and go into the “platform-tools” directory.
- Enter the following lines, one at a time.
./fastboot flash boot boot.img
./fastboot flash bootloader bootloader.img
./fastboot flash recovery recovery.img
./fastboot flash system system.img
./fastboot flash radio radio-cdma.img
./fastboot flash radio radio-lte.img
- Enter the following to lock the device also.