Skip to content

Instantly share code, notes, and snippets.

View rodneyrehm's full-sized avatar

Rodney Rehm rodneyrehm

View GitHub Profile
@rodneyrehm
rodneyrehm / keep-focus.js
Last active December 19, 2015 04:59 — forked from drublic/keep-focus.js
Maintain Focus on elements within a given element
var tabbableElements = 'a[href], area[href], input:not([disabled]),'
+ 'select:not([disabled]), textarea:not([disabled]),'
+ 'button:not([disabled]), iframe, object, embed, *[tabindex],'
+ '*[contenteditable]';
var keepFocus = function (context) {
var elements = context.querySelectorAll(tabbableElements);
var keyListener = function (event) {
var keyCode = event.which || event.keyCode;
@rodneyrehm
rodneyrehm / html5-video.sh
Created December 6, 2011 20:14 — forked from yellowled/ffmpeg-html5
Convert videos to proper formats for HTML5 video on Linux shell using ffmpeg.
#!/bin/sh
# configure stuff
width=640
height=320
size=$width"x"$height
# show help
if [[ "$1" == "" || "$1" == "-h" || "$1" == "--help" ]]; then
echo "USAGE: ";