Monthly Shaarli

All links of one month in a single page.

March, 2022

Memo: How to test erb templates with ruby (puppet)
thumbnail

test.erb

<% if condition %>TRUE<% else %>FALSE<% end %>

test.rb

require 'erb'

condition = true                                                                                                                                                                                                

template = ERB.new File.read("test.erb"), nil, "%" 
puts template.result(binding)

Then, run ruby test.rb

Can also be very useful: Puppet Debugger

Plateforme reporter appels et sms

Je ne connaissais pas la plateforme, à voir si ça sert à qqchose.

GitHub - yt-dlp/yt-dlp: A youtube-dl fork with additional features and fixes
thumbnail

Fork de youtube-dl, je me le note ici car je ne retiens jamais son nom ..

  • Télécharger dans la meilleure qualité possible:

    yt-dlp -f bestvideo*+bestaudio/best -o '%(uploader)s_%(title)s.%(ext)s' <youtube-url>
  • Télécharger en 1920*1080:

    yt-dlp -f bv[height=1080]+ba -o '%(uploader)s_%(title)s.%(ext)s' <youtube-url>