This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fits the firstLineIndent of a paragraph to the end of the previous paragraph | |
// as asked here: https://graphicdesign.stackexchange.com/questions/62916/ | |
#target InDesign | |
var defaultIndent = 5; | |
//Checks if a text frame with 2 or more paragraphs was selected. | |
if (app.selection.length < 1 || !(app.selection[0].parentStory.paragraphs.length > 1)) { | |
alert("Error\nSelect a text frame with at least 2 paragraphs and try again."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Two LEDs triggered by tilting of accelerometer | |
along Y axis. | |
Arduino Diecimila and Memsic 2125 | |
*/ | |
int ledPins[] = {6,7}; | |
int yPin = 10; | |
int yRaw; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The regex patterns in this gist are intended to match any URLs, | |
including "mailto:foo@example.com", "x-whatever://foo", etc. For a | |
pattern that attempts only to match web URLs (http, https), see: | |
https://gist.github.com/gruber/8891611 | |
# Single-line version of pattern: | |
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) |