Skip to content

Instantly share code, notes, and snippets.

View renatojobal's full-sized avatar
👋

Renato Johao Balcázar Loaiza renatojobal

👋
View GitHub Profile
data class Student(
val name : String,
val email : String,
val age : Int
)
interface StrategyCustom {
abstract fun doAlgorithm(data: MutableList<Student>) : MutableList<Student>
}
@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 / 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 / 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:
def calculate_sum_of_corners(matrix):
"""
Función que retorna la suma de 4 esquinas de una matriz en python
"""
up_left = matrix[0][0]
up_right = matrix[0][-1]
down_left = matrix[-1][0]
down_right = matrix[-1][-1]
/**
* * COPYRIGHT
* * This class is got from the video of the channel Donn Felker
* * on Youtube: https://www.youtube.com/watch?v=0BEkVaPlU9A
*/
import android.util.Log;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;