Skip to content

Instantly share code, notes, and snippets.

View mao-santaella-rs's full-sized avatar
🎯
Focusing

Mao Santaella mao-santaella-rs

🎯
Focusing
View GitHub Profile
@mathewbyrne
mathewbyrne / slugify.js
Created October 12, 2011 04:34
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
@cuibonobo
cuibonobo / ScaleStrokePalette.js
Created August 19, 2013 22:10
Illustrator script that creates a palette with a slider that allows you to scale the stroke width of the selected object. Written by Carlos Canto and posted in the Illustrator scripting forums. What's remarkable about this file is the streamlining of the BridgeTalk call, which allows the palette to execute functions while staying open.
// script.name = scaleStrokes.jsx;
// script.description = scales selected objects strokes only;
// script.required = one or more selected objects
// script.parent = CarlosCanto // 5/7/12;
// script.elegant = false;
// script.updates = preview ON by default // 5/7/12
#target Illustrator
#targetengine 'main'
var unscale = 0;