Skip to content

Instantly share code, notes, and snippets.

View felipealfonsog's full-sized avatar
🧳
Working from home

Felipe Alfonso González felipealfonsog

🧳
Working from home
View GitHub Profile
@felipealfonsog
felipealfonsog / livestreamingyoutube
Created February 14, 2017 07:37 — forked from laurenarcher/livestreamingyoutube
Livestreaming to Youtube Live, Ubuntu, Linux FFMPEG
Terminal Commands:
One webcam:
ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE
Two webcam overlay:
ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -f v4l2 -s 320x240 -r 10 -i /dev/video0 -filter_complex "[1:v]setpts=PTS-STARTPTS[bg]; [2:v]setpts=PTS-STARTPTS[fg]; [bg][fg]overlay=shortest=1 [out]" -map "[out]" -map 0:a -vcodec libx264 -pix_fmt yuv420p -preset veryfast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE
@felipealfonsog
felipealfonsog / Matrix_Effect.sh
Last active March 18, 2024 11:39 — forked from khakimov/gist:3558086
Matrix Effect in you terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@felipealfonsog
felipealfonsog / promises_reduce.js
Created December 2, 2017 05:35 — forked from anvk/promises_reduce.js
Sequential execution of Promises using reduce()
function asyncFunc(e) {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(e), e * 1000);
});
}
const arr = [1, 2, 3];
let final = [];
function workMyCollection(arr) {
@felipealfonsog
felipealfonsog / polymer-metadata-stats.js
Created January 16, 2018 23:35 — forked from TimvdLippe/polymer-metadata-stats.js
Script to obtain stats from Polymer metadata
window.counts = {}
for (const condition of [
'computed trigger.rootProperty equals name',
'computed trigger.rootProperty is name until first dot',
'computed arg.value is empty',
'computed arg.literal is false',
'computed arg.structured is false',
'computed info.methodInfo equals compute effect name',
'computed trigger.wildcard is false',
'computed trigger.literal is false',
@felipealfonsog
felipealfonsog / eq.preset
Created August 9, 2018 23:59 — forked from kra3/eq.preset
Audacious presets: ~/.config/audacious/eq.preset
[Presets]
Preset0=Classical
Preset1=Club
Preset2=Dance
Preset3=Flat
Preset4=Live
Preset5=Laptop Speakers/Headphone
Preset6=Rock
Preset7=Pop
@felipealfonsog
felipealfonsog / fuzzylogic.c
Created May 11, 2021 08:33
A small operation of basic fuzzy logic functions in C++
/** A small operation of basic fuzzy logic functions in C++ **/
/**
@file fuzzylogic.c
@ingroup mc2liveAlg
co-developer : Felipe A. Gonzalez f.alfonso@res-ear.ch
collaboration - hugh rawlinson - mu202hr@gold.ac.uk
**/
@felipealfonsog
felipealfonsog / gomatrix
Created July 16, 2021 00:44 — forked from dhaiducek/gomatrix
Modified Matrix Effect (original from @khakimov)
#!/bin/bash
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
lines=$1
random_col=$3
letter=$4
#!/bin/env sh
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"
lines=$1
@felipealfonsog
felipealfonsog / matrixshell.sh
Last active January 15, 2024 23:32
Matrix effect for a shell on Unix/Linux
#!/bin/bash
#modified from https://gist.github.com/dhaiducek by Felipe Gonzalez f.alfonso@res-ear.ch
lines=$(tput lines)
cols=$(tput cols)
awkscript='
@felipealfonsog
felipealfonsog / Samba Config
Last active April 8, 2024 08:46 — forked from sytkov/smb.conf
/etc/samba/smb.conf
# Quick general config
min protocol = SMB2
vfs objects = catia fruit streams_xattr
fruit:aapl = yes
fruit:metadata = stream
fruit:model = Macintosh
fruit:posix_rename = yes
fruit:veto_appledouble = no
fruit:wipe_intentionally_left_blank_rfork = yes