Skip to content

Instantly share code, notes, and snippets.

View crstian19's full-sized avatar
🐧
Focusing

Cristian crstian19

🐧
Focusing
View GitHub Profile
@krisek
krisek / alert.rules.yml
Last active May 7, 2024 23:53
Prometheus alert rules for node exporter
groups:
- name: node_exporter_alerts
rules:
- alert: Node down
expr: up{job="monitoring-pi"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
@keilmillerjr
keilmillerjr / Creating an AUR Package.md
Last active May 22, 2024 16:14
How to create and manage an AUR package. #AUR #ARCH #makepkg #PKGBUILD
@bjesus
bjesus / README.md
Last active May 5, 2024 20:33
Weather widget for waybar
@Raniita
Raniita / script_medidas_aloha.m
Created May 31, 2019 09:28
Obtención de medidas de SDL ALOHA
%% Extraccion de los valores de la simulacion
% Datos de la practica
N_nodos = 6;
ranuras = 10000;
% Valores de PG probados
PG = {'0', '01', '025', '05', '075', '1', '125', '150', '175', '2', '25', '3', '35', '4', '45', '5', '6', '7', '8', '9', '95'};
TO = zeros(1,21);
TC = zeros(1,21);
@David-Lor
David-Lor / telebot_polling_template.py
Last active May 19, 2024 04:07
pyTelegramBotAPI - Never ending bot polling (recovery in failure)
"""
This is how I run my new bots created with pyTelegramBotAPI to avoid API errors,
like timeout errors or whenever my server can't reach Telegram servers (i.e. if net is down).
A while loop restarts the polling when it's ended due to an error.
A new bot object is created in each new loop execution, to avoid some errors.
We set all our message handlers in botactions() so the new bot object can use them.
Threading is not needed, but I prefer running the while True loop threaded so I can stop the bot
anytime with Ctrl+C, otherwise it can't be stopped easily. Killing the script is not nice and
I use databases in some bots, which should be closed beforehand.
@azhe403
azhe403 / kmskeys10.txt
Created November 25, 2017 16:49 — forked from CHEF-KOCH/kmskeys10.txt
Windows 10 KMS Keys
Windows.10.and.Office.2016.gVLK
#####################################################################
# Install/Uninstall keys #
#####################################################################
1.) Uninstall the current product by entering the “uninstall product key” extension:
slmgr.vbs /upk
2.) Install the key that you obtained above for “Windows Srv 2012R2 DataCtr/Std KMS for Windows 10”
@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube