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 / custom-mandarake-alert-list.js
Last active June 12, 2024 04:51
Script to use ajax when turning off alert list notifications and deleting favorites in Mandarake
// ==UserScript==
// @name Custom Mandarake
// @namespace http://tampermonkey.net/
// @version 2024-04-10
// @description Deactivate alerts without the whole page reloading
// @author Doni
// @match https://order.mandarake.co.jp/order/mypage/announceList*
// @match https://order.mandarake.co.jp/order/mypage/favoritesList*
// @icon https://www.google.com/s2/favicons?sz=64&domain=mandarake.co.jp
// @grant none
package mx.com.insigniait.scriptum.controllers;
import java.util.Arrays;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* @author Doni, 10/07/2023 10:10:21
*
@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"],
@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 / 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 / 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 / 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 / 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 / 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 / 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;