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 / Configuration for .gitconfig
Last active January 4, 2022 11:04 — forked from pksunkara/config
The git ~/.gitconfig & .gitconfig - Fix the problem of How can I save username and password in Git Unix//Mac
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
[sendemail]
smtpencryption = tls
@felipealfonsog
felipealfonsog / gpg_fix.txt
Created December 30, 2021 20:27 — forked from cezaraugusto/gpg_fix.txt
fixing `gpg failed to sign data` error on macOS
For troubleshooting, two things to first try:
run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg
run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working
If that all looks all right, one next thing to try:
run `brew install pinentry` to ensure you have a good tool installed for passphrase entry
If after that install and you re-try git commit and still get the "failed to sign the data" error:
run `gpgconf --kill gpg-agent` to kill any running agent that might be hung
@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
#!/bin/env sh
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"
lines=$1
@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
@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 / 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 / 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 / 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 / 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