Skip to content

Instantly share code, notes, and snippets.

View mitcho's full-sized avatar

Michael Yoshitaka Erlewine mitcho

View GitHub Profile
@mitcho
mitcho / makeabstracts.py
Created November 19, 2016 06:26
makeabstracts.py
#!/usr/local/bin/python3
# Michael Yoshitaka Erlewine 2016, public domain
# instructions:
# brew install enscript
# Install PDFtk
# current build: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg
#
# setup csv with EasyChair ID, desired filename, authors
@mitcho
mitcho / gb4e-nels.sty
Last active December 22, 2015 00:08
gb4e modified to be left-aligned with examples indented 0.5in, as required by the NELS style guide. Use at your own risk!
% -*- LaTeX -*-
\def\gbVersion{4e}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Version 4export (= v. 4 minus the compatibility code)
% Based on hpk's gb.sty, revised for GM syllabus by ct,
% and incorporating macros adapted from J.Frampton, M. van der Goot en M.
% Covington. Full documentation in gb4e-doc.tex. Bug-reports
% and suggestions for improvements, other used features, please!
%
% The package gb4e may be distributed under the conditions of the LaTeX Project
@mitcho
mitcho / gist:5753794
Created June 11, 2013 01:00
JS bookmarklet for getting a summary display of how many abstracts have how many reviews submitted, on LinguistList EasyAbs's rating summary page. Requires jQuery to be loaded first, for example using a jQuerify bookmarklet. Also might require a modern JS implementation like a recent Firefox (uses array comprehensions).
javascript:(function(){counts={1:0,2:0,3:0,4:0};jQuery('table.ratesummary%20tr:not(:nth-child(1))').each(function(){counts[jQuery(this).find('td:nth-child(4)').text().replace(/\s/g,'').length]++;});alert([c+':'+counts[c]%20for%20(c%20in%20counts)].join(','));})()
@mitcho
mitcho / test-tools.php
Last active December 16, 2015 19:10
A tiny WordPress plugin which aids in automated screen capture testing: - if ?invisibletext=1 is set, all text will be set to be transparent - if ?genericimages=1 is set, all images will be blacked out - completely turns off authentication: DO NOT USE ON A PUBLICLY-ACCESSIBLE SITE
<?php
/**
* Plugin Name: Test Tools
* Plugin URI:
* Description: mitcho's tools for automated testing.
* Author: mitcho
* Version: 1.1
*/
class TestTools {