Skip to content

Instantly share code, notes, and snippets.

@wittman
wittman / imgopt.sh
Last active May 9, 2023 15:30
imgopt
#!/usr/bin/env bash
set -e
set -o nounset
set -o errexit
RESTORE=$(echo -en '\001\033[0m\002')
RED=$(echo -en '\001\033[00;31m\002')
GREEN=$(echo -en '\001\033[00;32m\002')
YELLOW=$(echo -en '\001\033[00;33m\002')
<?php
/**
* FFExp2HTMLex.php - "Paging Edition" (customization by Micah Wittman) - Converts the output of ffexp.php into multiple HTML page files - Version 0.5 (2015-03-12)
*
* Based on:
*
* FFExp2HTML.php - Converts the output of ffexp.php in HTML - Version 1.0 (2010-22-12)
* Created by Claudio Cicali - <claudio.cicali@gmail.com>
* Released under the MIT license
*
(function(){function C(){function a(){var a=document.getElementById("ff__shadow"),b=document.getElementById("ff__foreground");if(!a||!b)clearInterval(n);else if(h!=b.offsetWidth||k!=b.offsetHeight)h=b.offsetWidth,k=b.offsetHeight,a.style.width=h+u+"px",a.style.height=k+u+"px"}if(!document.getElementById("ff__container")){var b;window.getSelection?b=""+window.getSelection():document.selection&&(b=document.selection.createRange().text);for(var c=0,e=window.ff__reshare?[]:document.getElementsByTagName("img"),
d=0;d<e.length;d++){var f=e[d];if(!(f.width<v||f.height<v)){c++;var l=q(f,"mouseover",w(D,f));r.push({element:f,cursor:f.style.cursor,listener:l})}}var g=m();g.id="ff__container";g.style.position="absolute";g.style.top=p().y+"px";g.style.right="0";g.style.width="auto";g.style.zIndex=1E5;d=m(g);d.id="ff__shadow";d.style.backgroundColor="black";d.style.position="absolute";d.style.zIndex=0;d.style.top="0";d.style.right="0";E(d,.3);d=m(g);d.id="ff__foreground";d.style.backgroundColor="white";d.style.zIndex=
2;d
/***
v.1.03 "Woot Tube" Release - woot.com photo auto-select feature addition, youtube image url fix.
v.1.02 "FLICKA" Release - flickr.com photo auto-select feature addition.
***/
(function() {
var kMinImageSize = 30;
var kOutlineColor = "#1030cc";
var kOutlineSize = 3;
var kShadowSize = 7;
var gAvailableImages = [];
@wittman
wittman / Renumber GEDCOM IDs
Last active December 12, 2015 03:09
Renumber GEDCOM IDs (for merging multiple files into one Webtrees genealogy database)
# GEDCOM / Webtrees Renumber IDs
# Micah Wittman, Copyright 2013, <wittman.org> <http://twitter.com/micahwittman>
# Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.gnu.org/licenses/) licenses.
require 'rubygems'
def write_pro(name, txt)
output_file = File.open($app_path + '/' + name.sub('.ged','.new.ged'), "w")
output_file << txt
output_file.close
@wittman
wittman / jquery.js
Created April 2, 2010 06:30
pipioCustomizeChrome - Google Chrome extension source files - Customizes http://pip.io - Replaces the nature background scene with a solid off-white colour. Collapses tall posts due to excessive new lines or content that causes height to exceed 225px.
/*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
@wittman
wittman / buzzSawChrome.user.js
Created March 8, 2010 18:20
buzzSawChrome - Google Chrome content extension - Adds avatars to beginning of comments on Google Buzz.Also, Removes Buzz Count (below Inbox count), but still tooltip shows count. Also, removes Friendfeed profile image imported into Buzz.
// ==UserScript==
// @name buzzSawChrome
// @namespace http://wittman.org/projects/buzzsawchrome/
// @description Google Chrome content extension - Adds avatars to beginning of comments on Google Buzz.Also, Removes Buzz Count (below Inbox count), but still tooltip shows count. Also, removes Friendfeed profile image imported into Buzz.
// @author Micah Wittman
// @include http*://mail.google.com/mail/*#buzz*
// @include http*://www.google.com/profiles/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
// @version 0.1.0
// ==/UserScript==
@wittman
wittman / buzzCommentAvatar.user.js
Created February 21, 2010 08:53
buzzCommentAvatar - Adds avatars to beginning of comments on Google Buzz
// ==UserScript==
// @name buzzCommentAvatar
// @namespace http://wittman.org/projects/buzzcommentavatar/
// @description Adds avatars to beginning of comments on Google Buzz
// @author Micah Wittman
// @include http*://mail.google.com/mail/*
// @include http*://www.google.com/buzz/*
// @include http*://www.google.com/profiles/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// @version 0.1.6
@wittman
wittman / pipioCustomize.user.js
Created February 9, 2010 06:32
pipioCustomize - BACKGROUND DESIGN: Nature scene background elements removed, light background inserted. SCROLL TALL POSTS OF ANY CONTENT TYPE added to whitespace module. Posts >= 250px in height get overflow set to scroll. Firefox/Greasemonkey and Safari
// ==UserScript==
// @name pipioCustomize
// @namespace http://wittman.org/projects/pipiocustomize/
// @description Customization for pip.io
// @author Micah Wittman
// @include http://pip.io/*
// @include https://pip.io/*
// @version 0.1.7
// ==/UserScript==
@wittman
wittman / stackoverflowIndentFourSpaces.php
Created January 6, 2010 23:16
stackoverflowIndentFourSpaces - Indent Four Spaces (for stackoverflow.com)
<?php
/*
Copyright (C) 2010 Micah Wittman | http://wittman.org/ | stackoverflow.m[a][t]wittman.org | http://stackoverflow.com/users/11181/micahwittman | http://twitter.com/micahwittman
Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.gnu.org/licenses/) licenses.
Hosted application:
http://wittman.org/projects/stackoverflowindentfourspaces/
Repositories:
http://wittman.org/projects/stackoverflowindentfourspaces/stackoverflowIndentFourSpaces.php