Skip to content

Instantly share code, notes, and snippets.

@kingosticks
kingosticks / gist:8208006
Last active January 1, 2016 22:09
Mopidy status and stats
OK MPD 0.17.0
status
volume: 100
repeat: 0
random: 0
single: 0
consume: 0
playlist: 0
playlistlength: 0
xfade: 0
@kingosticks
kingosticks / gist:8210242
Created January 1, 2014 18:30
01-01 18:22:42.667: E/MpdCallable(2565): failed after 3 attempts : java.net.SocketTimeoutException
INFO Request from [::ffff:127.0.0.1]:55146: list "album" "albumartist" "The Rolling Stones"
INFO Request from [::ffff:127.0.0.1]:55147: command_list_ok_begin
INFO Request from [::ffff:127.0.0.1]:55147: count "artist" "The Rolling Stones" "album" "A Bigger Bang"
INFO Request from [::ffff:127.0.0.1]:55147: count "artist" "The Rolling Stones" "album" "Aftermath"
INFO Request from [::ffff:127.0.0.1]:55147: count "artist" "The Rolling Stones" "album" "BRIT Awards 2013"
INFO Request from [::ffff:127.0.0.1]:55147: count "artist" "The Rolling Stones" "album" "Beggars Banquet"
INFO Request from [::ffff:127.0.0.1]:55147: count "artist" "The Rolling Stones" "album" "Best Of British"
INFO Request from [::ffff:127.0.0.1]:55147: count "artist" "The Rolling Stones" "album" "Between The Buttons"
INFO Request from [::ffff:127.0.0.1]:55147: count "artist" "The Rolling Stones" "album" "Big Hits (High Tide and Green Grass)"
INFO Request from [::ffff:127.0.0.1]:55147: count "artist" "The Ro
@kingosticks
kingosticks / gist:6c31f111fe116a76a85b
Last active August 29, 2015 14:14
pyspotify vs spotipy - artist albums
from __future__ import print_function, unicode_literals
import time
import spotify
import threading
import spotipy
sp = spotipy.Spotify()
VARIOUS_ARTISTS_URIS = [
'spotify:artist:0LyfQWJT6nXafLPZqxe9Of',
@kingosticks
kingosticks / main.cpp
Created February 23, 2015 11:43
Alternative reicast SetupInput
#ifdef TARGET_PANDORA
#define DEFAULT_KEYBOARD_DEVICE "/dev/input/event4"
#else
#define DEFAULT_KEYBOARD_DEVICE "/dev/event2"
#endif
void SetupInput()
{
for (int port=0;port<4;port++)
{
@kingosticks
kingosticks / config.json
Created December 14, 2015 15:21
TomTom MySports
https://mysports.tomtom.com/service/config/config.json
{
"self":"https://mysports.tomtom.com/service/config/config.json"
"env":"prod"
"service:webshop":"http://sports.tomtom.com/{LOCALE}"
"service:webshop_actionsports":"http://www.tomtom.com/{LOCALE}/action-camera/action-camera/#accessories/"
"service:pairing_support":"http://www.tomtom.com/{FORUM_ID}"
"service:ephemeris":"https://gpsquickfix.services.tomtom.com/fitness/sifgps.f2p{DAYS}enc.ee"
"service:ephemeris_glonass":"https://gpsquickfix.services.tomtom.com/fitness/sifglo.f2p{DAYS}enc.ee"

Keybase proof

I hereby claim:

  • I am kingosticks on github.
  • I am nicksteel (https://keybase.io/nicksteel) on keybase.
  • I have a public key ASAI609fqxbBD_x3OGzskhEOfq1gOVeRRJOO5NkvGzFMVQo

To claim this, I am signing this object:

# In mopidy/mpd/actor.py
class MpdFrontend(pykka.ThreadingActor, CoreListener):
def __init__(self, config, core):
super(MpdFrontend, self).__init__()
self.hostname = network.format_hostname(config['mpd']['hostname'])
self.port = config['mpd']['port']
self.uri_map = uri_mapper.MpdUriMapper(core)
@kingosticks
kingosticks / mopidy-display-cover.sh
Last active November 9, 2020 14:53
Mopidy cover artwork displayer
#!/bin/bash
# sudo apt-get install mpc jq fbi wget
MPD_PORT=6600
HTTP_PORT=6680
RPC_HOST=http://localhost:$HTTP_PORT/mopidy/rpc
TRACK_ARTWORK=/tmp/cover-art-img
DEFAULT_ARTWORK=some-default-picture
@kingosticks
kingosticks / search_youtube.py
Created May 23, 2018 15:02
Parses YouTube's mobile search results page
#!/usr/bin/python
from __future__ import unicode_literals
from lxml import html
import requests
import sys
if len(sys.argv) > 1:
query = sys.argv[1]
else:
@kingosticks
kingosticks / gist:970886f978ba1bbe180927db1ab6fae9
Created January 2, 2019 23:58
spotify-analyze /proc/?/map
Previously (16.04):
00400000-02bdc000 r-xp 00000000 103:05 3411267 /usr/share/spotify/spotify
02bdd000-02bdf000 r--p 027dc000 103:05 3411267 /usr/share/spotify/spotify
02bdf000-02fe8000 rwxp 027de000 103:05 3411267 /usr/share/spotify/spotify
Now (18.10):
00200000-010ed000 r--p 00000000 103:06 4471655 /usr/share/spotify/spotify
010ed000-021e1000 r-xp 00eed000 103:06 4471655 /usr/share/spotify/spotify
021e1000-025f5000 rwxp 01fe1000 103:06 4471655 /usr/share/spotify/spotify