Skip to content

Instantly share code, notes, and snippets.

View dataxpress's full-sized avatar

Tim Gostony dataxpress

View GitHub Profile
#!/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">
@jeremiegirault
jeremiegirault / UILayoutPriority+operations.swift
Created June 11, 2017 19:03
Helpers for UILayoutPriority for swift 4
extension UILayoutPriority: ExpressibleByFloatLiteral, ExpressibleByIntegerLiteral {
public init(floatLiteral value: Float) {
self.init(rawValue: value)
}
public init(integerLiteral value: Int) {
self.init(rawValue: Float(value))
}
public static func +(lhs: UILayoutPriority, rhs: UILayoutPriority) -> UILayoutPriority {