Skip to content

Instantly share code, notes, and snippets.

Jorge jbelloncastro

Block or report user

Report or block jbelloncastro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jbelloncastro /
Created Jan 28, 2020
Double dispatch C++
enum class Kind : unsigned int;
struct Base {
const Kind kind;
explicit Base(Kind kind) : kind(kind) {}
template <class T> bool is() const { return kind == T::kind; }
template <class T> const T* cast() const { return is<T>()? static_cast<const T*>(this) : nullptr; }
jbelloncastro /
Last active Mar 28, 2020
Search in youtube using youtube-dl and pipe the audio to VLC
#!/bin/bash -x
vlc_options=":sout=#transcode{vcodec=none,scodec=none}:http{mux=ogg,dst=:8080/} :no-sout-all :sout-keep"
youtube-dl "ytsearch1:$search" -r 200k -f 'bestaudio[ext=m4a]' -o - | cvlc - ${vlc_options}
You can’t perform that action at this time.