Skip to content

Instantly share code, notes, and snippets.

View Megver83's full-sized avatar

David P. Megver83

View GitHub Profile
@SebaBlamey
SebaBlamey / asistencia.py
Last active December 6, 2023 15:09
Registrar asistencia en Hawaii UCN
import requests
import argparse
def registrar_asistencia(codigo, rut, nota):
url = f"https://losvilos.ucn.cl/hawaii/asist.php?c={codigo}&op=m"
data = {
'r': rut,
'n': nota,
}
@seanblanchfield
seanblanchfield / gcal_countries.py
Created July 29, 2021 14:27
Google calendar public holiday names by country
# Complete mapping of ISO 3166 2-letter country codes to descriptions used in Google calendar URLs, accurate as of 29 July 2021.
iso_to_gcal_description = {
"ad": "ad",
"ae": "ae",
"af": "af",
"ag": "ag",
"ai": "ai",
"al": "al",
"am": "am",
@rishitells
rishitells / Jest_GitLab_CI.md
Last active December 25, 2024 22:21
Setting up Jest tests and coverage in GitLab CI

Configuring Jest Tests in GitLab CI

1. Add GitLab CI configuration file in the root

In the root of your project, add .gitlab-ci.yml with the configuration below.

image: node:latest

stages:
private static void burbuja(int[] arreglo) {
for (int x = 0; x < arreglo.length; x++) {
// Aquí "y" se detiene antes de llegar
// a length - 1 porque dentro del for, accedemos
// al siguiente elemento con el índice actual + 1
for (int y = 0; y < arreglo.length - 1; y++) {
int elementoActual = arreglo[y],
elementoSiguiente = arreglo[y + 1];
if (elementoActual > elementoSiguiente) {
// Intercambiar
@pirate
pirate / docker-compose-backup.sh
Last active January 26, 2025 23:38
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
@narate
narate / create-hotspot.md
Last active April 15, 2025 08:11
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"