Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name ipol-cart
// @namespace http://tampermonkey.net/
// @version 0.1
// @description add a cart to store IPOL images
// @author kidanger
// @match https://ipolcore.ipol.im/demo/clientApp/demo.html*
// @grant none
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// ==/UserScript==
@kidanger
kidanger / trimtex.sh
Created September 11, 2018 09:45
The ugliest script to convert trimmed images in latex to cropped images.
#!/usr/bin/env bash
file=$1
dir=$(dirname $file)
nfile=${file}.new
cp $file $nfile
cat $file |
grep -E '^[^%]*\includegraphics.*trim={.*}.*$' |
@kidanger
kidanger / colorprint.lua
Created August 18, 2013 09:29
Lua module to enhance print output with ANSI colors
--[[
Usage:
print = require 'colorprint'
or
lua colorprint.lua test_colors
Feel free to modify, redistribute, or whatever you want without restriction.
]]
local _print = print
local esc = string.char(27, 91)