This file contains 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
#!/usr/bin/swift | |
import Cocoa | |
print(NSSpellChecker.shared().availableLanguages); |
This file contains 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
// | |
// RVNReceiptValidation.m | |
// | |
// Created by Satoshi Numata on 12/06/30. | |
// Copyright (c) 2012 Sazameki and Satoshi Numata, Ph.D. All rights reserved. | |
// | |
// This sample shows how to write the Mac App Store receipt validation code. | |
// Replace kRVNBundleID and kRVNBundleVersion with your own ones. | |
// | |
// This sample is provided because the coding sample found in "Validating Mac App Store Receipts" |
This file contains 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
#!/usr/bin/env swift | |
/* This code takes an RSA public key as raw modulus and exponent, and packages them into the PKCS #1 format | |
as required by SecKeyCreateWithData function in the Apple Security framework. | |
It is heavily based on this StackOverflow answer by dnlggr here: | |
https://stackoverflow.com/questions/27132937/create-seckey-from-modulus-and-exponent-in-swift | |
Tip: you can paste this into Swift playgrounds (removing the top line), | |
or save as file with chmod +x and run directly in shell. | |
*/ | |
import Cocoa |
This file contains 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
# popclip | |
name: Amazon Multi Search | |
icon: search filled A | |
javascript: | | |
const term = encodeURIComponent(popclip.input.text) | |
popclip.openUrl('https://www.amazon.co.uk/s?k=' + term) | |
popclip.openUrl('https://www.amazon.co.jp/s?k=' + term) |
This file contains 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
#popclip | |
name: Copy and Switch App | |
title: ⌘C← | |
before: copy | |
key combo: | |
keyCode: 48 | |
modifiers: 1048576 |
This file contains 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
# 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 |
This file contains 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
#popclip | |
name: paste > | |
requirements: [paste] | |
javascript: popclip.pasteText(pasteboard.text.split(/\n/).map(str => '> ' + str).join('\n')) |
This file contains 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
# popclip | |
name: Dictionaries | |
actions: | |
- icon: square 見 | |
url: mkdictionaries:///?text=***&category=ja&scope=headword | |
- icon: square 用 | |
url: mkdictionaries:///?text=***&category=ja&scope=example |
This file contains 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
#popclip extension snippet to send text to Raycast | |
name: Raycast | |
before: copy | |
url: raycast:// | |
after: paste |
This file contains 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
#popclip | |
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 |