Skip to content

Instantly share code, notes, and snippets.

View muffincode's full-sized avatar
🐑
Taking care

Camille Fite muffincode

🐑
Taking care
View GitHub Profile
@jgamblin
jgamblin / slackspotify.sh
Created April 19, 2017 01:10
A Script To Set Current Spotify Song As Slack Status
#!/bin/bash
APIKEY="From Here https://api.slack.com/custom-integrations/legacy-tokens"
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"')
while true
do
curl -s -d "payload=$json" "https://slack.com/api/users.profile.set?token="$APIKEY"&profile=%7B%22status_text%22%3A%22"$URLSONG"%22%2C%22status_emoji%22%3A%22%3Amusical_note%3A%22%7D" > /dev/null
sleep 60
done
@scamba
scamba / moz-functions.php
Last active May 7, 2022 01:44
PHP script for get DA from MOZ's API
<?php
/*
-- =========================================================================================
-- Author: Sergio Camba (https://github.com/scamba)
-- Create date: 18/04/2017
-- Description: Function library for MOZ API
-- More info: https://moz.com/products/api
-- =========================================================================================