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
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker rmi $(docker images -q)
docker volume prune -f
docker network prune -f
rm -rf .local/share/tutor/
tutor config save --interactive
tutor local launch
menu_item:main:Dropbox:nickel_open:library:dropbox
menu_item:main:Send to Kobo:nickel_browser:modal:https://send.djazz.se
menu_item:main:Solitaire:nickel_extras:solitaire
menu_item:main:Sudoku:nickel_extras:sudoku
menu_item:main:Dark Mode:nickel_setting:toggle:dark_mode
menu_item:browser:Quit:nickel_misc:home
menu_item:browser:Orientation:nickel_orientation:swap
menu_item:reader:Reading Stats:nickel_open:reading_life:stats
# -----------------------------------------------------------------------
# Home/Main Screen
@guerrerocarlos
guerrerocarlos / lambda_usage.sql
Created May 11, 2024 09:08
Stats about real RAM usage of lambda instances https://console.aws.amazon.com/cloudwatch/home
filter @type = "REPORT"
| stats max(@memorySize / 1000 / 1000) as provisonedMemoryMB,
min(@maxMemoryUsed / 1000 / 1000) as smallestMemoryRequestMB,
avg(@maxMemoryUsed / 1000 / 1000) as avgMemoryUsedMB,
max(@maxMemoryUsed / 1000 / 1000) as maxMemoryUsedMB,
provisonedMemoryMB - maxMemoryUsedMB as overProvisionedMB
@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