Skip to content

Instantly share code, notes, and snippets.

View guerrerocarlos's full-sized avatar
:octocat:
On shoulders of giants.

Carlos Guerrero guerrerocarlos

:octocat:
On shoulders of giants.
View GitHub Profile
@guerrerocarlos
guerrerocarlos / New_Macbook_setup.md
Last active February 26, 2024 17:01
Mac Setup Guide

Install Prezto

  1. Launch Zsh:

    zsh
  2. Clone the repository:

@guerrerocarlos
guerrerocarlos / RaspSyncthing.md
Last active February 14, 2024 20:47
How to setup Syncthing in a Raspberry Pi

Install syncthing:

sudo mkdir -p /etc/apt/keyrings
sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt-get update
sudo apt-get install syncthing
printf "Package: *\nPin: origin apt.syncthing.net\nPin-Priority: 990\n" | sudo tee /etc/apt/preferences.d/syncthing.pref
sudo apt-get install apt-transport-https
@guerrerocarlos
guerrerocarlos / RasPiCloudflareDNS.md
Last active February 11, 2024 11:12
How to setup DDclient on Raspberry Pi for use with Namecheap DynDNS
@guerrerocarlos
guerrerocarlos / plex_media_permissions_4_noobies.md
Created February 10, 2024 19:50 — forked from pjobson/plex_media_permissions_4_noobies.md
Plex Media Permissions for Linux Noobies

Plex Media Permissions for Linux Noobies

There is no problem with being a noobie and I do not use the term to sligtht or disparage anyone.

This is a way to setup your permissions for running Plex in Linux. Different folks may use different methods.

The permissions concepts provided here apply to OSX, but the users and groups are controlled and modified differently, so much of this will not work properly. I think the command is dscl, but that could be out of date.

There are many ways to setup your permissions scheme in Linux, this methodology describes a way to do it, not everyone will like it, but it works for me, so whatever.

function trimNewlinesAndSpaces(inputString: string | number) {
// Remove newlines and replace multiple spaces with a single space
if (typeof inputString === "string") {
return inputString.replace(/\n/g, '').replace(/ +/g, ' ').replace(/\,/g, '');
} else {
return "" + inputString
}
}
function trimNewlinesAndSpaces(inputString) {
// Remove newlines and replace multiple spaces with a single space
if (typeof inputString === "string") {
return inputString.replace(/\n/g, '').replace(/ +/g, ' ').replace(/\,/g, '');
} else {
return "" + inputString
}
}
const flattenObj = (results, parentKey, obj) => {
setopt localoptions rmstarsilent
@guerrerocarlos
guerrerocarlos / rotate-video.sh
Created September 22, 2023 09:10 — forked from ViktorNova/rotate-video.sh
Rotate a video with FFmpeg (100% lossless, and quick)
$INPUTVIDEO='input.mp4'
$OUTPUTVIDEO='output.mp4'
ffmpeg -i $INPUTVIDEO -metadata:s:v rotate="-90" -codec copy $OUTPUTVIDEO
@guerrerocarlos
guerrerocarlos / ffmpeg_fast.sh
Last active March 29, 2024 10:46
Use Apple Metal M1 M2 acceleration with ffmpeg
ffmpeg -i PXL4.mp4 -c:v h264_videotoolbox -q:v 65 -c:a copy output_q65.mp4
esto
es
una
prueba