Skip to content

Instantly share code, notes, and snippets.

View Yizack's full-sized avatar

Yizack Rangel Yizack

View GitHub Profile
@Yizack
Yizack / tweenNumber.js
Created May 22, 2023 17:29
Tween a number, increment number from 0 to a desired target within a specified duration in seconds. Get count number in callback function.
/** Tween a number, increment number from 0 to a desired target within a specified duration in seconds. Get count number in callback function.
* @param {number} target
* @param {number} duration
* @param {function} callback
* @returns {Promise<void>}
* @example
* await tweenNumber({ target: 100, duration: 1 }, (n) => console.log(n));
*/
const tweenNumber = async ({ target, duration }, callback = (n = 0) => {}) => {
let count = 0;
@Yizack
Yizack / Flag_of_Panama.svg
Created October 15, 2022 00:28
Insignia SVG con diseño y colores actuales de la bandera de Panamá (2022). SVG badge with the design and current colors of the flag of Panama (2022).
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Yizack
Yizack / submissions.gs
Created March 25, 2022 11:31
Script to deploy a JSON service on Google Apps Script from all the responses of a Google Forms / Script para implementar un servicio JSON en Google Apps Script a partir de todas las respuestas de un formulario de Google Forms
function getSubmissions() {
var form = FormApp.openById('YOUR-FORM-ID'); // Paste your form ID here
var submissions = [];
var formResponses = form.getResponses();
// Loop through all responses
for (var i = 0; i < formResponses.length; i++) {
var formResponse = formResponses[i];
var itemResponses = formResponse.getItemResponses();
// Get timestamp of response
@Yizack
Yizack / provincias.json
Last active June 27, 2023 12:08
Provincias, distritos y corregimientos de Panamá incluyendo las comarcas a nivel de provincias y su respectivo prefijo de cédula. Archivo JSON. Actualizado 2022
{
"provincia": [
{
"nombre": "Bocas del Toro",
"ced": "1",
"iso_3166_2": "PA-1",
"capital": "Bocas del Toro",
"distrito": [
{
"nombre": "Almirante",
@Yizack
Yizack / countries.json
Last active June 9, 2024 17:10
List of countries and territories in English and Spanish: name, continent, capital, dial code, country codes, TLD, and area in sq km. Lista de países y territorios en Inglés y Español: nombre, continente, capital, código de teléfono, códigos de país, dominio y área en km cuadrados. Updated 2024
{
"countries" : [
{
"name_en": "Afghanistan",
"name_es": "Afganistán",
"continent_en": "Africa",
"continent_es": "África",
"capital_en": "Kabul",
"capital_es": "Kabul",
"dial_code": "+93",
@Yizack
Yizack / Cloudflare.vb
Last active May 15, 2019 22:33
Cloudflare purge files method (Visual Basic.NET)
' Title: Cloudflare.vb
' Author: @Yizack
' Description: Visual Basic class for purge files programmatically with the Cloudflare API.
' Date: 2019/05/15
Imports System.Net
Imports System.Text
Public Class Cloudflare
' Example use: