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 / brackets.json
Created September 17, 2014 15:13
Brackets.io settings for sprint 43 experimental build 0.43.0-14375. More sensible auto closing of tags, disabled smart indent.
{
"useTabChar": false,
"tabSize": 4,
"smartIndent": false,
"closeTags": {
"whenOpening": false,
"whenClosing": true
},
"spaceUnits": 4,
"closeBrackets": true,
@tlinkner
tlinkner / radioclasses.html
Created November 19, 2014 18:15
Set Classes by Radio Buttons and Checkboxes with JQuery
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Radio Classes</title>
<style>
.is-readonly {
color: red;
}
@tlinkner
tlinkner / docx2html.py
Last active August 29, 2015 14:17
Word Doc to Clean HTML
#!/usr/bin/env python
# Setup: install pandoc
# https://github.com/jgm/pandoc/releases
# To run script:
# python python docx2html.py [filepath]
# Platypus app setup:
# App Name: docx2html
# Script Type: Python
# Path: /usr/bin/python
# Script Path: Edit: [Paste In]
@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>
*/
@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 / 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 / hiworld.js
Created April 24, 2012 20:21
Hi, World!
alert('Hi.');
@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 / 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 / Bash svn cleaner
Created February 28, 2013 19:36
Recursively delete .svn directories
find . -type d -name .svn -exec rm -rf {} +