Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeroen Vollenbrock jeroenvollenbrock

  • Enschede, The Netherlands
View GitHub Profile
@jeroenvollenbrock
jeroenvollenbrock / index.js
Created May 15, 2021
AWS-CloudFront-basic-auth
View index.js
var USERS = {
protecteddir: [{
username: 'user',
password: 'pass',
}],
};
//Response when auth is not valid.
var response401 = {
statusCode: 401,
View simplemind2plantuml.js
//Usage: node simplemind2plantuml.js <path/to/smmx> > output.plantuml
//Requires fast-xml-parser and he npm modules
const xml = require('fast-xml-parser');
const he = require('he');
const fs = require('fs').promises;
function componentToHex(c) {
const hex = parseInt(c).toString(16);
return hex.length == 1 ? "0" + hex : hex;
}
@jeroenvollenbrock
jeroenvollenbrock / atlas_backup.sh
Created May 25, 2018
MongoDB Atlas backup downloader
View atlas_backup.sh
#!/bin/sh -e
# backup sync script for mongo atlas
# requires api whitelist access
# depends on curl, jq and shasum (if verify is enabled)
USER=${ATLAS_USER:=$1}
KEY=${ATLAS_KEY:=$2}
GROUP=${ATLAS_GROUP:=$3}
CLUSTER=${ATLAS_CLUSTER:=$4}
View github-projects-style.css
@-moz-document url-prefix("https://github.com/orgs/athombv/projects/") {
.project-column {
min-width: 275px;
max-width: 275px;
}
.project-columns-container {
height: height: calc(100vh - 121px);
}