Skip to content

Instantly share code, notes, and snippets.

View donal56's full-sized avatar
🏠
Working from home

Carlos Donaldo Ramon Gomez donal56

🏠
Working from home
View GitHub Profile
@donal56
donal56 / evaldoc.js
Last active February 16, 2021 16:50
Evaluacion docente ITVH automática en base a dos preguntas
var avg = prompt('¿Que calificación le pondría al profesor (0-100)?');
var repre = prompt('¿Considera que el maestro toma represalias contra los alumnos?\n1= No 2 3= No estoy seguro 4 5= Sí');
var mySet = new Set();
var aux = [];
var cont= 0;
var desfase= 5;
var cont_ciclos= 0;
var fDispersion= 1; /*(0-20), cambiara a los elementos asi de cercanos o lejanos*/
avg = Number(avg);
@donal56
donal56 / php_vscode_printing.json
Last active December 15, 2019 01:11
Visual Studio Code snippet_and_keybinding for forced printing/brute debug on PHP
{
// Place your snippets for php here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@donal56
donal56 / App.java
Created December 15, 2019 04:04
Quick cartesian map module
package app;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JScrollBar;
@donal56
donal56 / controller.vm
Last active September 12, 2022 04:00
Template de Telosys Tools para SpringBoot
#set($words = $entity.databaseTable.split("_"))
#set($attr = "")
#foreach($word in $words)
#set($attr = $attr + $fn.capitalize($word))
#end
#set($ruta = $entity.databaseTable.replace("_", "/"))
#set($lc= $fn.uncapitalize(${attr}))
package ${ROOT_PKG}.${MAVEN_GROUP_ID}.${MAVEN_ARTIFACT_ID}.controllers;
import javax.validation.Valid;
@donal56
donal56 / validarCurp.js
Last active February 8, 2024 19:52
Validar una CURP con base en datos personales
_debug = true;
/*
* Validar una curp con base en datos personales
*
* @param {Object} persona - Datos de la persona
* nombre {String}
* apellidoPaterno {String}
* apellidoMaterno {String|null}
* fechaNacimiento {Date}
@donal56
donal56 / custom_discord.js
Last active March 7, 2025 17:13
Things i dont like about discord done. Bigger emojis, autoloop videos, smallmode.
// ==UserScript==
// @name Custom discord
// @namespace http://tampermonkey.net/
// @version 0.1.1
// @description Enlarge discord emojis and loop videos
// @author Doni
// @match https://discord.com/*
// @icon https://i.imgur.com/rE9N0R7.png
// @grant none
// ==/UserScript==
@donal56
donal56 / aguringu-downloader.js
Last active October 21, 2023 05:23
(agumation-utilities) Descarga videos del aguringu FC. Es necesario agregar los enlaces en links.txt y las credenciales del sitio junto con la api key de deepl en properties.js. Youtube-dl debe estar instalado y disponible en el path.
const exec = require('child_process').exec;
const deepl = require('deepl-node');
const puppeteer = require('puppeteer');
const URL = require('url').URL;
const fs = require('fs');
const properties = require('./properties.js');
// Datos del club
const baseUrl = "https://aguri-onishi.com";
const loginUrl = baseUrl + "/signin";
@donal56
donal56 / aguringu-subtitles-helper.js
Created January 12, 2023 20:30
(agumation-utilities) Toma la salida de whisperAI y convierte la salida en SRT válido, a su vez traduce los subtitulos en español. Es necesario agregar las credenciales del sitio junto con la api key de deepl en properties.js.
const fs = require('fs');
const path = require('path');
const deepl = require('deepl-node');
const properties = require('./properties.js');
// Datos de DeepL
const apiKey = properties.deepl.apiKey;
const translator = new deepl.Translator(apiKey);
const targetLanguage = "ES";
@donal56
donal56 / custom_tokyo_otaku_mode.js
Created February 20, 2023 03:05
Display hearth buttons more clearly on https://otakumode.com
// ==UserScript==
// @name Custom Tokyo Otaku Mode
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Display hearth buttons more clearly
// @author Doni
// @match https://otakumode.com/*
// @icon https://d1u8dm08vp3e0x.cloudfront.net/images/common/apple-touch-icon.png
// @grant none
// ==/UserScript==
@donal56
donal56 / gist:68916718244516e85ed0c781223420e1
Created July 16, 2023 02:47
Number of islands - Test code
/**
* Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.
* An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically.
* You may assume all four edges of the grid are all surrounded by water.
*
* Example 1:
*
* Input: grid = [
* ["1","1","1","1","0"],
* ["1","1","0","1","0"],