Skip to content

Instantly share code, notes, and snippets.

View sgray10's full-sized avatar

Stephen Gray sgray10

  • devstudio42
  • TN / WA / VA
View GitHub Profile
@sgray10
sgray10 / encode.sh
Last active August 29, 2015 14:15 — forked from lisamelton/encode.sh
#!/bin/bash
# encode.sh
#
# Copyright (c) 2013 Don Melton
#
# This version published on June 7, 2013.
#
# Re-encode video files in a format suitable for playback on Apple TV, Roku 3,
# iOS, OS X, etc.
@sgray10
sgray10 / encode.sh
Last active August 29, 2015 14:16 — forked from lisamelton/encode.sh
#!/bin/bash
# encode.sh
#
# Copyright (c) 2013 Don Melton
#
# This version published on June 7, 2013.
#
# Re-encode video files in a format suitable for playback on Apple TV, Roku 3,
# iOS, OS X, etc.
# keybindings
unbind C-b
unbind C-r
unbind h
unbind j
unbind s
unbind v
unbind m
unbind C-f
@sgray10
sgray10 / gist:ab940a51d9fcb1dc48d5
Created September 19, 2015 23:25
Fast dd in OS X
seg$ diskutil unmountDisk /dev/disk1
seg$ sudo dd bs=1m if=somefile.iso of=/dev/rdisk1
From man hdiutil:
/dev/rdisk nodes are character-special devices, but are "raw" in the BSD sense and force block-aligned I/O. They are closer to the physical disk than the buffer cache. /dev/disk nodes, on the other hand, are buffered block-special devices and are used primarily by the kernel's filesystem code.
References:
http://daoyuan.li/solution-dd-too-slow-on-mac-os-x/
http://superuser.com/questions/631592/mac-osx-why-is-dev-rdisk-20-times-faster-than-dev-disk