Skip to content

Instantly share code, notes, and snippets.

View unsignd's full-sized avatar
🧠

Yejoon Kim unsignd

🧠
View GitHub Profile
@zfarbp
zfarbp / s.md
Last active March 27, 2024 10:34
Trigger Spotify with osascript

Trigger Spotify with osascript

/Applications/Spotify.app/Contents/Resources/Spotify.sdef

# read-only
osascript -e 'tell application "Spotify" to player state'                  # stopped,playing,paused
osascript -e 'tell application "Spotify" to current track'                 # The current playing track.
osascript -e 'tell application "Spotify" to artwork url of current track'  # Image data in TIFF format.
osascript -e 'tell application "Spotify" to artist of current track'       # The artist of the track.
@rxlama7
rxlama7 / DiscordEmojiInfo.js
Last active May 4, 2021 01:50
Discord emoji information generator
var findModule = (item) => Object.values(webpackJsonp.push([[],{['']:(_,e,r)=>{e.cache=r.c}}, [['']]]).cache).find(m=>m.exports&&m.exports.default&&m.exports.default[item]!==void 0).exports.default;
findModule('sendMessage').sendMessage = (sendMessage => async(id, message, ...params) => {
if (message['content'].startsWith("getinfo <:") || message['content'].startsWith("getinfo <a:")) {
let arr = []
message.validNonShortcutEmojis.forEach(emoji => {
var emojiuse = message['content'].replace('getinfo ', '')
arr.push(` ${emojiuse}\n`)
arr.push(`Emoji \`${emoji.name}\` (${emoji.id})\n`)
arr.push(`Emoji Animated \`${emoji.animated}\` \n`)
arr.push(`Emoji Available \`${emoji.available}\` \n`)