Skip to content

Instantly share code, notes, and snippets.

View dnnsmnstrr's full-sized avatar
:shipit:

Dennis Muensterer dnnsmnstrr

:shipit:
View GitHub Profile
@dnnsmnstrr
dnnsmnstrr / showHUD.js
Created February 28, 2023 13:18
Helper function to show HUD in BTT with JavaScript
function showHUD(text, icon, duration = 3) {
const hudConfig = {
BTTActionHUDHideWhenOtherHUDAppears: true,
BTTActionHUDDetail: text,
BTTIconConfigSFSymbolName: icon,
BTTActionHUDDuration: duration,
BTTActionHUDSlideDirection: 0,
BTTIconConfigImageHeight: 50,
BTTActionHUDTitle: "",
BTTIconConfigIconType: 2,
@dnnsmnstrr
dnnsmnstrr / apps.json
Last active February 27, 2023 11:47
List of apps I always install on my phone
[ "alexa", "amazon", "amazonprime", "apollo", "audible", "chrome", "dropbox", "facebook", "google", "googledocs", "googledrive", "googlemaps", "googlephotos", "googlesheets", "googletranslate", "imdb", "instagram", "jayson", "launchcenterpro", "messenger", "netflix", "paypal", "reddit", "scriptable", "signal", "spotify", "telegram", "twitch", "twitter", "workingcopy", "youtube", "mindnode" ]
@dnnsmnstrr
dnnsmnstrr / 8ball.txt
Last active February 27, 2023 11:46
8ball responses
No chance.
Odds aren't good...
Not now.
Ask again later.
Don’t count on it
Outlook not so good
My sources say no
Very doubtful
My reply is no
Possibly maybe!
@dnnsmnstrr
dnnsmnstrr / free-ram.applescript
Last active February 27, 2023 11:44
Free RAM on macOS
display dialog "Free inactive RAM?" buttons {"Cancel", "OK"} with icon 2 with title "Freeing RAM" default button 2
set buttonAnswer to the button returned of the resul
if buttonAnswer is "ОК" then
say "Freeing RAM. Wait please."
tell application "Terminal"
do shell script "purge"
quit
end tell
say "Done!"
end if
@dnnsmnstrr
dnnsmnstrr / links.md
Last active February 21, 2023 10:19
My social media
@dnnsmnstrr
dnnsmnstrr / response.json
Last active February 3, 2023 11:08
My playlists on Spotify available via a custom personal API. (the response.json is the data source)
{
"current": "https://open.spotify.com/playlist/3YKHRGx3OoWO2tRe3Duorm?si=24f725b6776a41fa",
"chill": "https://open.spotify.com/playlist/0x0ZQcmLsamIx5bF5px2Tc?si=JRKDeoYdS02T66Lhlo7V_w",
"spring": "https://open.spotify.com/playlist/68z163CKUImi0QB6ZpSigr?si=H-rEE3kMQ8WcEfgg-c6iQw",
"summer": "https://open.spotify.com/playlist/5wpb3PdQOzFb3jurTcVfZO?si=vMQ-JzRIRNqgCeGFTIZrXQ",
"autumn": "https://open.spotify.com/playlist/22XncHS02W5RWJ1yM4lV6l?si=2yW8i1WbSp6kk5gjEHXMIQ",
"winter": "https://open.spotify.com/playlist/67SvJfEofXhdIXwsuUJbCJ?si=DWOzFjMqQkqokKPueAGZaA",
"sleep": "https://open.spotify.com/playlist/13RQxSzWqVg3fHlalxlyhC?si=x8ppL0ZuSjKv8if8dQM39g",
"coding": "https://open.spotify.com/playlist/0camicGxGNwB9YS66nAwtb?si=ZpBdqb-7RWiDIiRt0g-asw",
"sports": "https://open.spotify.com/playlist/4X1uZRUIccnwcofS8QjBku?si=MK9RWVXWQaShcaiuyfJx6A",
@dnnsmnstrr
dnnsmnstrr / sponti_bot.js
Last active January 10, 2023 21:43
Telegram Bot on Cloudflare Worker
export default {
async fetch(request, env) {
const getRecords = async (offset) => {
const url = `https://api.airtable.com/v0/${env.AIRTABLE_BASE}/${env.AIRTABLE_ID}?api_key=${env.AIRTABLE_KEY}` + (offset ? `&offset=${offset}` : '')
const response = await fetch(url)
const records = await response.json()
return records
}
@dnnsmnstrr
dnnsmnstrr / btt.sh
Created August 1, 2021 18:58
Launch BetterTouchTool's named triggers from the command line. Requires the BTT webserver interface to be active.
#!/bin/bash
if [ -z "$1" ]
then
echo "No trigger supplied"
exit
fi
curl "http://127.0.0.1:12345/trigger_named/?trigger_name=$*"
Ahzumjot █████▋░░░░░░░░░░░ 18 plays
Eden ██▊░░░░░░░░░░░░░░ 9 plays
Kanye West █▌░░░░░░░░░░░░░░░ 5 plays
Harry Styles █▎░░░░░░░░░░░░░░░ 4 plays
High School Musical █▎░░░░░░░░░░░░░░░ 4 plays
Oliver Tree ▉░░░░░░░░░░░░░░░░ 3 plays
Pink Floyd ▉░░░░░░░░░░░░░░░░ 3 plays
Ravyn Lenae ▉░░░░░░░░░░░░░░░░ 3 plays
Troy ▉░░░░░░░░░░░░░░░░ 3 plays
ABBA ▋░░░░░░░░░░░░░░░░ 2 plays