Skip to content

Instantly share code, notes, and snippets.

View stdevPavelmc's full-sized avatar

Pavel Milanes (CO7WT) stdevPavelmc

View GitHub Profile
@stdevPavelmc
stdevPavelmc / repo_uppdate.sh
Created March 27, 2024 01:19
Ubuntu debmirror update script
#!/bin/bash
## Author: Pavel Milanes <pavelmc@gmail.com> / Telegram: @pavelmc
## Goal: mirror ubuntu repos
## Last Mod: Tue Mar 26 07:22:45 PM EST 2024
# This script use the terms described on the ubuntu base docs
# https://ubuntu.com/landscape/docs/explanation-about-repository-mirroring
# Archs, you can set more than one, comma separated no space [a,b,c,d]
@stdevPavelmc
stdevPavelmc / Secure_registry_microk8s.md
Last active December 22, 2023 07:00
Securing a microk8s registry

Adding auth for the default registry

  • Add this vars to the env in the deployment
- name: REGISTRY_AUTH_HTPASSWD_REALM
  value: Registry Realm
- name: REGISTRY_AUTH_HTPASSWD_PATH
  value: /var/lib/registry/registry.auth
@stdevPavelmc
stdevPavelmc / microk8s_registry_prune.sh
Last active May 22, 2023 16:10
Microk8s own registry on http://localhost:32000/ can get your drive full with time if you have a lot of images and/or tags; so I made a script based on solutions out in the internet about it, but it's an all in one; Just copy it to your server and run it weekly, monthly or wharever schedule fits you.
#!/bin/bash
# Author: Pavel Milanes <pavelmc@gmail.com>
# Goal: Prune the microk8s registry from unused images
# Date: May 2023
# force install needed tools: git, python3-pip, jq, curl...
apt-get install git python3-pip curl jq -y
# get the list of runing container images, install the soft if not there
@stdevPavelmc
stdevPavelmc / Disable_Gnome_tracker_for_good.md
Last active April 12, 2022 20:21
Disable tracker in Gnome 38-4x

Disable tracker in Gnome 38-4x

Tested on Gnome 40.x/41.x/42.x (Ubuntu) but must work on 38.x and grater.

Stop, disable & mask the services in the userspace (all in just one line):

The code is arranged to easy [human] inspection, read it before proceed; be aware that copy & pasting code on the internet is a bad pactice.

Copy the code below and paste it on your terminal + enter, no sudo is needed.

{"version":1,"resource":"file:///home/pavel/Documentos/ChagodTours/shago_website/docker/develop/postgres/backup.sh","entries":[{"id":"oJRg.sh","timestamp":1655934982623},{"id":"M5V9.sh","timestamp":1656571835313}]}
@stdevPavelmc
stdevPavelmc / Cell_Modem_3G_es.md
Last active October 21, 2022 23:41
Usa tu celular android como un modem 3G/4G y ahorra datos móviles

Como usar tu celular Android como modem para 3G/4G y ahorrar datos

This tutorial has an english version

Porque?

Quizás tu usas un proveedor de telefonía que tiene entre sus ofertas una tarifa plana, o una bien generosa y que te alcanza, pero en Cuba no existe tarifa plana y tendemos a exprimir cada byte de la conexión de datos.

Puede que te hayas topado con este caso: usas los datos móviles del celular compartidos por WiFi con la PC/Laptop de trabajo y no hay nada malo con eso, o si?

@stdevPavelmc
stdevPavelmc / Cell_Modem_3G.md
Last active September 15, 2022 15:28
How to use your Android Phone as a 3G/4G modem and save you mobile data

How to use your Android Phone as a 3G/4G modem and save you mobile data

Este tutorial tiene una versión en español

Why?

Maybe you has a plain data plan with your cell carrier and this don't care to you, but in Cuba the data plans are expensive and we need to squeeze even the last byte of data from it

Some times you face this scenario: You connect your Cell Phone to the mobile data and set it up as a WiFi hostspot to share the internet with your work PC or Laptop; this is Ok, but then you have a dual waste of bandwidth; yes, think about it:

#!/bin/sh
######################################################################
# Convert Youtube AV1 video files, Gnome nautilus script
#
# You need ffmped, mencoder and aom video encoder/decoder for AV1 video
#
# Goal here is to convert it as fast as it can with so-so resolution
# and playable in any embedded device, specs follows
#
#!/bin/sh
######################################################################
# Convert Youtube AV1 video files, Gnome nautilus script
#
# You need ffmped, mencoder and aom video encoder/decoder for AV1 video
#
# Goal here is to convert it as fast as it can with so-so resolution
# and playable in any embedded device, specs follows
#
#!/bin/sh
######################################################################
# Convert Youtube AV1 video files, Gnome nautilus script
#
# You need ffmped, mencoder and aom video encoder/decoder for AV1 video
#
# Goal here is to convert it as fast as it can with so-so resolution
# and playable in any embedded device, specs follows
#