Skip to content

Instantly share code, notes, and snippets.

View renatojobal's full-sized avatar
👋

Renato Johao Balcázar Loaiza renatojobal

👋
View GitHub Profile
@renatojobal
renatojobal / Sobre_Gist.md
Last active April 26, 2024 17:15
¿Qué es un gist en GitHub?

¿Qué es un Gist en GitHub y para qué sirve?

Un gist es una forma que se tiene para poder compartir código usando GitHub.

Cuando tenemos un código que no es lo suficientemente grande para crear un repositorio, entonces creamos un gist. Aunque gist funciona básicamente cómo un repositorio, ya que se le puede hacer un fork o clonarlo. Así mismo se puede editar y las personas pueden comentar el gist.

Usos del gist

Muchas personas usan gist cómo un portapapeles. Para subir código que siempre sueles usar en diferentes proyectos. También se suele usar cómo una forma de hacer posts. Cómo este que estas viendo.

@renatojobal
renatojobal / RFidEM4100GUI.py
Created October 25, 2019 17:02 — forked from IdrisCytron/RFidEM4100GUI.py
Create a simple GUI for USB RFid Reader EM4100 using Raspberry Pi.
from gpiozero import LED, Buzzer
from guizero import App, Box, Text, TextBox, warn
import csv
led8 = LED(19)
def clearDisplay():
print("Clear display")
rfidStatus.value = "---"
rfidText.value = ""
data class Student(
val name : String,
val email : String,
val age : Int
)
interface StrategyCustom {
abstract fun doAlgorithm(data: MutableList<Student>) : MutableList<Student>
}
@renatojobal
renatojobal / UbuntuNowWhat.md
Last active January 14, 2022 15:04
Installed Ubuntu... now waht?
  • Install Opera

  • Install Bitwarden on opera

  • Login on Google account

  • Login on Ubuntu account

  • Install Git

@renatojobal
renatojobal / index.html
Last active December 19, 2021 02:32
Under dir: /var/www/mrtg/index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>MRTG Index Page</TITLE>
<!-- Command line is easier to read using "View Page Properties" of your browser -->
<!-- But not all browsers show that information. :-( -->
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15" >
<META NAME="Command-Line" CONTENT="/usr/bin/indexmaker /etc/mrtg.cfg" >
<META HTTP-EQUIV="Refresh" CONTENT="300" >
<META HTTP-EQUIV="Cache-Control" content="no-cache" >
@renatojobal
renatojobal / mrtg.cfg
Created December 19, 2021 02:29
Under the dir: /etc/mrtg.cfg
# Created by
# /usr/bin/cfgmaker public@localhost
### Global Config Options
# for UNIX
# WorkDir: /home/http/mrtg
# for Debian
@renatojobal
renatojobal / aliases.zsh
Created December 9, 2021 15:51
Aliases for my ubuntu
alias gsm="git submodule update --init --recursive"
alias gch="git checkout"
@renatojobal
renatojobal / LogHelper.kt
Created September 15, 2021 14:06
Function to save log files
/**
* If the date is the same as the file, continue adding logs, but if the file has
* a past date, update that file to Firebase storage and delete that file.
*/
fun appendLog(context: Context, targetText: String) {
Timber.d("Saving a new log")
// Get flog files in local storage
val date = Date()
x = [14 15 16 17 18 19 20]; % Vector con los eventos favorables
% Obtenemos un vector de 100 elementos
y = [];
% La manera para que cada numero entre 14 y 20 tenga la misma probabilidad de aparaecer
% es que cada número aparesca 14 veces dentro del vector
for i = 1:14
y(end+1) = x(1);
def is_matriz_full(matriz):
"""
Funcion principal que recibe como parámetro una matriz.
Recorremos cada fila y luego por cada elemento de la fila llamamos a la
función 'is_repeated_value_in_row'.
"""
for row in matriz:
for item in row: