Or how to turn this:
into this:
| # Step 1 | |
| def create_subscription(email, plan_id, payment_method_id) do | |
| with %User{customer_id: nil, name: name} = user <- | |
| Repo.get_by(User, email: email), | |
| {:ok, %Stripe.Customer{id: customer_id}} <- | |
| Stripe.Customer.create(%{ | |
| name: name, | |
| email: email, | |
| payment_method: payment_method_id, |
| - Parzialmente ispirato a vari gist sparsi per il web | |
| - Sto ancora facendo tuning dei parametri | |
| # TRASMETTERE: | |
| INTEL e AMD [VAAPI] (libva-mesa-driver): | |
| ffmpeg -f x11grab -s 1920x1080 -framerate 60 -i $DISPLAY -vaapi_device /dev/dri/renderD128 -vf 'format=nv12,hwupload,scale_vaapi=w=1920:h=1080' -c:v h264_vaapi -qp:v 26 -bf 0 -preset superfast -tune zerolatency -b:v 2000K -minrate 2000K -maxrate 2000K -bufsize 512k -f rawvideo udp://192.168.1.222:12345 | |
| NVIDIA (CUDA/NVENC/H264) STREAM: | |
| ffmpeg -hwaccel cuda -hwaccel_output_format cuda -f x11grab -s 1920x1080 -i $DISPLAY -c:v h264_nvenc -zerolatency 1 -delay:v 0 -preset p1 -tune ull -b:v 2000k -bufsize 512k -maxrate 2000k -qmin 0 -temporal-aq 1 -rc-lookahead 0 -i_qfactor 0.75 -b_qfactor 1.1 -f rawvideo udp://192.168.1.222:12345 |
| # Creating a complex hash, with nested keys | |
| my_complex_hash = { | |
| users: [ | |
| {name: "Yukihiro Matsumoto", age: 57}, | |
| {name: "Kabosu the Shiba Inu", age: 16}, | |
| {name: "Thiago Massa", age: 33} | |
| ] | |
| } |