├── .gitignore ├── images ├── button.png └── select_arrow.gif ├── js ├── profiling │ ├── charts.swf │ ├── config.js │ └── yahoo-profiling.css ├── plugins.js ├── script.js ├── mylibs │ └── jquery.formalize.min.js └── libs │ ├── dd_belatedpng.js │ └── modernizr-1.6.min.js ├── css ├── handheld.css ├── demo.css ├── text.css ├── reset.css ├── formalize.css └── style.css ├── te-download.php ├── getsnippets.php ├── README.md ├── index.php ├── AppleScript Editor.tedist ├── AppleScript Editor.textexpander ├── iOSMarkdown.tedist ├── iOSMarkdown.textexpander ├── Filesystem.textexpander ├── Filesystem.tedist ├── CSS3.textexpander ├── CSS3.tedist ├── Lipsums.tedist ├── Lipsums.textexpander ├── Characters.textexpander ├── Characters.tedist └── Random Lipsums.textexpander /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /images/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ttscoff/Brett-s-TextExpander-Snippets/master/images/button.png -------------------------------------------------------------------------------- /images/select_arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ttscoff/Brett-s-TextExpander-Snippets/master/images/select_arrow.gif -------------------------------------------------------------------------------- /js/profiling/charts.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ttscoff/Brett-s-TextExpander-Snippets/master/js/profiling/charts.swf -------------------------------------------------------------------------------- /css/handheld.css: -------------------------------------------------------------------------------- 1 | * { 2 | float: none; /* Screens are not big enough to account for floats */ 3 | background: #fff; /* As much contrast as possible */ 4 | color: #000; 5 | } 6 | 7 | /* Slightly reducing font size to reduce need to scroll */ 8 | body { font-size: 80%; } -------------------------------------------------------------------------------- /js/plugins.js: -------------------------------------------------------------------------------- 1 | 2 | // remap jQuery to $ 3 | (function($){ 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | })(this.jQuery); 16 | 17 | 18 | 19 | // usage: log('inside coolFunc',this,arguments); 20 | // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ 21 | window.log = function(){ 22 | log.history = log.history || []; // store logs to an array for reference 23 | log.history.push(arguments); 24 | if(this.console){ 25 | console.log( Array.prototype.slice.call(arguments) ); 26 | } 27 | }; 28 | 29 | 30 | 31 | // catch all document.write() calls 32 | (function(doc){ 33 | var write = doc.write; 34 | doc.write = function(q){ 35 | log('document.write(): ',arguments); 36 | if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments); 37 | }; 38 | })(document); 39 | 40 | 41 | -------------------------------------------------------------------------------- /te-download.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/demo.css: -------------------------------------------------------------------------------- 1 | @import 'reset.css'; 2 | @import 'text.css'; 3 | @import 'formalize.css'; 4 | 5 | /* `Body 6 | ----------------------------------------------------------------------------------------------------*/ 7 | 8 | body { 9 | background: #fff; 10 | color: #000; 11 | } 12 | 13 | /* `Wrapper 14 | ----------------------------------------------------------------------------------------------------*/ 15 | 16 | #wrapper { 17 | margin: 0 auto; 18 | padding: 20px; 19 | width: 800px; 20 | } 21 | 22 | /* `Errors 23 | ----------------------------------------------------------------------------------------------------*/ 24 | 25 | label.error { 26 | background: #ffc; 27 | color: #c00; 28 | font-style: italic; 29 | } 30 | 31 | input.error, 32 | select.error, 33 | textarea.error { 34 | background-color: #fee; 35 | } 36 | 37 | /* `Table Layout 38 | ----------------------------------------------------------------------------------------------------*/ 39 | 40 | .horiz { 41 | margin-top: -20px; 42 | margin-left: -20px; 43 | } 44 | 45 | .horiz td { 46 | padding: 20px 0 0 20px; 47 | } -------------------------------------------------------------------------------- /css/text.css: -------------------------------------------------------------------------------- 1 | /* 2 | 960 Grid System ~ Text CSS. 3 | Learn more ~ http://960.gs/ 4 | 5 | Licensed under GPL and MIT. 6 | */ 7 | 8 | /* `Basic HTML 9 | ----------------------------------------------------------------------------------------------------*/ 10 | 11 | body { 12 | font: 13px/1.5 'Helvetica Neue', Arial, 'Liberation Sans', FreeSans, sans-serif; 13 | } 14 | 15 | hr { 16 | border: 0 #ccc solid; 17 | border-top-width: 1px; 18 | clear: both; 19 | height: 0; 20 | } 21 | 22 | /* `Headings 23 | ----------------------------------------------------------------------------------------------------*/ 24 | 25 | h1 { 26 | font-size: 25px; 27 | } 28 | 29 | h2 { 30 | font-size: 23px; 31 | } 32 | 33 | h3 { 34 | font-size: 21px; 35 | } 36 | 37 | h4 { 38 | font-size: 19px; 39 | } 40 | 41 | h5 { 42 | font-size: 17px; 43 | } 44 | 45 | h6 { 46 | font-size: 15px; 47 | } 48 | 49 | /* `Spacing 50 | ----------------------------------------------------------------------------------------------------*/ 51 | 52 | ol { 53 | list-style: decimal; 54 | } 55 | 56 | ul { 57 | list-style: disc; 58 | } 59 | 60 | li { 61 | margin-left: 30px; 62 | } 63 | 64 | p, 65 | dl, 66 | hr, 67 | h1, 68 | h2, 69 | h3, 70 | h4, 71 | h5, 72 | h6, 73 | ol, 74 | ul, 75 | pre, 76 | table, 77 | address, 78 | fieldset, 79 | figure { 80 | margin-bottom: 20px; 81 | } -------------------------------------------------------------------------------- /js/script.js: -------------------------------------------------------------------------------- 1 | /* Author: Brett Terpstra 2 | 3 | */ 4 | (function($){ 5 | function updateURL() { 6 | var group = $('#group').val(); 7 | var prefix = $('#prefix').val(); 8 | var url = $('#baseurl').val() 9 | .replace(/%grp%/,escape(group)) 10 | .replace(/%pre%/,escape(prefix)); 11 | $('#outputurl').val(url); 12 | $('#download').attr('href',url); 13 | $.getJSON('getsnippets.php?file='+$('#group').val()+'.tedist', function(data) { 14 | var items = ['NameShortcut']; 15 | 16 | $.each(data, function(snippet) { 17 | items.push('' + data[snippet].label + '' + data[snippet].shortcut.replace(/\[\[PREFIX\]\]/,$('#prefix').val()) + ''); 18 | }); 19 | 20 | $('#preview').html($('', {'id': 'shortcut-table',html: items.join('')})); 21 | }); 22 | } 23 | updateURL(); 24 | $('#prefixform').change(function(ev){ 25 | updateURL(); 26 | $('#outputurl').select(); 27 | }); 28 | $('#prefix').keyup(function(){ 29 | updateURL(); 30 | return true; 31 | }).blur(function(){ 32 | $('#outputurl').select(); 33 | }); 34 | $('#outputurl').select().click(function(ev){ 35 | this.select(); 36 | }).keydown(function(ev){ 37 | var code = (ev.keyCode ? ev.keyCode : ev.which); 38 | if ((ev.metaKey || ev.ctrlKey || ev.altKey) && (code != 86 && code != 88)) { 39 | return true; 40 | } else if (code == 9) { 41 | ev.preventDefault(); 42 | $('#group').focus(); 43 | return false; 44 | } else { 45 | ev.preventDefault(); 46 | return false; 47 | } 48 | }); 49 | })(jQuery); 50 | 51 | -------------------------------------------------------------------------------- /js/profiling/config.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | // call PROFILE.show() to show the profileViewer 4 | 5 | var PROFILE = { 6 | 7 | init : function(bool) { 8 | 9 | // define what objects, constructors and functions you want to profile 10 | // documentation here: http://developer.yahoo.com/yui/profiler/ 11 | 12 | YAHOO.tool.Profiler.registerObject("jQuery", jQuery, true); 13 | 14 | // the following would profile all methods within constructor's prototype 15 | // YAHOO.tool.Profiler.registerConstructor("Person"); 16 | 17 | // the following would profile the global function sayHi 18 | // YAHOO.tool.Profiler.registerFunction("sayHi", window); 19 | 20 | // if true is passed into init(), F9 will bring up the profiler 21 | if (bool){ 22 | $(document).keyup(function(e){ 23 | if (e.keyCode === 120){ 24 | PROFILE.show(); 25 | $(document).unbind('keyup',arguments.callee); 26 | } 27 | }) 28 | } 29 | }, 30 | 31 | //When the showProfile button is clicked, use YUI Loader to get all required 32 | //dependencies and then show the profile: 33 | show : function() { 34 | 35 | 36 | 37 | var s = document.createElement('link'); 38 | s.setAttribute('rel','stylesheet'); 39 | s.setAttribute('type','text/css'); 40 | s.setAttribute('href','js/profiling/yahoo-profiling.css'); 41 | document.body.appendChild(s); 42 | 43 | YAHOO.util.Dom.addClass(document.body, 'yui-skin-sam'); 44 | 45 | //instantiate ProfilerViewer with desired options: 46 | var pv = new YAHOO.widget.ProfilerViewer("", { 47 | visible: true, //expand the viewer mmediately after instantiation 48 | showChart: true, 49 | // base:"../../build/", 50 | swfUrl: "js/profiling/charts.swf" 51 | }); 52 | 53 | } 54 | 55 | }; 56 | 57 | // check some global debug variable to see if we should be profiling.. 58 | if (true) { PROFILE.init(true) } 59 | 60 | -------------------------------------------------------------------------------- /js/mylibs/jquery.formalize.min.js: -------------------------------------------------------------------------------- 1 | var FORMALIZE=(function(b,e,f,a){var h="placeholder" in f.createElement("input");var i="autofocus" in f.createElement("input");var g="webkitAppearance" in f.createElement("select").style;var d=!!(b.browser.msie&&parseInt(b.browser.version,10)===6);var c=!!(b.browser.msie&&parseInt(b.browser.version,10)===7);return{go:function(){for(var j in FORMALIZE.init){FORMALIZE.init[j]();}},init:{detect_webkit:function(){if(!g){return;}b("html").addClass("is_webkit");},full_input_size:function(){if(!c||!b("textarea, input.input_full").length){return;}b("textarea, input.input_full").wrap('');},ie6_skin_inputs:function(){if(!d||!b("input, select, textarea").length){return;}var j=/button|submit|reset/;var k=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;b("input").each(function(){var l=b(this);if(this.getAttribute("type").match(j)){l.addClass("ie6_button");if(this.disabled){l.addClass("ie6_button_disabled");}}else{if(this.getAttribute("type").match(k)){l.addClass("ie6_input");if(this.disabled){l.addClass("ie6_input_disabled");}}}});b("textarea, select").each(function(){if(this.disabled){b(this).addClass("ie6_input_disabled");}});},autofocus:function(){if(i||!b(":input[autofocus]").length){return;}b(":input[autofocus]:visible:first").focus();},placeholder:function(){if(h||!b(":input[placeholder]").length){return;}FORMALIZE.misc.add_placeholder();b(":input[placeholder]").each(function(){var j=b(this);var k=j.attr("placeholder");j.focus(function(){if(j.val()===k){j.val("").removeClass("placeholder_text");}}).blur(function(){FORMALIZE.misc.add_placeholder();});j.closest("form").submit(function(){if(j.val()===k){j.val("").removeClass("placeholder_text");}}).bind("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50);});});}},misc:{add_placeholder:function(){if(h||!b(":input[placeholder]").length){return;}b(":input[placeholder]").each(function(){var j=b(this);var k=j.attr("placeholder");if(!j.val()||j.val()===k){j.val(k).addClass("placeholder_text");}});}}};})(jQuery,this,this.document);jQuery(document).ready(function(){FORMALIZE.go();}); -------------------------------------------------------------------------------- /css/reset.css: -------------------------------------------------------------------------------- 1 | /* `XHTML, HTML4, HTML5 Reset 2 | ----------------------------------------------------------------------------------------------------*/ 3 | 4 | a, 5 | abbr, 6 | acronym, 7 | address, 8 | applet, 9 | article, 10 | aside, 11 | audio, 12 | b, 13 | big, 14 | blockquote, 15 | body, 16 | canvas, 17 | caption, 18 | center, 19 | cite, 20 | code, 21 | dd, 22 | del, 23 | details, 24 | dfn, 25 | dialog, 26 | div, 27 | dl, 28 | dt, 29 | em, 30 | embed, 31 | fieldset, 32 | figcaption, 33 | figure, 34 | font, 35 | footer, 36 | form, 37 | h1, 38 | h2, 39 | h3, 40 | h4, 41 | h5, 42 | h6, 43 | header, 44 | hgroup, 45 | hr, 46 | html, 47 | i, 48 | iframe, 49 | img, 50 | ins, 51 | kbd, 52 | label, 53 | legend, 54 | li, 55 | mark, 56 | menu, 57 | meter, 58 | nav, 59 | object, 60 | ol, 61 | output, 62 | p, 63 | pre, 64 | progress, 65 | q, 66 | rp, 67 | rt, 68 | ruby, 69 | s, 70 | samp, 71 | section, 72 | small, 73 | span, 74 | strike, 75 | strong, 76 | sub, 77 | summary, 78 | sup, 79 | table, 80 | tbody, 81 | td, 82 | tfoot, 83 | th, 84 | thead, 85 | time, 86 | tr, 87 | tt, 88 | u, 89 | ul, 90 | var, 91 | video, 92 | xmp { 93 | border: 0; 94 | margin: 0; 95 | padding: 0; 96 | font-size: 100%; 97 | } 98 | 99 | html, 100 | body { 101 | height: 100%; 102 | } 103 | 104 | article, 105 | aside, 106 | details, 107 | figcaption, 108 | figure, 109 | footer, 110 | header, 111 | hgroup, 112 | menu, 113 | nav, 114 | section { 115 | /* 116 | Override the default (display: inline) for 117 | browsers that do not recognize HTML5 tags. 118 | 119 | IE8 (and lower) requires a shiv: 120 | http://ejohn.org/blog/html5-shiv 121 | */ 122 | display: block; 123 | } 124 | 125 | b, 126 | strong { 127 | /* 128 | Makes browsers agree. 129 | IE + Opera = font-weight: bold. 130 | Gecko + WebKit = font-weight: bolder. 131 | */ 132 | font-weight: bold; 133 | } 134 | 135 | img { 136 | font-size: 0; 137 | vertical-align: middle; 138 | /* 139 | For IE. 140 | http://css-tricks.com/ie-fix-bicubic-scaling-for-images 141 | */ 142 | -ms-interpolation-mode: bicubic; 143 | } 144 | 145 | li { 146 | /* 147 | For IE6 + IE7. 148 | */ 149 | display: list-item; 150 | } 151 | 152 | table { 153 | border-collapse: collapse; 154 | border-spacing: 0; 155 | } 156 | 157 | th, 158 | td, 159 | caption { 160 | font-weight: normal; 161 | vertical-align: top; 162 | text-align: left; 163 | } 164 | 165 | svg { 166 | /* 167 | For IE9 beta. 168 | */ 169 | overflow: hidden; 170 | } -------------------------------------------------------------------------------- /js/profiling/yahoo-profiling.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.net/yui/license.txt 5 | version: 2.7.0 6 | */ 7 | .yui-skin-sam .yui-pv{background-color:#4a4a4a;font:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yui-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;} -------------------------------------------------------------------------------- /getsnippets.php: -------------------------------------------------------------------------------- 1 | documentElement; 4 | 5 | $root = $plistNode->firstChild; 6 | 7 | // skip any text nodes before the first value node 8 | while ( $root->nodeName == "#text" ) { 9 | $root = $root->nextSibling; 10 | } 11 | 12 | return parseValue($root); 13 | } 14 | 15 | function parseValue( $valueNode ) { 16 | $valueType = $valueNode->nodeName; 17 | 18 | $transformerName = "parse_$valueType"; 19 | 20 | if ( is_callable($transformerName) ) { 21 | // there is a transformer function for this node type 22 | return call_user_func($transformerName, $valueNode); 23 | } 24 | 25 | // if no transformer was found 26 | return null; 27 | } 28 | function parse_integer( $integerNode ) { 29 | return $integerNode->textContent; 30 | } 31 | 32 | function parse_string( $stringNode ) { 33 | return $stringNode->textContent; 34 | } 35 | 36 | function parse_date( $dateNode ) { 37 | return $dateNode->textContent; 38 | } 39 | 40 | function parse_true( $trueNode ) { 41 | return true; 42 | } 43 | 44 | function parse_false( $trueNode ) { 45 | return false; 46 | } 47 | 48 | function parse_dict( $dictNode ) { 49 | $dict = array(); 50 | 51 | // for each child of this node 52 | for ( 53 | $node = $dictNode->firstChild; 54 | $node != null; 55 | $node = $node->nextSibling 56 | ) { 57 | if ( $node->nodeName == "key" ) { 58 | $key = $node->textContent; 59 | 60 | $valueNode = $node->nextSibling; 61 | 62 | // skip text nodes 63 | while ( $valueNode->nodeType == XML_TEXT_NODE ) { 64 | $valueNode = $valueNode->nextSibling; 65 | } 66 | 67 | // recursively parse the children 68 | $value = parseValue($valueNode); 69 | 70 | $dict[$key] = $value; 71 | } 72 | } 73 | 74 | return $dict; 75 | } 76 | 77 | function parse_array( $arrayNode ) { 78 | $array = array(); 79 | 80 | for ( 81 | $node = $arrayNode->firstChild; 82 | $node != null; 83 | $node = $node->nextSibling 84 | ) { 85 | if ( $node->nodeType == XML_ELEMENT_NODE ) { 86 | array_push($array, parseValue($node)); 87 | } 88 | } 89 | 90 | return $array; 91 | } 92 | 93 | $path = dirname(__FILE__) . "/" . $_REQUEST['file']; 94 | $plistDocument = new DOMDocument(); 95 | $plistDocument->load($path); 96 | 97 | $plistArray = parsePlist($plistDocument); 98 | $output = array(); 99 | // var_dump($plistArray['snippetsTE2']); 100 | foreach($plistArray['snippetsTE2'] as $item) { 101 | $o = array(); 102 | $description = $item['label']; 103 | if ($description == '') { 104 | if ($item['snippetType'] == 3) { 105 | $description = '[unlabeled shell script]'; 106 | } elseif ($item['plainText']) { 107 | $description = substr($item['plainText'],0,25); 108 | } 109 | } 110 | $o['label'] = $description; 111 | $o['shortcut'] = $item['abbreviation']; 112 | array_push($output,$o); 113 | } 114 | echo json_encode($output); 115 | ?> -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Brett's TextExpander Snippets ## 2 | 3 | Just collecting a few of my favorite TextExpander snippets here, feel free to use. I have these set to expand after a Tab, but they should work with just about any expansion settings. Related commands all have similar beginnings to make using the "Suggest Completions" feature easier. 4 | 5 | This repo now includes the base system I'm using to generate downloads with custom snippets. The files to be customized are named with the extension ".tedist" and the prefixes in the "abbreviation" string of the plist are replaced with "[[PREFIX]]". The rest is handled by the php files. 6 | 7 | `getsnippets.php` is called through ajax and serves as an example for reading the snippets and shortcuts from the plist. Returns json output for the file specified in the query string with "file=groupname" (no extension). 8 | 9 | ### Snippets ### 10 | 11 | #### Tools.textexpander #### 12 | 13 | * **Hyphenate clipboard** 14 | 15 | Hyphenates the contents of the clipboard, ignoring spaces after punctuation or leading/trailing spaces. Should probably just be a Service, but this is actually faster, most of the time. 16 | 17 | * **Encode email address** 18 | 19 | Takes an email address in the clipboard and prints an ASCII-encoded (non-human-readable) version with mailto: prefix. 20 | 21 | * **Clipboard HTML link** 22 | 23 | Makes an html hyperlink (code, not rich text) from a url in the clipboard. Uses the Fill feature to request the link text. 24 | 25 | * **Markdown Link** 26 | 27 | Makes a Markdown format link from a url in the clipboard. Uses the Fill feature to request the link text. 28 | 29 | * **Rounded Corners** 30 | 31 | Uses the Fill feature to request a pixel radius, and creates cross-browser CSS for rounded corners. There are 5 variations, one for each corner and one for all corners. 32 | 33 | * **CSS Reset** 34 | 35 | Your typical CSS reset code, in Meyers and YUI flavors. 36 | 37 | * **Shorten clipboard url** 38 | 39 | Shorten a URL in the clipboard, using bit.ly, go., is.gd or tinyurl. Slightly faster than the AppleScript versions available from TE, and they handle a wider range of possible inputs. 40 | 41 | * **Make URL** 42 | 43 | Take whatever text is in the clipboard and provide a best-guess URL for it. Handy if you have a qualified domain and just need the protocol added, or if you have an email address and want it to be a mailto: link. 44 | 45 | * **Hashbang** 46 | 47 | Instant hashbangs for ruby, osascript and bash. 48 | 49 | * **Paste Markdown references** 50 | 51 | Takes a list of urls in the clipboard, in just about any format, and converts them into a list of Markdown references. Titles are generated by domains, incremented for repeats and sorted alphanumerically. Duplicate URL's are stripped from output. 52 | 53 | #### Lipsums.textexpander #### 54 | 55 | * **Placeholder Nav** 56 | 57 | Basic unordered list with dummy links. 58 | 59 | * **Standard Lipsum** 60 | 61 | Three lipsumX commands for 1, 2 or 3 paragraphs of standard Lorem Ipsum. 62 | 63 | * **HTML Lipsum** 64 | 65 | Ordered list, unordered list, and the full medley of HTML Lipsum for styling. 66 | 67 | #### Random Lipsums.textexpander #### 68 | 69 | * A series of snippets which use shell scripts to generate random text from various sources. 70 | 71 | #### iOS Markdown.textexpander #### 72 | 73 | * Snippets for fast Markdown entry using TextExpander touch -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Create TextExpander Group download URL 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 |
34 |

TextExpander project | Brett Terpstra

35 |

Create a custom TextExpander URL

36 |
37 | 38 |
39 |
40 |
41 | 42 | 43 | 51 | 52 | 53 |
54 | 55 |
56 |

57 | Your custom url is: 58 |

59 |

60 | Download .textexpander file 61 |

62 |

Select a group and enter your preferred prefix for the shortcuts assigned to each snippet. The resulting url may be downloaded as a custom .textexpander file, or used with TextExpander's "Install from URL" feature. Using the latter will provide automatic updates if the group is added to or changed, custom prefixes are preserved.

63 |
64 |
65 |
66 | 67 |
68 | 73 |
74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 89 | 90 | 91 | 92 | 93 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /js/libs/dd_belatedpng.js: -------------------------------------------------------------------------------- 1 | /** 2 | * DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML . 3 | * Author: Drew Diller 4 | * Email: drew.diller@gmail.com 5 | * URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/ 6 | * Version: 0.0.8a 7 | * Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license 8 | * 9 | * Example usage: 10 | * DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector 11 | * DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement 12 | **/ 13 | var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;bn.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet(); -------------------------------------------------------------------------------- /AppleScript Editor.tedist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | groupInfo 6 | 7 | expandAfterMode 8 | 0 9 | groupName 10 | AppleScript Editor 11 | 12 | snippetsTE2 13 | 14 | 15 | abbreviation 16 | tell- 17 | abbreviationMode 18 | 0 19 | creationDate 20 | 2012-02-19T17:54:22Z 21 | flags 22 | 0 23 | label 24 | tell block 25 | lastUsed 26 | 2012-02-19T17:54:59Z 27 | modificationDate 28 | 2012-02-19T17:56:00Z 29 | plainText 30 | tell application "%|" to 31 | 32 | end tell 33 | snippetType 34 | 0 35 | useCount 36 | 0 37 | uuidString 38 | 5D43C9C4-C4C3-4D8F-A05F-16ECC831A967 39 | 40 | 41 | abbreviation 42 | ,,tid 43 | abbreviationMode 44 | 0 45 | creationDate 46 | 2010-06-06T13:52:20Z 47 | flags 48 | 0 49 | label 50 | AS Text Item Delimiter 51 | lastUsed 52 | 2012-02-19T17:53:06Z 53 | modificationDate 54 | 2011-09-02T04:06:29Z 55 | plainText 56 | set {astid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "%|"} 57 | 58 | set AppleScript's text item delimiters to astid 59 | snippetType 60 | 0 61 | useCount 62 | 19 63 | uuidString 64 | B2271B60-0C89-47A2-A8D8-29126044F46F 65 | 66 | 67 | abbreviation 68 | s= 69 | abbreviationMode 70 | 0 71 | creationDate 72 | 2012-02-19T17:50:45Z 73 | flags 74 | 0 75 | label 76 | set variable 77 | lastUsed 78 | 2012-02-19T17:52:00Z 79 | modificationDate 80 | 2012-02-19T17:53:41Z 81 | plainText 82 | set %fill:Variable% to %fill:Value% 83 | 84 | snippetType 85 | 0 86 | useCount 87 | 0 88 | uuidString 89 | CF85C929-5E16-47CB-8A69-97E2FFCD0A79 90 | 91 | 92 | abbreviation 93 | p= 94 | abbreviationMode 95 | 0 96 | creationDate 97 | 2012-02-19T17:49:58Z 98 | flags 99 | 0 100 | label 101 | property 102 | lastUsed 103 | 2012-02-19T17:56:56Z 104 | modificationDate 105 | 2012-02-19T17:56:43Z 106 | plainText 107 | property %fill:Variable%: %fill:Value% 108 | 109 | snippetType 110 | 0 111 | useCount 112 | 0 113 | uuidString 114 | 5CF91E1C-B427-47C5-B8A2-48F930794005 115 | 116 | 117 | abbreviation 118 | repeat 119 | abbreviationMode 120 | 0 121 | creationDate 122 | 2012-02-19T17:49:03Z 123 | flags 124 | 0 125 | label 126 | repeat 127 | lastUsed 128 | 2012-02-19T17:49:38Z 129 | modificationDate 130 | 2012-02-19T17:53:31Z 131 | plainText 132 | repeat %| 133 | 134 | end repeat 135 | snippetType 136 | 0 137 | useCount 138 | 0 139 | uuidString 140 | 1E989FDD-95E3-4A31-AEBA-025B5704034B 141 | 142 | 143 | abbreviation 144 | if- 145 | abbreviationMode 146 | 0 147 | creationDate 148 | 2012-02-19T17:46:10Z 149 | flags 150 | 0 151 | label 152 | if block 153 | lastUsed 154 | 2012-02-19T17:48:53Z 155 | modificationDate 156 | 2012-02-19T17:56:05Z 157 | plainText 158 | if %| then 159 | 160 | end if 161 | snippetType 162 | 0 163 | useCount 164 | 0 165 | uuidString 166 | 1F6CA872-11FB-4D15-9A12-CE3D0E74491B 167 | 168 | 169 | abbreviation 170 | if 171 | abbreviationMode 172 | 0 173 | creationDate 174 | 2012-02-19T17:45:36Z 175 | flags 176 | 0 177 | label 178 | if then 179 | lastUsed 180 | 2012-02-19T17:55:18Z 181 | modificationDate 182 | 2012-02-19T17:45:36Z 183 | plainText 184 | if %| then 185 | snippetType 186 | 0 187 | useCount 188 | 0 189 | uuidString 190 | B41D861C-30B5-4894-810C-6F78B14A8CB9 191 | 192 | 193 | abbreviation 194 | tell 195 | abbreviationMode 196 | 0 197 | creationDate 198 | 2012-02-19T17:43:18Z 199 | flags 200 | 0 201 | label 202 | tell app 203 | lastUsed 204 | 2012-02-19T17:55:04Z 205 | modificationDate 206 | 2012-02-19T17:43:38Z 207 | plainText 208 | tell application "%|" 209 | snippetType 210 | 0 211 | useCount 212 | 0 213 | uuidString 214 | 3B44C17D-5D0B-4270-9D31-47D3A71C038B 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /AppleScript Editor.textexpander: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | groupInfo 6 | 7 | expandAfterMode 8 | 0 9 | groupName 10 | AppleScript Editor 11 | 12 | snippetsTE2 13 | 14 | 15 | abbreviation 16 | tell- 17 | abbreviationMode 18 | 0 19 | creationDate 20 | 2012-02-19T17:54:22Z 21 | flags 22 | 0 23 | label 24 | tell block 25 | lastUsed 26 | 2012-02-19T17:54:59Z 27 | modificationDate 28 | 2012-02-19T17:56:00Z 29 | plainText 30 | tell application "%|" to 31 | 32 | end tell 33 | snippetType 34 | 0 35 | useCount 36 | 0 37 | uuidString 38 | 5D43C9C4-C4C3-4D8F-A05F-16ECC831A967 39 | 40 | 41 | abbreviation 42 | ,,tid 43 | abbreviationMode 44 | 0 45 | creationDate 46 | 2010-06-06T13:52:20Z 47 | flags 48 | 0 49 | label 50 | AS Text Item Delimiter 51 | lastUsed 52 | 2012-02-19T17:53:06Z 53 | modificationDate 54 | 2011-09-02T04:06:29Z 55 | plainText 56 | set {astid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "%|"} 57 | 58 | set AppleScript's text item delimiters to astid 59 | snippetType 60 | 0 61 | useCount 62 | 19 63 | uuidString 64 | B2271B60-0C89-47A2-A8D8-29126044F46F 65 | 66 | 67 | abbreviation 68 | s= 69 | abbreviationMode 70 | 0 71 | creationDate 72 | 2012-02-19T17:50:45Z 73 | flags 74 | 0 75 | label 76 | set variable 77 | lastUsed 78 | 2012-02-19T17:52:00Z 79 | modificationDate 80 | 2012-02-19T17:53:41Z 81 | plainText 82 | set %fill:Variable% to %fill:Value% 83 | 84 | snippetType 85 | 0 86 | useCount 87 | 0 88 | uuidString 89 | CF85C929-5E16-47CB-8A69-97E2FFCD0A79 90 | 91 | 92 | abbreviation 93 | p= 94 | abbreviationMode 95 | 0 96 | creationDate 97 | 2012-02-19T17:49:58Z 98 | flags 99 | 0 100 | label 101 | property 102 | lastUsed 103 | 2012-02-19T17:56:56Z 104 | modificationDate 105 | 2012-02-19T17:56:43Z 106 | plainText 107 | property %fill:Variable%: %fill:Value% 108 | 109 | snippetType 110 | 0 111 | useCount 112 | 0 113 | uuidString 114 | 5CF91E1C-B427-47C5-B8A2-48F930794005 115 | 116 | 117 | abbreviation 118 | repeat 119 | abbreviationMode 120 | 0 121 | creationDate 122 | 2012-02-19T17:49:03Z 123 | flags 124 | 0 125 | label 126 | repeat 127 | lastUsed 128 | 2012-02-19T17:49:38Z 129 | modificationDate 130 | 2012-02-19T17:53:31Z 131 | plainText 132 | repeat %| 133 | 134 | end repeat 135 | snippetType 136 | 0 137 | useCount 138 | 0 139 | uuidString 140 | 1E989FDD-95E3-4A31-AEBA-025B5704034B 141 | 142 | 143 | abbreviation 144 | if- 145 | abbreviationMode 146 | 0 147 | creationDate 148 | 2012-02-19T17:46:10Z 149 | flags 150 | 0 151 | label 152 | if block 153 | lastUsed 154 | 2012-02-19T17:48:53Z 155 | modificationDate 156 | 2012-02-19T17:56:05Z 157 | plainText 158 | if %| then 159 | 160 | end if 161 | snippetType 162 | 0 163 | useCount 164 | 0 165 | uuidString 166 | 1F6CA872-11FB-4D15-9A12-CE3D0E74491B 167 | 168 | 169 | abbreviation 170 | if 171 | abbreviationMode 172 | 0 173 | creationDate 174 | 2012-02-19T17:45:36Z 175 | flags 176 | 0 177 | label 178 | if then 179 | lastUsed 180 | 2012-02-19T17:55:18Z 181 | modificationDate 182 | 2012-02-19T17:45:36Z 183 | plainText 184 | if %| then 185 | snippetType 186 | 0 187 | useCount 188 | 0 189 | uuidString 190 | B41D861C-30B5-4894-810C-6F78B14A8CB9 191 | 192 | 193 | abbreviation 194 | tell 195 | abbreviationMode 196 | 0 197 | creationDate 198 | 2012-02-19T17:43:18Z 199 | flags 200 | 0 201 | label 202 | tell app 203 | lastUsed 204 | 2012-02-19T17:55:04Z 205 | modificationDate 206 | 2012-02-19T17:43:38Z 207 | plainText 208 | tell application "%|" 209 | snippetType 210 | 0 211 | useCount 212 | 0 213 | uuidString 214 | 3B44C17D-5D0B-4270-9D31-47D3A71C038B 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /css/formalize.css: -------------------------------------------------------------------------------- 1 | /* `Widths 2 | ----------------------------------------------------------------------------------------------------*/ 3 | 4 | .input_tiny { 5 | width: 50px; 6 | } 7 | 8 | .input_small { 9 | width: 100px; 10 | } 11 | 12 | .input_medium { 13 | width: 150px; 14 | } 15 | 16 | .input_large { 17 | width: 200px; 18 | } 19 | 20 | .input_xlarge { 21 | width: 250px; 22 | } 23 | 24 | .input_xxlarge { 25 | width: 300px; 26 | } 27 | 28 | .input_full { 29 | width: 100%; 30 | } 31 | 32 | /* 33 | Added via JS to