Skip to content

Instantly share code, notes, and snippets.

View platedodev's full-sized avatar

Martin Dos Santos platedodev

View GitHub Profile
@platedodev
platedodev / Kata-Twin-Prime.js
Created September 13, 2017 02:05
Kata - Twin Prime
function isTwinPrime(n){
return (isPrime(n) && (isPrime(n-2) || isPrime(n+2)));
}
function isPrime(n) {
for (var i = 2; i < n; i++) if (n % i == 0) return false;
return n >= 2;
}
@platedodev
platedodev / resapro-esteroids.js
Last active July 15, 2017 19:40
Mejorar usabilidad en la Intranet de vacunación
/**
* Hacer que cuando tocas enter, se realice la búsqueda.
*/
$('#ct_nroDoc').keypress(function(event) {
var keycode = event.keyCode || event.which;
if(keycode == '13') {
$('#buscar').click();
}
});