Skip to content

Instantly share code, notes, and snippets.

@misteroneill
misteroneill / iphone_cleanup.sh
Created February 24, 2013 22:52
Use this script to quickly clean up duplicate iPhone images, which are named like this: "IMG_1234 1.JPG" where this is a copy of "IMG_1234.JPG", though it can take any pattern that will work with the `-name` argument of `find`. These files are sometimes the by-product of importing iPhone pictures via the Image Capture application. This script MU…
#!/bin/bash
#
# Use this script to quickly clean up duplicate iPhone images, which are named
# like this: "IMG_1234 1.JPG" where this is a copy of "IMG_1234.JPG", though
# it can take any pattern that will work with the `-name` argument of `find`.
#
# These files are sometimes the by-product of importing iPhone pictures via the
# Image Capture application.
#
# This script MUST be in the same directory as your photos! I did not add the
@misteroneill
misteroneill / dump-player-and-tech-events.js
Last active October 13, 2015 18:49
Log events for VideoJS 4 or 5 players and techs.
/* global window */
(function(player, vjs){
var is5 = vjs.VERSION.charAt(0) === '5';
var players = is5 ? vjs.getPlayers() : vjs.players;
// Nah.
if (is5 ? vjs.browser.IS_IE8 : vjs.IS_IE8) {
return;
}
@misteroneill
misteroneill / vjs-6-advanced.js
Last active January 11, 2017 16:38
Video.js 6 plugin examples.
const Plugin = videojs.getPlugin('plugin');
class Advanced extends Plugin {
constructor(player, options) {
super(player, options);
// Whenever the player emits a playing or paused event, we update the
// state if necessary.
this.on(player, ['playing', 'paused'], this.updateState);