Skip to content

Instantly share code, notes, and snippets.

@mbeasley
mbeasley / sp
Created April 25, 2018 19:22 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@mbeasley
mbeasley / spotify-add-from-ncmpcpp
Created January 5, 2016 16:46
Add the currently playing ncmpcpp mopidy-spotify song to a specific spotify playlist via bash script
#!/usr/bin/env bash
# Add the currently playing ncmpcpp mopidy-spotify song to a specific
# playlist via bash script
#
# Dependencies
# - ncmpcpp setup with mopidy and spotify (via mopidy-spotify)
# - IFTTT account with the "Maker" channel activated
# - An environment variable called MAKER_KEY containing your Maker
# channel secret key
## Install necessary packages
$ sudo apt-get install virtualbox-ose qemu-utils genisoimage cloud-utils
## get kvm unloaded so virtualbox can load
$ sudo modprobe -r kvm_amd kvm_intel
$ sudo service virtualbox stop
$ sudo service virtualbox start
## URL to most recent cloud image of 12.04
$ img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release"
@mbeasley
mbeasley / keybase.md
Last active June 5, 2017 13:18
keybase.md

Keybase proof

I hereby claim:

  • I am mbeasley on github.
  • I am mbeasley (https://keybase.io/mbeasley) on keybase.
  • I have a public key ASCAxADgayp36K4pF_N2KVRw5c-WIAPshGbUJSXmdk2QyAo

To claim this, I am signing this object:

@mbeasley
mbeasley / README.md
Last active December 24, 2015 15:29
The Costs of Natural Disasters in Georgia

A D3.js choropleth example showing the costs of various natural disasters in the state of Georgia between 2010 and 2012. The geometry data used to create the maps came from diva-gis and was parsed with OGR2OGR into GeoJSON and then into topoJSON (combining the county and state geometries into one data set).

Mouse-over a specific county to show the information for that county.

Read the code here

See the full working version here

And download the code here