- Open Automator
- Create a new document
- Select Quick Action
- Set “Service receives selected” to
files or foldersinany application - Add a
Run Shell Scriptaction- your default shell should already be selected, otherwise use
/bin/zshfor macOS 10.15 (”Catalina”) or later - older versions of macOS use
/bin/bash
- your default shell should already be selected, otherwise use
- if you're using something else, you probably know what to do 😉
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
| {"ALL":["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","Amer |
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 XLSX = require('xlsx') | |
| function Workbook() { | |
| this.SheetNames = ['Report']; | |
| this.Sheets = {}; | |
| } | |
| var wb = new Workbook(); | |
| var ws = { |
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
| #!/usr/bin/env bash | |
| # Create a page in the current dir | |
| echo "My Test Page" > test.html | |
| # Start server | |
| python -m SimpleHTTPServer 8000 &> /dev/null & | |
| pid=$! | |
| # Give server time to start up |
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
| // Use: ><a href="list.html" class="js-back">Go back</a> | |
| $('.js-back').on('click', function(evt) { | |
| if (document.referrer != "") { | |
| evt.preventDefault(); | |
| history.back(); | |
| } | |
| }); |
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
| { | |
| "countries": { | |
| "country": [ | |
| { | |
| "countryCode": "AD", | |
| "countryName": "Andorra", | |
| "currencyCode": "EUR", | |
| "population": "84000", | |
| "capital": "Andorra la Vella", | |
| "continentName": "Europe" |
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 get_avatar_from_service(service, userid, size) { | |
| // this return the url that redirects to the according user image/avatar/profile picture | |
| // implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback | |
| // for google use get_avatar_from_service('google', profile-name or user-id , size-in-px ) | |
| // for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word ) | |
| // for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px ) | |
| // for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word ) | |
| // for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px ) | |
| // everything else will go to the fallback | |
| // google and gravatar scale the avatar to any site, others will guided to the next best version |