- 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 😉
See here an overcomplicated way to wait for input from a user using a modal. Every step is explained using comments.
This is meant to replace Client.wait_for("message") for application commands.
- Easy way to construct a Modal with one text input field.
- Easily pass a check from the constructor
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
| """An example key-value store server and client implementation using msgspec | |
| and asyncio. | |
| Requests are serialized using the MessagePack protocol, as implemented by | |
| msgspec. Additionally, all messages are length-prefix framed using a 32 bit | |
| big-endian integer. | |
| Note that this encoding isn't tied to either asyncio or msgspec - this could | |
| just as easily be implemented using sockets and a different serialization | |
| protocol. Length-prefix framing is useful in that respect - it separates the IO |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Note
This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.
How to use this script:
- Accept a quest under Discover -> Quests
- Press Ctrl+Shift+I to open DevTools
- Go to the
Consoletab - Paste the following code and hit enter:
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 datetime import datetime | |
| import json | |
| import re | |
| import timeit | |
| from contextlib import contextmanager | |
| from dataclasses import dataclass | |
| from typing import Annotated, Any, Callable, Iterator, TypedDict | |
| from pydantic.annotated_handlers import GetJsonSchemaHandler |
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 * as crypto from 'crypto'; | |
| // Secret key generation (should be stored securely and not hardcoded) | |
| const secretKey = crypto.createHash('sha256').update(String('your-secret-key')).digest('base64').substr(0, 32); | |
| function encrypt(text: string): string { | |
| const iv = crypto.randomBytes(16); // Initialization vector | |
| const cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(secretKey), iv); | |
| const encrypted = Buffer.concat([cipher.update(text, 'utf8'), cipher.final()]); | |
| // Return the IV and encrypted data as a combined string |
OlderNewer