- 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
| # pytest tests/integration/event_source_kafka/ -vvv -s | |
| ================================== test session starts ================================== | |
| platform linux -- Python 3.9.18, pytest-8.3.2, pluggy-1.5.0 -- /usr/bin/python3 | |
| cachedir: .pytest_cache | |
| rootdir: /root/event-driven-ansible | |
| configfile: pyproject.toml | |
| plugins: timeout-2.3.1, asyncio-0.23.8 | |
| asyncio: mode=strict | |
| collected 5 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
| diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py | |
| index d14832f58e..8cbbe5552a 100755 | |
| --- a/lib/ansible/cli/doc.py | |
| +++ b/lib/ansible/cli/doc.py | |
| @@ -815,7 +815,7 @@ class DocCLI(CLI, RoleMixin): | |
| else: | |
| plugin_names = self._list_plugins(ptype, None) | |
| docs['all'][ptype] = self._get_plugins_docs(ptype, plugin_names, fail_ok=(ptype in ('test', 'filter')), fail_on_errors=no_fail) | |
| - # reset list after each type to avoid polution | |
| + # reset list after each type to avoid pollution |
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
| import pymssql | |
| login_user = '' # Replace username | |
| login_password = '' # Replace with password | |
| login_querystring = '' # Replace this with host:port | |
| db = '' # Replace database | |
| conn = pymssql.connect( | |
| user=login_user, | |
| password=login_password, |
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
| import asyncio | |
| from typing import Optional, Dict, Any | |
| class AsyncFile: | |
| def __init__(self, file_path: str, mode: str = "r", **kwargs: Optional[Dict[str, Any]]): | |
| self.file_path = file_path | |
| self.mode = mode | |
| self.kwargs = kwargs | |
| self.file = None |
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
| from api_helper import ShoonyaApiPy, get_time | |
| import logging | |
| import yaml | |
| import pandas as pd | |
| import pyotp | |
| import asyncio | |
| import json | |
| import websockets | |
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
| [ | |
| { | |
| "children": [ | |
| { | |
| "children": [ | |
| { | |
| "children": [ | |
| { | |
| "children": [], | |
| "event": "runner_on_start", |
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
| #!/bin/sh | |
| rfolder=/mnt/sdcard/DCIM/Camera | |
| adb shell ls "${rfolder}" > android.files | |
| lfolder=/Volumes/data/documents/personal/camera | |
| ls -1 "${lfolder}" > local.files |
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
| - name: Remove nth element from the list by value | |
| debug: | |
| msg: | | |
| {% set _ = my_list.remove(value) %} | |
| {{ my_list }} | |
| vars: | |
| my_list: [1, 2, 3, 4, 5, 6] | |
| value: 2 |
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
| - name: Remove nth element from the list by value using reject | |
| debug: | |
| msg: "{{ my_list | reject('search', value)}}" | |
| vars: | |
| my_list: [1, 2, 3, 4, 5, 6] | |
| value: '2' |
NewerOlder