Step 0: Open Automator, New Service.
Step 1: Drag out Run Shell Script action. Pass Input to STDIN
Step 2: This code:
open `gist`
| // ==UserScript== | |
| // @name Checklister Helper | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0.0 | |
| // @description Example userscript for Checklister app | |
| // @author You | |
| // @match https://checklister-beta.wilcoxd.com | |
| // @match http://localhost:3000/* | |
| // @grant none | |
| // ==/UserScript== |
| on replace_chars(this_text, search_string, replacement_string) | |
| set AppleScript's text item delimiters to the search_string | |
| set the item_list to every text item of this_text | |
| set AppleScript's text item delimiters to the replacement_string | |
| set this_text to the item_list as string | |
| set AppleScript's text item delimiters to "" | |
| return this_text | |
| end replace_chars | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <!-- | |
| BBEdit codeless language module for email (for example, what comes out of Mutt when you use "bbedit -w" as its editor) | |
| Feel free to customize. | |
| By Ryan Wilcox | |
| Requires BBEdit 8.0 or higher. To install, copy here: |
| // ==UserScript== | |
| // @name Hide Workona Sidebar | |
| // @namespace workona | |
| // @version 1.0 | |
| // @description Hides the element with the id "sidebar" | |
| // @match https://workona.com/0/* | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { |
| tell application "BBEdit" | |
| display dialog "What text to do want to insert at your column selection? (make sure to add a space if you need!)" default answer "hello world" | |
| set textToInsert to text returned of the result | |
| set oldClip to get the clipboard | |
| set the clipboard to textToInsert | |
| paste column | |
| set the clipboard to oldClip |
| tell application "BBEdit" | |
| set theScript to selection as text | |
| set clippingFileRef to (path to temporary items as string) & "clipping_as_selection" | |
| --close access clippingFileRef | |
| set fileref to open for access file clippingFileRef with write permission | |
| set eof of fileref to 0 -- clear the file | |
| write theScript to fileref | |
| close access fileref |
| // ==UserScript== | |
| // @name Github remove relative date stupidness | |
| // @namespace http://www.wilcoxd.com | |
| // @include https://github.com* | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| // created: WD-rpw 03-25-2013 |
| #!/usr/bin/env python | |
| # A simple script that takes each line of the currently open (and saved!) document | |
| # and outputs a file for each line, named with the first matching group of the name_grep | |
| # regex | |
| # | |
| # It saves its output to a folder named "output" on the desktop | |
| # | |
| # Not really meant for general consumption, but as a tool that gets modified with every new | |
| # time you have to do this. |
| #!/usr/bin/env ruby | |
| # Why not bash? | |
| # bash is annoying for opts handling | |
| # AND especially annoying if those opts need to be in both --key value AND --key=value format | |
| # AND not DRY. | |
| # and Ruby is pretty close to bash in syntax. Or it's close to Perl, which is close to Bash | |
| # and Python feels like a bunch of boilerplate here | |
| require 'optparse' |