(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
const bcrypt = require("bcrypt"); | |
// use this library in case your version of node doesn't support Promise | |
// const Promise = require("promise"); | |
let password = "hello"; | |
let stored_hash = ""; | |
// first generate a random salt | |
function genSalt(password) { | |
return new Promise((resolve, reject) => { |
#!/bin/bash | |
# Forticlient SSL VPN Client / expect | |
# -------------------------------------------- | |
# CONFIGURATION | |
FORTICLIENT_PATH="" |
export const ws = webSocket<WebsocketMessage>(`wss://${location.hostname}:${location.protocol === 'https:' ? 443 : 80}/ws/`); | |
export const wsObserver = ws | |
.pipe( | |
retryWhen(errors => | |
errors.pipe( | |
delay(1000) | |
) | |
) | |
); |
#!/usr/bin/env node | |
'use strict'; | |
const { exec, execSync } = require('child_process'); | |
const args = process.argv[0] === 'node' | |
? process.argv.slice(1) | |
: process.argv.slice(2); |