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
set DMURLTitle to "" | |
set DMURL to "" | |
tell application "Arc" | |
set currentURL to URL of active tab of window 1 | |
set currentTitle to title of active tab of window 1 | |
tell application "Keyboard Maestro Engine" | |
setvariable "DMURL" to currentURL | |
setvariable "DMURLTitle" to currentTitle | |
end tell |
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
console.log(`Hey there! 👋`); |
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
<h1 style="font-family: Arial">Wait a sec...</h1> | |
<script> | |
setTimeout(function() { | |
window.close(); | |
}, 3000); | |
</script> |
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
import { execSync } from 'child_process'; | |
export const handler = async (event) => { | |
if (event.httpMethod === 'POST') { | |
const payload = JSON.parse(event.body); | |
if (payload.secret !== 'SECRET_KEY') { | |
return; | |
} | |
const result = await execSync( | |
`node -e "console.log((() => {${payload.script |
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
const API_URL = "https://api.openai.com/v1/chat/completions"; | |
const MAX_TOKENS = 1500; | |
const TEMPERATURE = 0.5; | |
const SYSTEM_PROMPT = 'Act as assistant'; | |
const MESSAGES = ["hello", "hi!", "how are you?"]; | |
async function openAICompletion(msg) { | |
const options = { | |
method: "POST", | |
headers: { |
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
const { encode } = require('@nem035/gpt-3-encoder') | |
exports.handler = async (event, context) => { | |
if (event.httpMethod === 'POST') { | |
try { | |
const payload = JSON.parse(event.body); | |
const text = payload.text; | |
return { |
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
/opt/homebrew/bin/node -e "(async () => {const response = await fetch('$KMVAR_webhook', {method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify($KMVAR_json)});const json = await response.json();console.log(JSON.stringify(json));})()" |
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
curl -s <https://api.openai.com/v1/completions> \\ | |
-H "Content-Type: application/json" \\ | |
-H "Authorization: Bearer $OPENAI_API_KEY" \\ | |
-d '{ | |
"model": "text-davinci-003", | |
"prompt": "Hello", | |
"temperature": 0.7, | |
"max_tokens": 256, | |
"top_p": 1, | |
"frequency_penalty": 0, |
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
tell application "System Events" | |
set frontmostApplication to name of first application process whose frontmost is true | |
set browserName to "" | |
if frontmostApplication is "Arc" then | |
tell application "Arc" to return title of active tab of window 1 | |
else if frontmostApplication is "Google Chrome" then | |
tell application "Google Chrome" to return title of active tab of window 1 | |
else if frontmostApplication is "Brave Browser" then | |
tell application "Brave Browser" to return title of active tab of window 1 |
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
tell application "System Events" | |
set frontmostApplication to name of first application process whose frontmost is true | |
set browserName to "" | |
if frontmostApplication is "Arc" then | |
tell application "Arc" to return URL of active tab of window 1 | |
else if frontmostApplication is "Google Chrome" then | |
tell application "Google Chrome" to return URL of active tab of window 1 | |
else if frontmostApplication is "Brave Browser" then | |
tell application "Brave Browser" to return URL of active tab of window 1 |