Skip to content

Instantly share code, notes, and snippets.

View AlexZeitler's full-sized avatar
👷‍♂️
Building stuff

Alexander Zeitler AlexZeitler

👷‍♂️
Building stuff
View GitHub Profile
Backend-Text:	keines
Server:		keiner
@AlexZeitler
AlexZeitler / colorpalette.xml
Last active October 30, 2017 20:56
cmder dracula-ish theme
<key name="Palette1" modified="2017-10-30 21:49:58" build="161206">
<value name="Name" type="string" data="dracula"/>
<value name="ExtendColors" type="hex" data="00"/>
<value name="ExtendColorIdx" type="hex" data="0e"/>
<value name="TextColorIdx" type="hex" data="10"/>
<value name="BackColorIdx" type="hex" data="10"/>
<value name="PopTextColorIdx" type="hex" data="10"/>
<value name="PopBackColorIdx" type="hex" data="10"/>
<value name="ColorTable00" type="dword" data="00362a28"/>
<value name="ColorTable01" type="dword" data="00f993bd"/>
@AlexZeitler
AlexZeitler / async-either-with-promise.js
Created September 11, 2017 21:06 — forked from MikeBild/async-either-with-promise.js
Async Railway Oriented Programming in JS
#!/bin/env node
//thx to http://fsprojects.github.io/Chessie/a-tale-of-3-nightclubs.html
Promise.all([
suitablePersonEnterGayBar(),
unsuitablePersonEnterGayBar(),
])
.then(result => result.map((person, i) => `Person ${i+1}: ${person.cost || ''}${person.reasons.join(' ')}`))
.then(result => console.log(`Person entries\n${result.join('\n')}`));
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAABGCAIAAADq9Sl3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAIWpJREFUeF7tnAd4VFUa9++9M5PeSIE0klCkKVIEMaBLsyEgCBbEtbvIimv5WFBRAcsqzUgRBASkNwHpzQAJEAIhhIQkpPeZZGbSMyXT7nm/98y9GcIkkwRk99n9vvk//yfPzZlzztzM/d33vOfcM2HAKaccyAmHUw7lhMMph3LC4ZRDOeFwyqGccDjlUE44nHIoJxxOOZQTDqccygmHUw7lhMMph3LC4ZRDOeFwyqGccDjlUE44rCKEmExQ1wDqKofW6MBiAZ6/ZULE5v+P6t8GR4MWypSgqoIGDW80gU4PtQ1QUy9aVSlaXS2UEL2GNyuJqchsKNPpdDx+9P8Bmc1QWAZnEmHDb2TRWvhsseWNvzkyHD1L/5z6Bqiuo8YDna45H2TjJvLtIki+If6efAN/JV/OJ/t/h8ZGsbBNkUuXsT4cOCr+ftdqbMQ3pV1dzxBL7kr3FA6DkVSoyZbfze/PNYwbr3tomH74Y4anphre+4RftBp+2QWrtsGS9dTLNsAPG8nqDZbfV2kzPqtT/y218Im4tEePJ486mToqLm9CduWret0ek7mUWBp4SwPhG4HcO1x4AnUaknAVPvqGDJtMeo7Ru/erdu2lcglVS1xaulLqauzZBw6ehtwikFdAURl1sRy0WrFDQY8/TgKDyOat9DgrD8ZPBhcXGP0EpN3saIxZsRJkMvL2O+Kvd63aOnj7bdrVFuvJ3K3uGRykqBTWbm+c8JraN6KYc82WsJlS0dkySUVgmPYvE8nM+WTm5+T9hbBoJWz7qvbse5k3+x286r/urPTbQ5KFe1y+2uIRc1h25Cp76SZzpcizQPmMpnGL2V
@AlexZeitler
AlexZeitler / test.js
Last active October 4, 2022 21:50
fs.stat with async/await in Node.js 8
const asset = require('assert');
const fs = require('fs');
const { promisify } = require('util');
const stat = promisify(fs.stat);
describe('async stat', () => {
it('should not throw if file does exist', async () => {
try {
const stats = await stat(path.join('path', 'to', 'existingfile.txt'));
assert.notEqual(stats, null);
@AlexZeitler
AlexZeitler / node-cluster-messaging.js
Created April 29, 2017 07:33 — forked from jpoehls/node-cluster-messaging.js
Simple message passing between cluster master and workers in Node.js
var cluster = require('cluster');
if (cluster.isWorker) {
console.log('Worker ' + process.pid + ' has started.');
// Send message to master process.
process.send({msgFromWorker: 'This is from worker ' + process.pid + '.'})
// Receive messages from the master process.
@AlexZeitler
AlexZeitler / 1_createRootCA.sh
Last active June 1, 2021 08:50
create selfsigned certificate with subject alternative name
#!/usr/bin/env bash
mkdir ~/ssl/
openssl genrsa -des3 -out ~/ssl/rootCA.key 2048
openssl req -x509 -new -nodes -key ~/ssl/rootCA.key -sha256 -days 1024 -out ~/ssl/rootCA.pem
@AlexZeitler
AlexZeitler / gist:2c24a4d8ee10775f330447ff63bf19dc
Created February 12, 2017 20:13 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@AlexZeitler
AlexZeitler / vm-resize-hard-disk.md
Last active February 12, 2017 16:44 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where: