Skip to content

Instantly share code, notes, and snippets.

View pilotmoon's full-sized avatar
Working from home

Nick Moore pilotmoon

Working from home
View GitHub Profile
pilotmoon / another.js
Last active July 27, 2023 08:36
random snippet example
pilotmoon / lowercase-remove-colons.yaml
Created May 3, 2022 08:18
PopClip Snippet: Lowercase, and remove colons
View lowercase-remove-colons.yaml
# The brief:
# So, I have to convert MAC addresses from time to time into a format that our network/server guys want,
# which means converting to lowercase and removing the colons in the address. Is that something that could be worked up?
# Instructions: Select all the text below, starting with '#popclip'. The click the 'Install Extension' action in PopClip.
# popclip
name: Process MAC Address
title: mac
after: paste-result
pilotmoon / PopRichString+Markdown.m
Created January 21, 2023 17:41
Add formatting to NSAttributedString initilalized from Markdown
View PopRichString+Markdown.m
// PopRichString+Markdown.m
// Pop
// Created by Nicholas Moore on 29/11/2022.
#import "PopRichString+Markdown.h"
#import "NMKit.h"
pilotmoon / NetNewsWire.js
Last active February 15, 2023 16:42
PopClip Extension to add a URL to NetNewsWire
View NetNewsWire.js
// #popclip
// name: NetNewsWire
// icon: iconify:carbon:satellite-radar
// requirements: [url]
// lang: js
const url =[0];
popclip.openUrl("feed:" + url, {
app: "com.ranchero.NetNewsWire-Evergreen"
pilotmoon / SwapName.yaml
Created June 3, 2022 09:52
PopClip extension to swap "Doe, John" to "John Doe"
View SwapName.yaml
name: Swap Name
icon: symbol:arrow.triangle.swap
after: paste-result
regex: '\w+, .+'
javascript: |
const match = popclip.input.text.match(/(\w+), (.+)/)
if (match) return match[2] + ' ' + match[1]; else return null
# The above block is an Extension SNippet - select it to install the extension with PopClip
pilotmoon / Raycast.yaml
Last active May 31, 2022 08:03
View Raycast.yaml
#popclip extension snippet to send text to Raycast
name: Raycast
before: copy
url: raycast://
after: paste
pilotmoon / gist:fc21103363ffaedf4d99535648f9ef73
Created May 5, 2022 13:17
Multiple action snippet example
View gist:fc21103363ffaedf4d99535648f9ef73
# popclip
name: Dictionaries
- icon: square 見
url: mkdictionaries:///?text=***&category=ja&scope=headword
- icon: square 用
url: mkdictionaries:///?text=***&category=ja&scope=example
View gist:52c735fa4cb5888f8c51a7546708695f
name: paste >
requirements: [paste]
javascript: popclip.pasteText(pasteboard.text.split(/\n/).map(str => '> ' + str).join('\n'))
View gist:3bebcb0759f855ca59294ae7ea68c434
name: Copy and Switch App
title: ⌘C←
before: copy
key combo:
keyCode: 48
modifiers: 1048576