Skip to content

Instantly share code, notes, and snippets.

View grantwforsythe's full-sized avatar

Grant Forsythe grantwforsythe

View GitHub Profile
@grantwforsythe
grantwforsythe / script.sh
Created February 28, 2023 18:50
Save DALL-E Image
#!/usr/bin/env
curl https://api.openai.com/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"prompt": "a photo of a happy corgi puppy sitting and facing forward, studio light, longshot",
"n": 1,
"size": "1024x1024"
}' |
@grantwforsythe
grantwforsythe / main.js
Last active December 11, 2022 00:02
Remove YouTube's (annoying) clarify box
// ==UserScript==
// @name Remove YouTube Clarification
// @namespace http://tampermonkey.net/
// @run-at document-idle
// @version 0.1
// @description Remove YouTube's (annoying) clarification box
// @author Grant Forsythe
// @match https://www.youtube.com/watch?v=*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
@grantwforsythe
grantwforsythe / gcd.py
Last active February 22, 2023 15:13
Find the greatest common divisor between two integers
def gcd(x: int, y: int ) -> int:
""" Find the greatest common divisor between two integers """
return x if y == 0 else gcd(y, x%y)