Skip to content

Instantly share code, notes, and snippets.


Ryan Mathews ryanjm

View GitHub Profile
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" "">
<plist version="1.0">
View Dictionary+KeyPaths.swift
import Foundation
extension Dictionary {
mutating public func setValue(val: AnyObject, forKeyPath keyPath: String) {
var keys = keyPath.componentsSeparatedByString(".")
guard let first = keys.first as? Key else { print("Unable to use string as key on type: \(Key.self)"); return }
if keys.isEmpty, let settable = val as? Value {
self[first] = settable
} else {
untergeek / kibana.json
Last active Mar 27, 2019
Simple Kibana dashboard for collectd stats
View kibana.json
"title": "Collectd: Blackbox",
"services": {
"query": {
"list": {
"0": {
"query": "plugin:\"load\"",
"alias": "Load",
"color": "#7EB26D",
"id": 0,
jbenet /
Last active Jul 27, 2020
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

erikh /
Created Mar 31, 2012 — forked from DAddYE/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
wagenet / Assetfile.rb
Created Jan 13, 2012
Ember Handlebars Precompile
View Assetfile.rb
require 'execjs'
class HandlebarsFilter < Filter
class << self
def contents
@@contents ||= ["headless-ember.js"),"ember.js")].join("\n")
def context
@@context ||= ExecJS.compile(contents)
casademora / gist:1067256
Created Jul 6, 2011
Regenerate Core Data files in an Xcode project
View gist:1067256
## Add this as a 'Run Script' step in your Xcode Project prior to the compile step
mogen=`which mogenerator`
if [[ -x $mogen ]]; then
echo "Updating data objects using $mogen"
cd "$PROJECT_DIR/Model" && $mogen -m MyProject.xcdatamodeld/MyProject.xcdatamodel -M ./generated -H ./entities
dhh / gist:1014971
Created Jun 8, 2011
Use concerns to keep your models manageable
View gist:1014971
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
c00kiemon5ter / post-commit
Created Jun 1, 2011
a hook to deploy static generated sites
View post-commit
#!/usr/bin/env bash
# executables prefix
# git executable
# site generation executable
# options for the generator
wolfeidau / sass_converter.rb
Created May 7, 2011
Sass plugin for Jekyll
View sass_converter.rb
module Jekyll
# Sass plugin to convert .scss to .css
# Note: This is configured to use the new css like syntax available in sass.
require 'sass'
class SassConverter < Converter
safe true
priority :low
def matches(ext)
You can’t perform that action at this time.