roback.cc

the website of joe roback

Joe Roback

Make DVD ISO image from VIDEO_TS folder

Here is a quick shell script to use on Mac OS X to make a DVD iso from a VIDEO_TS folder. Save is as “mkdvdiso” and just specify the folder containing the VIDEO_TS folder, not the VIDEO_TS folder itself. You can also override the DVD name and choose between hdiutil (Mac OS X command line utility that uses the DiskImages framework) or mkisofs from the cdrtools package (I used macports to install cdrtools on my OS X 10.6 system).

#!/bin/bash
#
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER CONTRIBUTOR BE LIABLE FOR
# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

usehdiutil=1
usemkisofs=0
dvdname=""

while [ ${#} -gt 0 ]; do
	case "${1}" in
		-h|--hdiutil)
			usehdiutil=1
			usemkisofs=0
			shift
		;;
		-m|--mkisofs)
			usemkisofs=1
			usehdiutil=0
			shift
		;;
		-n|--dvd-name)
			dvdname="${2}"
			shift 2
		;;
		*)
			dvddir="${1}"
			shift
		;;
	esac
done

if [ -z "${dvdname}" ]; then
	dvdname="$(basename "${dvddir}")"
fi

echo -n "Making DVD ISO for ${dvdname} using "
[ ${usehdiutil} -eq 1 ] && echo "hdiutil"
[ ${usemkisofs} -eq 1 ] && echo "mkisofs"

if [ ${usehdiutil} -eq 1 ]; then
	hdiutil makehybrid  -iso -joliet -udf -udf-version 1.02 -default-volume-name "${dvdname}" -o "${dvdname}.iso" "${dvddir}"
fi

if [ ${usemkisofs} -eq 1 ]; then
	mkisofs -f -dvd-video -udf -V "${dvdname}" -o "${dvdname}.iso" "${dvddir}"
fi

Example Usage

mkdvdiso /Volumes/Fry/DVD_VIDEO

will make a image called DVD_IMAGE.iso in the current directory.

mkdvdiso -m -n MY_DVD /Volumes/Fry/DVD_VIDEO

will make a image called MY_DVD.iso in the current directory using mkisofs.

DD-WRT: Overclocking Linksys WRT610N v2 Router

To overclock your Linksys WRT610Nv2 using DD-WRT is relatively easy. You need can either run the commands in the Administration > Commands interface in the web GUI or on the command line through telnet or SSH. The WRT610Nv2 comes default clocked at 480MHz, but it can be pumped as high as 532MHz. Keep in mind going above 532MHz seems to cause the device to actual perform at a lower clock rate. Why do such a thing? After overclocking, I’ve seen a 2-3MB/s increase in my Samba file transfers, which is a warm welcome, since file transfers on these home routers is relatively poor due to the lightweight hardware these devices have.

Warning: overclocking may brick your device, overheat, or due other such things that cause it to permanently break. Proceed at your own risk.

To overclock just run the following commands

nvram set clkfreq="532,266,133"
nvram commit
reboot

To change it back to the factory defaults, just run

nvram set clkfreq="480,240,120"
nvram commit
reboot

Original Reference: Safe overclocking ‘speeds’ for WRT610N v2

DD-WRT: Shutdown script using Optware the Right Way

Ever want to shutdown your home router running DD-WRT with Optware the Right Way and correctly unmount any USB drives. Well DD-WRT doesn’t have a halt or a shutdown command, only reboot, but you could easily put the router a state that is safe to just pull-the-plug. Just create a shutdown script, say called /opt/local/bin/shutdown and put the following inside:

#!/bin/sh
/opt/etc/init.d/optK

Then make the script executable my changing the permissions.

chmod 755 /opt/local/bin/shutdown

Now as long as /opt/local/bin is in your current path, you can just type shutdown to cause Optware to initiate its shutdown sequence. When it finishes, you can simply power down the router without worry about your filesystems on your external disks.

SSHTunnel: A Cocoa Framework

In the spirit of open-source and the precursor to 2 cocoa applications I’ve been toying with over the past 2 years, I give you SSHTunnel Framework (over on github). The goal here is to create a standard framework to be used in commerical, free, and open-source cocoa applications that need to tunnel traffic over SSH. It requires Mac OS X 10.5 or later.

It is licensed under the BSD license. Feel free to use, modify, request features, and report bugs all through github.

iPhone Fail

Ever since iPhone 3.x, my iPhone seems to have a different concept of free space.

Not Enough Free Space ??

Not Enough Free Space ??