Skip to content

Instantly share code, notes, and snippets.

View pilotmoon's full-sized avatar
🏠
Working from bed

Nick Moore pilotmoon

🏠
Working from bed
View GitHub Profile
Text Editing:
- com.pilotmoon.popclip.extension.pasteplain
- com.pilotmoon.popclip.extension.pasteandenter
- com.pilotmoon.popclip.extension.delete
- com.pilotmoon.popclip.extension.select-all
- com.pilotmoon.popclip.extension.highlight
Text Transformation:
- com.pilotmoon.popclip.extension.formatting
- com.pilotmoon.popclip.extension.uppercase
- com.pilotmoon.popclip.extension.lowercase
#popclip
name: Icon Test!
icon: square rotate=90 filled 55
description: extension to test icon generation by the directory
identifier: com.pilotmoon.test-icon-55
action: {}
@pilotmoon
pilotmoon / rsatool.py
Last active May 8, 2024 13:36 — forked from flavienbwk/rsatool.py
Generates all OpenSSL private key componments from two of the raw primitives: modulus (n), primes p and q, private exponent (d)
#!/usr/bin/env python3
# taken from https://gist.github.com/flavienbwk/54671449419e1576c2708c9a3a711d78
# and modified to work with python3. i also stripped out the pem generation and just dump all the parameters.
# Usage : python rsatool.py -n <decimal_modulus> -p <decimal_prime1> -q <decimal_prime2> -e <decimal_public_exponent>
# or : python rsatool.py -n <decimal_modulus> -d <decimal_private_exponent> -e <decimal_public_exponent>
import base64, fractions, optparse, random, math, gmpy2 as gmpy
def factor_modulus(n, d, e):
#popclip
name: Letterboxd
identifier: com.pilotmoon.popclip.extension.letterboxd
description: Search films on Letterboxd
apps:
- { name: Letterboxd, link: https://letterboxd.com/ }
icon: letterboxd-mask.svg
url: https://letterboxd.com/search/***/
// #popclip
// name: Freeform
// identifier: com.pilotmoon.popclip.extension.freeform
// description: Send the selected text to Freeform.
// icon: iconify:ph:shapes-light
// popclip version: 4586
// captureHtml: true
// captureRtf: true
export function action(input: Input) {
// #popclip extension snippet to send text to Raycast
// name: Raycast
// identifier: com.pilotmoon.popclip.extension.raycast
// popclip version: 4151
// description: Activate Raycast with the selected text.
// icon: iconify:simple-icons:raycast
// app: { name: Raycast, link: https://www.raycast.com/ }
// language: javascript
popclip.performCommand("copy");
popclip.openUrl("raycast://");
// #popclip
// name: ChatGPT Website
// identifier: com.pilotmoon.popclip.extension.chatgpt-website
// description: Start a new chat on the ChatGPT Website.
// icon: square filled scale=85 iconify:simple-icons:openai
// popclip version: 4586
// language: javascript
// module: true
exports.options = [
{
#popclip
name: Presearch
identifier: com.pilotmoon.popclip.extension.presearch
description: Search Presearch, the decentralized search engine.
icon: iconify:arcticons:presearch
popclip version: 4151
app: { name: Presearch, link: https://www.presearch.io/ }
url: https://presearch.com/search?q=***
@pilotmoon
pilotmoon / submit-extension.md
Last active May 22, 2024 10:42
Submitting to the PopClip Extensions Directory from your own repo
author
Nick Moore

PopClip Directory Submission

All extensions on the directory need to be hosted as public repositories on GitHub.

The directory server downloads and stores your repository contents every time you create a git tag. It only does this once for every tag. This ensures that the contents served for a specific version can never change.

// #popclip transform ip-10-248-153-153.ec2.internal to 10.248.153.153
// name: IPExtract
// language: javascript
// module: true
exports.regex = /(\d{1,3})-(\d{1,3})-(\d{1,3})-(\d{1,3})/;
exports.action = () => popclip.pasteText(popclip.input.regexResult.slice(1).join("."));