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/ "$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
# Manages swapspace on a node. | |
# | |
# Based on https://gist.github.com/Yggdrasil/3918632 | |
# | |
# Parameters: | |
# - $ensure Allows creation or removal of swapspace and the corresponding file. | |
# - $swapfile Defaults to /mnt which is a fast ephemeral filesystem on EC2 instances. | |
# This keeps performance reasonable while avoiding I/O charges on EBS. | |
# - $swapsize Size of the swapfile in MB. Defaults to memory size. | |
# |
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 | |
/** | |
* Custom configuration bootsrtap file for ExpressionEngine | |
* | |
* Place config.php in your site root | |
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/config.php | |
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/database.php | |
* If you have moved your site root you'll need to update the require_once path | |
* |
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
sqlite3 ~Library/Messages/chat.db "DELETE FROM message WHERE text LIKE '%File:///%';" |
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
(function() { | |
function proxyAjaxEvent(event, options, dit) { | |
var eventCallback = options[event]; | |
options[event] = function() { | |
// check if callback for event exists and if so pass on request | |
if (eventCallback) { eventCallback(arguments) } | |
if (eventCallback) { eventCallback.apply(dit, arguments); } | |
dit.proxyProcessQueue(); // move onto next save request in the queue | |
} | |
} |
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
// Queue of Backbone.Model save()s so that we don't issue multiple POSTs while waiting for | |
// the first one to come back. The first save() will always POST and the second will always PUT now. | |
// https://github.com/documentcloud/backbone/issues/345 | |
// https://gist.github.com/1037984 and https://gist.github.com/gists/3148064 | |
(function() { | |
function proxyAjaxEvent(event, options, dit) { | |
var eventCallback = options[event]; | |
options[event] = function() { | |
// check if callback for event exists and if so pass on request | |
if (eventCallback) { eventCallback(arguments) } |
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
// ==UserScript== | |
// @name Gmail "From" Address auto-selector | |
// @version 0.18 | |
// @description Looks in your "To" field and sees if you have an email address in your "From" addresses with the same domain. Changes <select> onblur | |
// @author Andrew Sutherland, https://github.com/asuth | |
// @include http://mail.google.com/* | |
// @include https://mail.google.com/* | |
// @include http://*.mail.google.com/* | |
// @include https://*.mail.google.com/* | |
// ==/UserScript== |