Skip to content

Instantly share code, notes, and snippets.

View mattkohl's full-sized avatar
🌀
. . .

Matt Kohl mattkohl

🌀
. . .
View GitHub Profile
@mattkohl
mattkohl / update-slack-status-from-spotify.sh
Created March 12, 2018 13:04 — forked from kfox/update-slack-status-from-spotify.sh
Updates your Slack status with the current artist and song title in Spotify
#!/usr/bin/env bash
: "${SLACK_API_TOKEN:?Need to set SLACK_API_TOKEN environment variable}"
STATUS=$(/usr/bin/osascript <<"EOF"
if application "Spotify" is running and application "Slack" is running then
tell application "Spotify"
set currentArtist to artist of current track as string
set currentSong to name of current track as string
return currentArtist & " - " & currentSong
@mattkohl
mattkohl / readme.md
Created August 14, 2017 09:03 — forked from shaun-stripe/readme.md
texas flag emoji for Slack

Advanced Functional Programming with Scala - Notes

Copyright © 2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x