This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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"