Skip to content

Instantly share code, notes, and snippets.

View jeroenvollenbrock's full-sized avatar

Jeroen Vollenbrock jeroenvollenbrock

View GitHub Profile
jeroenvollenbrock / index.mjs
Last active April 12, 2024 15:45
AWS Proxy Lambda
const TARGET = process.env.TARGET_BASE_URL;
export const EXCLUDED_HEADERS = [
const SHEET_TPL = [
'Nick Name',
'Project Name',
'Job Name',
'Not Submitted',
'Total Hours',
jeroenvollenbrock / slack-bulk-bot.js
Created September 30, 2022 17:07
Slack Bulk Bot
// GO TO, select from scratch, give the app a name and pick a workspace
// GO TO OAuth & Permissions, Oauth permissions -> Scopes, add chat:write and users:read to user scopes
// Press "install to workspace" at the top of the page, approve and copy User OAuth Token
// Go to Google sheets, create a new sheet, press Extentions -> Apps Script, Copy this code, press save, press execute
// Go back to Google Sheets, select Slack -> Initialize and paste the User OAuth token
// Fill out the input sheet with names (or user names), and messages you can use $firstname and $lastname placeholders, but it may be empty
// Press Slack -> Send to Recipients, confirm and watch while the status column is populated, the status column must be empty
const LOOKUP_TPL = [
jeroenvollenbrock / aws-cloudfront-basic-auth.js
Last active April 8, 2024 15:51
var USERS = {
protecteddir: [{
username: 'user',
password: 'pass',
//Response when auth is not valid.
var response401 = {
statusCode: 401,
//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 /
Created May 25, 2018 14:35
MongoDB Atlas backup downloader
#!/bin/sh -e
# backup sync script for mongo atlas
# requires api whitelist access
# depends on curl, jq and shasum (if verify is enabled)
jeroenvollenbrock / github-projects-style.css
Last active December 12, 2017 16:38
Stylish github projects
@-moz-document url-prefix("") {
.project-column {
min-width: 275px;
max-width: 275px;
.project-columns-container {
height: height: calc(100vh - 121px);