Skip to content

Instantly share code, notes, and snippets.

View xbelanch's full-sized avatar
🏠
Working from home

Xavier Belanche Alonso xbelanch

🏠
Working from home
  • Xavier Belanche
  • World Wide Trash
  • X @xbelanch
View GitHub Profile
@xbelanch
xbelanch / moodlebook2md.rb
Created January 26, 2022 11:36
Clean all the shitty stuff from Moodle book to Markdown
#!/usr/bin/env ruby
## Clean HTML Moodle Book and export to markdown
require 'yaml'
require 'nokogiri'
require 'paru/pandoc'
require 'paru/filter'
require 'date'
warn <<-'EOF'
@xbelanch
xbelanch / ffmpeg.md
Last active October 8, 2022 10:22
ffmpeg windows 10 streaming udp
ffmpeg -f dshow -i video="Logitech HD Pro Webcam C920" -f dshow -i audio="Micrófono (5- Samson Meteor Mic)" -r 60 -vcodec libx264 -preset ultrafast -tune zerolatency -crf 18 -b:v 500k -bufsize 300k -f rtp_mpegts udp://192.168.1.121:1234

Streaming with dropping frames

ffmpeg -f dshow -i video="Logitech HD Pro Webcam C920" -f dshow -i audio="Micrófono (5- Samson Meteor Mic)" -r 30 -vcodec libx264 -preset ultrafast -tune zerolatency -crf 18 -b:v 1500k -bufsize 2500k -pix_fmt yuv420p -async 1 -vsync 1 -f flv rtmp://live.twitch.tv/app/{code}
#!/usr/bin/env ruby
## Deal with media embed output format
require "paru/filter"
require 'addressable/uri'
require "youtube_id"
format = if ARGV.first.nil? then "unknown" else ARGV.first end
warn "Filter :: Rewrite media embed code for output format: #{format}"
Paru::Filter.run do
# Quirkaglitch
## This is the complete solution.
1) With the key you can switch on the elevators
2) Get the pickaxe and the block
3) Swap the block for the piece of gold
4) Swap the gold for the coin
5) Swap the coin for the CD ROM
6) Swap the CD ROM for the puzzle object