This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc) | |
hex=$((cat <<EOF | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* .htaccess compiler | |
* | |
* Recurse through all subdirectories, scan .htaccess files, and generate | |
* directives suitable for inclusion in an Apache configuration file. | |
* This lets you consolidate all .htaccess directives in the main | |
* (scanned once) Apache configuration. This has considerable | |
* performance and security benefits. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import yaml | |
import sys | |
import json | |
import argparse | |
from subprocess import Popen, PIPE | |
import argparse | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shows the location of the last photo in the canera roll in the Maps app. | |
# (thanks to @HyShai for pointing out that the latitude/longitude refs are necessary) | |
import photos | |
import webbrowser | |
meta = photos.get_metadata(-1) | |
gps = meta.get('{GPS}') | |
if gps: | |
latitude = str(gps.get('Latitude', 0.0)) + gps.get('LatitudeRef', '') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Name: EXIFmover.py | |
# Author: Brian Klug (@nerdtalker / brian@brianklug.org) | |
# Purpose: | |
# Move Files into directory based on EXIF data make and model | |
# Designed to un-clusterfuck the Dropbox camera upload directory which is a mess of every | |
# JPEG and PNG ever if you use it like I do on a bunch of phones, and thus totally unwieldy | |
# and full of images sorted by date or else nothing sometimes, dropbox seems nondeterminstic | |
# Moves files into /[Image Make]+[Image Model]/ eg /Camera Uploads/LGE Nexus 4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This work is licensed under the Creative Commons Attribution 3.0 United States License. To view | |
// a copy of this license, visit http://creativecommons.org/licenses/by/3.0/us/ or send a letter | |
// to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. | |
// Copyright 2009 John Tantalo <john.tantalo@gmail.com> | |
(function () { | |
// get selection | |
var selection = window.getSelection ? window.getSelection() : | |
document.getSelection ? document.getSelection() : |