Skip to content

Instantly share code, notes, and snippets.

View stocks29's full-sized avatar

Bob Stockdale stocks29

View GitHub Profile
@stocks29
stocks29 / nximage_resize_memory.livemd
Created November 28, 2024 16:58
NxImage Resize Memory

NxImage Resize Memory

Mix.install(
  [
    {:exla, "~> 0.9.2"},
    {:nx, "~> 0.9.2"},
    {:nx_image, "~> 0.1.2"},
    {:req, "~> 0.5.7"},
    {:stb_image, "~> 0.6.9"}
@stocks29
stocks29 / .bash_aliases
Created August 9, 2014 04:06
watch youtube channels on your raspberry pi from cli
play_video() {
youtube-dl -g $1 | xargs omxplayer
}
play_most_recent_channel_video() {
wget -q -O- "http://gdata.youtube.com/feeds/base/videos?alt=rss&orderby=published&author=$1" | grep -o '<link>http://www.youtube.com/watch[^<]*</link>' | grep -o 'http[^&]*' | head -1 | xargs youtube-dl -g | xargs omxplayer
}
play_most_recent_from_playlist() {
channels=( "UC67Vc0fkLYeUPBp1f02VY9Q" "UCKrD_GYN3iDpG_uMmADPzJQ" )