Skip to content

Instantly share code, notes, and snippets.

View tadev's full-sized avatar
💭
I may be slow to respond.

tadev

💭
I may be slow to respond.
View GitHub Profile
@tadev
tadev / ytplaylist.py
Last active December 29, 2022 03:37
script to get a youtube mix auto playlist using youtube-dl
#!/usr/bin/env python3
'''
Outputs a youtube playlist, one link per line
If a playlist link is passed as a parameter, it outputs all the links contained in that playlist.
If a search string is passed, it downloads an auto-generated Youtube Mix playlist for the first result of that search term.
If a single Youtube video link is passed, it downloads an auto-generated Youtube Mix playlist for that link.
This script can be piped directly to a player that supports youtube such as mpv
Examples:
@tadev
tadev / api.github.com.js
Last active December 15, 2015 17:29
github api functions for ircbot ringor in #docker on freenode
/*jslint evil: true, regexp: true */
// Create a github object only if one does not already exist.
//TODO: Convert to use github's JSONP endpoints so headers are visible to javascript too - http://developer.github.com/v3/#json-p-callbacks
//TODO: Pagination support - http://developer.github.com/v3/#pagination
var github;
if (!github) { github = {}; }
if (!github.users) { github.users = {}; }
if (!github.repos) { github.repos = {}; }