Skip to content

Instantly share code, notes, and snippets.

@Jmuccigr
Jmuccigr / OR_geoJSON_template.md
Created June 3, 2021 20:11
OpenRefine geoJSON export values for templating

Prefix

{
"type": "FeatureCollection",
"features": [

Row Template

@Jmuccigr
Jmuccigr / crop_morphology.py
Last active September 22, 2020 07:47 — forked from fabito/crop_morphology.py
Crop image to area of text only
#!/usr/bin/env python3
'''
Crop an image to just the portions containing text.
Usage:
./crop_morphology.py path/to/image.jpg
This will place the cropped image in path/to/image.crop.png.
@Jmuccigr
Jmuccigr / gist:6b8d839166ac2af7e4b893504be8feed
Created February 16, 2018 19:24
Mueller's February 2018 indictment, extracted from the PDF posted on-line at https://www.justice.gov/file/1035477/download (uncorrected)
UNITED STATES OF AMERICA
V.
INTERNET RESEARCH AGENCY LLC
A/K/A MEDIASINTEZ LLC A/K/A
GLAVSET LLC A/K/A MIXINFO
LLC A/K/A AZIMUT LLC A/K/A
NOVINFO LLC,
CONCORD MANAGEMENT AND
CONSULTING LLC,
CONCORD CATERING,
#!/usr/bin/env python
'''Crop an image to just the portions containing text.
Usage:
./crop_morphology.py path/to/image.jpg
This will place the cropped image in path/to/image.crop.png.
For details on the methodology, see
@Jmuccigr
Jmuccigr / gist:5691194
Created June 1, 2013 18:03
Output from "HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew upgrade pcre 2>&1" after usual upgrade method failed.
13:59 ~/ > HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew upgrade pcre 2>&1
==> Upgrading 1 outdated package, with result:
pcre 8.33
==> Upgrading pcre
rm /usr/local/bin/pcretest
rm /usr/local/bin/pcregrep
rm /usr/local/bin/pcre-config
rm /usr/local/include/pcreposix.h
rm /usr/local/include/pcrecpparg.h
rm /usr/local/include/pcrecpp.h
@Jmuccigr
Jmuccigr / cairofaillog
Created December 3, 2012 00:31
log for cairo install fail
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cairo configure 1.12.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/cairo/1.12.8 --with-x
## --------- ##
## Platform. ##
@Jmuccigr
Jmuccigr / cairofail
Created December 3, 2012 00:24
brew install -v cairo
19:00 /usr/ > brew install -v cairo
==> Downloading http://cairographics.org/releases/cairo-1.12.8.tar.xz
Already downloaded: /Library/Caches/Homebrew/cairo-1.12.8.tar.xz
xz -dc "/Library/Caches/Homebrew/cairo-1.12.8.tar.xz" | /usr/bin/tar xf -
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/cairo/1.12.8 --with-x
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/cairo/1.12.8 --with-x
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
@Jmuccigr
Jmuccigr / fasti-folder.csl
Created May 27, 2012 00:12
CSL file for on-line journal FASTI-FOLD&R (for Zotero)
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
<info>
<title>FASTI FOLD&amp;R</title>
<id>http://www.zotero.org/styles/fasti-foldr</id>
<link href="http://www.zotero.org/styles/fasti-foldr" rel="self"/>
<link href="http://www.fastionline.org/folderabout.php?view=authnotes" rel="documentation"/>
<link href="http://www.zotero.org/styles/acm-sigchi-proceedings" rel="template"/>
<author>
<name>John Muccigrosso</name>