Skip to content

Instantly share code, notes, and snippets.

View sauloco's full-sized avatar
🚀
Ready. Set. Go!

Saulo Vargas sauloco

🚀
Ready. Set. Go!
View GitHub Profile
<html>
<head>
</head>
<body>
Generar <input type="number" min = 1 max = 99 value = 0 onchange="document.getElementById('target').innerHTML = generate(this.value);"> veces: <br>
<div id = target></div>
</body>
<script>
/**
* params

Keybase proof

I hereby claim:

  • I am sauloco on github.
  • I am sauloco (https://keybase.io/sauloco) on keybase.
  • I have a public key whose fingerprint is 6F3F 284B 7C81 1594 F668 DB19 DF99 6FC5 9DBE 3C38

To claim this, I am signing this object:

@sauloco
sauloco / enablePiP.js
Created September 15, 2021 19:39
Star + // Disney + Picture in Picture
// Get videoSelector value using the element selector, then second button over the element, copy > copy selector
const videoSelector = '#hudson-player--1631733208198 > video';
const videoEl = document.querySelector(videoSelector);
videoEl.disablePictureInPicture = false;
videoEl.requestPictureInPicture();
@sauloco
sauloco / goToNewZealand.js
Created September 21, 2020 21:30
Resuelvo pruebas de programación de entrevistas para trabajar como programador en Nueva Zelanda
// multiplicar sin utilizar el signo "*"
const multiply = ( a, b ) => a / ( 1 / b );
console.group( 'multiply' )
console.assert( multiply( 2, 5 ) === 10, "All positive" );
console.assert( multiply( 2, -5 ) === -10, "b negative" );
console.assert( multiply( -2, 5 ) === -10, 'a negative' );
console.assert( multiply( -2, -5 ) === 10, 'All negative' );
console.assert( multiply( 0, 5 ) === 0, 'a is zero' );
console.assert( multiply( 2, 0 ) === 0, 'b is zero' );
console.groupEnd()
@sauloco
sauloco / factory_functions.md
Created November 16, 2021 13:07
Tool: Factory Functions

Factory Functions

Qué son las Factory Functions?

Nota: No confundir con el Factory Method Pattern.

Son funciones que crean y retornan objetos. Diseñadas para crear repetidamente objetos de una clase particular. Reemplaza declaraciones múltiples de objetos con una estructura similar. Lo que permite código más redundante.

@sauloco
sauloco / factory_functions.md
Created November 16, 2021 13:08
Que son las Factory Functions y como usarlas

Factory Functions

Qué son las Factory Functions?

Nota: No confundir con el Factory Method Pattern.

Son funciones que crean y retornan objetos. Diseñadas para crear repetidamente objetos de una clase particular. Reemplaza declaraciones múltiples de objetos con una estructura similar. Lo que permite código más redundante.

@sauloco
sauloco / rusticit.lighthouse.report.json
Last active January 4, 2022 12:19
Rustic IT Landing Page Lighthouse Results
{
"gatherMode": "navigation",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4590.2 Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36",
"benchmarkIndex": 1744.5,
"credits": {
"axe-core": "4.2.3"
}
@sauloco
sauloco / leptos_components_templates_jetbrains.md
Last active September 20, 2023 18:21
Leptos Components Jetbrains Templates

Leptos Components Jetbrains Templates

Create a File Template

This live template will allow you to quickly create a leptos component when creating a new file.

Will use the file name as component name. Usually names are snake cased, the script will use a camel cased version of file name for the component name. Example: file name gallery_item will result in the GalleryItem component.

@sauloco
sauloco / Gradient.js
Created November 24, 2021 18:51 — forked from jordienr/Gradient.js
Stripe Mesh Gradient WebGL
/*
* Stripe WebGl Gradient Animation
* All Credits to Stripe.com
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
* commented out for now.
* https://kevinhufnagl.com
*/