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 / Output iOS PDF Assets.jsx
Created December 4, 2014 22:01
Sage Illustrator layers to PDFs Assets for iOS
// Output iOS PDF Assets.jsx
// 2014 Todd Linkner
// License: none (public domain)
// v1.0
//
// This script is for Illustrator CS6. It outputs iOS PDF assets from layers.
//
// Install to /Applications/Adobe Illustrator CS6/en_US/Scripts/Mobile
// bring Illustrator into focus
@tlinkner
tlinkner / Output Android Icons.jsx
Last active February 19, 2021 14:15
Photoshop script to output Android icons
// Output Android Icons.jsx
// 2012 Todd Linkner
// License: none (public domain)
// v1.0
//
// This script is for Photoshop CS6. It outputs Android icons of the
// following sizes from a source PSD at least 512px x 512px
//
// store:
// Icon.png (512px x 512px)
@tlinkner
tlinkner / Output iOS Icons.jsx
Last active March 21, 2019 18:06
Photoshop script to output iOS icons, now with iOS 8 sizes
// Output iOS Icons.jsx
// 2014 Todd Linkner
// License: none (public domain)
// v1.2
//
// This script is for Photoshop CS6. It outputs iOS icons of the following
// sizes from a source 1024px x 1024px PSD
//
// [name]-29.png
// [name]-29@2x.png
@tlinkner
tlinkner / Output Android Assets.jsx
Last active July 24, 2018 16:54
Photoshop script to output Android XHDPI, HDPI, MDPI, and LDPI PNGs
// Output Android Assets.jsx
// 2012 Todd Linkner
// License: none (public domain)
// v1.0
//
// This scrip is for Photoshop CS6. It outputs Android XHDPI, HDPI, MDPI,
// and LDPI PNG assets from HDPI source files. The resulting PNGs will be
// placed in sub-folders within your target folder.
/*
@tlinkner
tlinkner / Output iOS 1x Assets.jsx
Last active July 23, 2018 04:53
Photoshop script to output iOS 1x PNGs
// Output iOS 1x Assets.jsx
// 2012 Todd Linkner
// License: none (public domain)
// v1.0
//
// This script is for Photoshop CS6. It outputs iOS 1x PNG icons
// from @2x PNG source files
/*
// BEGIN__HARVEST_EXCEPTION_ZSTRING
@tlinkner
tlinkner / Output Android Assets.jsx
Created November 11, 2014 18:25
This script is for Illustrator CS6. It outputs Android standard assets from layers. It fits the artboard to the items on the layer, including items without fill and stroke.
// Output Android Assets.jsx
// 2014 Todd Linkner
// License: none (public domain)
// v1.0
//
// This script is for Illustrator CS6. It outputs Android assets from layers.
//
// Script concept and saveToRes function based on herkulano's
// Illustrator Script for Mobile: https://github.com/herkulano
//
@tlinkner
tlinkner / Gruntfile.js
Last active February 16, 2018 17:50
Grunt LiveReload with SASS and Local Server
module.exports = function (grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Watches for changes in the the specified files and run the task
watch : {
refresh : {
options :{
livereload: '<%= connect.options.livereload %>'
},
files: ['www/**/*.js','www/**/*.scss','www/**/*.css','www/**/*.html'],
@tlinkner
tlinkner / Gruntfile.js
Created February 23, 2016 02:14
Drupal 8 Grunt Livereload
module.exports = function (grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
prod: {
options: {
outputStyle: 'compressed'
},
files: {
/* 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);
# Rename files
### brew install rename
### Dry run
rename -nvs searchword replaceword *
### Rename
rename -vs searchword replaceword *
### Node renamer