- Open Automator
- Create a new Service
- Set “Service receives selected” to
files or foldersinany application - Add a
Run Shell Scriptaction - Set the script action to
/usr/local/bin/atom -n "$@" - Set “Pass input” to
as arguments - Save as
Open in Atom
This file contains hidden or 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
| var me = Services.wm.getMostRecentWindow(null); | |
| Cu.import('resource://gre/modules/osfile.jsm'); | |
| var pathProfilesIni = OS.Path.join(OS.Constants.Path.userApplicationDataDir, 'profiles.ini'); | |
| me.alert(pathProfilesIni); | |
| //apparently theres for profiles made in default prof dir: | |
| //localDir = C:\Users\ali57233\AppData\Local\Mozilla\Firefox\Profiles\czbm1ps9.rnd1 | |
| //rootDir = C:\Users\ali57233\AppData\Roaming\Mozilla\Firefox\Profiles\czbm1ps9.rnd1 | |
| //for custom prof dir localDir and rootDir are same |
This file contains hidden or 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
| var each = function (Array) {"use strict"; | |
| /*! all you need to `each(obj, cb [,context])` | |
| * @author WebReflection | |
| * @license WTFPL - http://en.wikipedia.org/wiki/WTFPL | |
| * @gist https://gist.github.com/2294934 | |
| */ | |
| var | |
| toString = {}.toString, | |
| hasOwnProperty = {}.hasOwnProperty, | |
| array = toString.call([]), |
This file contains hidden or 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
| /** | |
| * Polyfill for "fixing" IE's lack of support (IE < 9) for applying slice | |
| * on host objects like NamedNodeMap, NodeList, and HTMLCollection | |
| * (technically, since host objects are implementation-dependent, | |
| * IE doesn't need to work this way). Also works on strings, | |
| * fixes IE to allow an explicit undefined for the 2nd argument | |
| * (as in Firefox), and prevents errors when called on other | |
| * DOM objects. | |
| * @license MIT, GPL, do whatever you want | |
| -* @see https://gist.github.com/brettz9/6093105 |
This file contains hidden or 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
| function jml (elName, atts, children) {'use strict'; | |
| var el = typeof elName === 'string' ? document.createElement(elName) : elName; | |
| if (atts && Array.isArray(atts)) { | |
| children = atts; | |
| } | |
| else if (atts) { | |
| Object.keys(atts).forEach(function (att) { | |
| var attVal = atts[att]; | |
| if (att === '$on') { | |
| return Object.keys(attVal).forEach(function (ev) { |
This file contains hidden or 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
| // target is the backing object | |
| let target = { length: 0 }, | |
| proxy = new Proxy(target, { | |
| set(trapTarget, key, value) { | |
| let numericKey = Number(key), | |
| keyIsInteger = Number.isInteger(numericKey); | |
| // special case for length property - only need to worry if length is | |
| // shorter than number of array items |
This file contains hidden or 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
| // Microrouter based on history.pushState. | |
| // All thrills, no frills. | |
| // Usage: | |
| // | |
| // var h = urlstate(callback); | |
| // h.push('#foo') | |
| function urlstate(callback) { | |
| // Since `history.pushState` doesn't fire `popstate`, we can use this function | |
| // instead. Will update history state and call `callback` with currently | |
| // showing `url`. |
sprintf`There are ${0} monkeys in the ${1}.`( '10', 'tree' );
// > There are 10 monkeys in the tree.
const linkTemplate = sprintf`<a href="${0}" ${2}>${1}</a>`;
linkTemplate('/contact/', 'Contact Us');
linkTemplate('https://example.com', 'Open Preview', 'target="_blank"');
This file contains hidden or 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
| /** | |
| * Chunkify | |
| * Google Chrome Speech Synthesis Chunking Pattern | |
| * Fixes inconsistencies with speaking long texts in speechUtterance objects | |
| * Licensed under the MIT License | |
| * | |
| * Peter Woolley and Brett Zamir | |
| */ | |
| var speechUtteranceChunker = function (utt, settings, callback) { |
OlderNewer