Skip to content

Instantly share code, notes, and snippets.

View rogue1256's full-sized avatar

Aleksandr Smirnov rogue1256

  • Helsinki, FI
View GitHub Profile
@rogue1256
rogue1256 / filterArray.js
Created February 12, 2021 09:06 — forked from jherax/arrayFilterFactory.1.ts
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
@rogue1256
rogue1256 / jwtRS256.sh
Created November 30, 2020 08:20 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub