Skip to content

Instantly share code, notes, and snippets.

View tlinkner's full-sized avatar

tlinkner tlinkner

  • TLDA
  • Providence, RI
View GitHub Profile
@tlinkner
tlinkner / BalanceDiagonal.jsx
Created January 11, 2017 20:52
This script is for Illustrator CC. It resizes objects to have the same diagonal dimension.
// BalanceDiagonal.jsx
// 2017 Todd Linkner
// License: none (public domain)
// v1.0
//
// This script is for Illustrator CC. It resizes objects to have the same diagonal dimension.
//
// Install to /Applications/Adobe Illustrator CC/en_US/Scripts/Mobile
// bring Illustrator into focus
# Install
brew install zint
# EAN
zint --directeps --height="30" --barcode="13" --data="123456789104" > 1234-ean.eps
# UPC
zint --directeps --height="30" --barcode="34" --data="12345678910" > 1234-upc.eps
# Help
@tlinkner
tlinkner / uc-words-to-lc-em
Created April 4, 2013 20:10
BBedit grep pattern to replace uppercase words with lowercase words wrapped in <em>.
# Find
([A-Z]{3,})
# Replace
<em>\L\1</em>
# Matching: Case sensitive
@tlinkner
tlinkner / Bash svn cleaner
Created February 28, 2013 19:36
Recursively delete .svn directories
find . -type d -name .svn -exec rm -rf {} +
@tlinkner
tlinkner / Output iOS Assets.jsx
Last active December 11, 2015 16:28
This script is for Illustrator CS6. It outputs iOS standard and @2x assets from layers. It fits the artboard to the items on the layer, including items without fill and stroke.
// Output iOS Assets.jsx
// 2013 Todd Linkner
// License: none (public domain)
// v1.0
//
// This script is for Illustrator CS6. It outputs iOS standard and @2x
// assets from layers.
//
// Script concept and saveToRes function based on herkulano's
// Illustrator Script for Mobile: https://github.com/herkulano
@tlinkner
tlinkner / tellsize.js
Last active October 12, 2015 16:18
Show browser dimensions
/* Debug: Tell Size
===========================================================
Show browser size. Turn off on production.
*/
(function () {
var ts = document.createElement('div');
ts.setAttribute("id", "msg");
ts.style.cssText = "padding:0.25em;position:fixed;bottom:0;right:0;font-size:0.75em;font-weight:bold;color:white;background:red;";
document.body.appendChild(ts);
@tlinkner
tlinkner / hiworld.js
Created April 24, 2012 20:21
Hi, World!
alert('Hi.');
@tlinkner
tlinkner / gist:edff88799a0cee42e4b6
Created May 13, 2015 19:29
Pandoc MS Word to Markdown
pandoc input-file.docx -t markdown -o output-file.md
@tlinkner
tlinkner / simpleServer.bash
Created April 2, 2015 19:14
Bash function to runa simple local server
server () {
python -m SimpleHTTPServer &
open http://0.0.0.0:8000
}
@tlinkner
tlinkner / aspect-wrapper.css
Created April 2, 2015 13:38
Fluid element that maintains a specific aspect ratio
/*
Fluid element that maintains a specific aspect ratio
====================================================
<div class="aspect-wrapper">
<div class="inner">
<img src="image.jpg" alt="Image">
</div>
</div>
*/