Skip to content

Instantly share code, notes, and snippets.

Alexander Zeitler AlexZeitler

Block or report user

Report or block AlexZeitler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View async-await-promise-all-error-handling.js
const defaultFirst = 'A`'
const defaultSecond = 'B`'
const defaultThird = 'C`'
async function doFirst() {
// throw new Error('Error A')
return await 'A'
async function doSecond() {
AlexZeitler /
Created Feb 3, 2018 — forked from leosuncin/
Install Powerline on Debian/Ubuntu
  1. Install pip sudo apt-get install python-pip or wget && sudo python
  2. Install powerline sudo pip install powerline-status
  3. Download and install fonts git clone && cd fonts && sh ./
  4. Add this lines to respective file

set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
" Always show statusline

AlexZeitler / repro.txt
Created Nov 29, 2017 — forked from anonymous/repro.txt
vue.js / webpack / Windows 10 FCU WSL
View repro.txt
curl -o- | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/" ] && \. "$NVM_DIR/" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install 8.4.0
npm install -g vue-cli
vue init webpack my-project
cd my-project
Backend-Text:	keines
Server:		keiner
AlexZeitler / colorpalette.xml
Last active Oct 30, 2017
cmder dracula-ish theme
View colorpalette.xml
<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 / async-either-with-promise.js
Created Sep 11, 2017 — forked from MikeBild/async-either-with-promise.js
Async Railway Oriented Programming in JS
View async-either-with-promise.js
#!/bin/env node
//thx to
.then(result =>, i) => `Person ${i+1}: ${person.cost || ''}${person.reasons.join(' ')}`))
.then(result => console.log(`Person entries\n${result.join('\n')}`));
View gist:ea68c5be2cbacf9413c32fa131b0f556
AlexZeitler / test.js
Last active Feb 25, 2018
fs.stat with async/await in Node.js 8
View test.js
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 / node-cluster-messaging.js
Created Apr 29, 2017 — forked from jpoehls/node-cluster-messaging.js
Simple message passing between cluster master and workers in Node.js
View node-cluster-messaging.js
var cluster = require('cluster');
if (cluster.isWorker) {
console.log('Worker ' + + ' has started.');
// Send message to master process.
process.send({msgFromWorker: 'This is from worker ' + + '.'})
// Receive messages from the master process.
You can’t perform that action at this time.