Skip to content

Instantly share code, notes, and snippets.

View ncortines's full-sized avatar

Juan Cortines ncortines

  • Pegasystems
  • Kraków, Poland
View GitHub Profile
@ncortines
ncortines / knowbe4turbo.js
Last active March 21, 2024 19:16
Don't have much time to finish your knowbe4 training?
(() => {
const getSliderControlInput = () =>
document.querySelectorAll('input[data-ref=progressBar]')[0]
const getPlayButton = () =>
document.querySelectorAll('button[id=play-pause]')[0]
const isInputReady = $input =>
parseInt($input.value) < (parseInt($input.max) - parseInt($input.step))
const isPaused = $play =>
$play.attributes['aria-label'] && $play.attributes['aria-label'].value.includes('Play')
@ncortines
ncortines / electron-ephemeral-ssl.js
Last active March 21, 2024 19:21
Ephemeral SSL certificates for Electron based applications
'use strict';
const https = require('https');
const crypto = require('crypto');
const tls = require('tls');
const forge = require('node-forge');
const pki = forge.pki;
const getRandomPortNumber = () =>
Math.floor(Math.random() * (65535 - 49152)) + 49152
@ncortines
ncortines / successfactors.js
Last active February 24, 2023 09:54
Script used to scrape data from performancemanager8.successfactors.com
// script used to scrape data from performancemanager8.successfactors.com
// it downloads photos from the organization's chart
// photo file name contains firstname, lastname, position and hire date
(() => {
// root node - does not necessarily have to be the top-most
const THE_BOSS = 'TREFA'
// retry interval in case of server error
const RETRY_INT = 1000
@ncortines
ncortines / IndexedDB-+-Backbone-+-Knockout-+-Knockback.markdown
Created November 27, 2014 12:58
IndexedDB + Backbone + Knockout + Knockback

IndexedDB + Backbone + Knockout + Knockback

This explains how to load sorted and filtered data on a responsive way thanks to indexeddb

A Pen by Juan Cortines on CodePen.

License.