Skip to content

Instantly share code, notes, and snippets.

@hestenet
hestenet / spotify-slack-status.command
Last active February 23, 2018 19:09
A bash script (renamed .command for easy execution by double-click on a Mac) for keeping your Slack status updated with currently playing artist and track in Spotify
#!/bin/bash
APIKEY="YOUR TOKEN HERE from: https://api.slack.com/custom-integrations/legacy-tokens"
while true
do
SONG=$(osascript -e 'tell application "Spotify" to name of current track as string')
URLSONG=$(echo "$SONG" | perl -MURI::Escape -ne 'chomp;print uri_escape($_),"\n"')
ARTIST=$(osascript -e 'tell application "Spotify" to artist of current track as string')
URLARTIST=$(echo "$ARTIST" | perl -MURI::Escape -ne 'chomp;print uri_escape($_),"\n"')
curl -s -d "payload=$json" "https://slack.com/api/users.profile.set?token="$APIKEY"&profile=%7B%22status_text%22%3A%22"$URLSONG"%20-%20"$URLARTIST"%22%2C%22status_emoji%22%3A%22%3Amusical_note%3A%22%7D" > /dev/null
@hestenet
hestenet / column-toggle-and-size-for-jira-rapid-boards.js
Last active August 20, 2021 17:59
A javascript hack for JIRA that allows resizing of RapidBoard columns and toggling their display on/off - just add to your Announcement Banner
<script type="text/javascript">
/////////////////////
//
// DO NOT DELETE ME!
// Please take care when editing the announcement banner - it contains custom Javascript/CSS to improve Jira's UI.
//
/////////////////////
/////////////////////
// Inspired by