Start a container in detached mode:
docker run -dit --name deb -e "LANG=C.UTF-8" -w "/root" debian:latest bash
Connect to it and do initial setup:
const { curryN, curry } = require('./curry') // https://gist.github.com/branneman/4ffb7ec3fc4a2091849ba5d56742960c | |
// Typechecks | |
const isUndef = x => typeof x === 'undefined' | |
const isNull = x => x === null | |
const isBool = x => typeof x === 'boolean' | |
const isNum = x => typeof x === 'number' && isFinite(x) | |
const isInt = x => typeof x === 'number' && isFinite(x) && Math.floor(x) === x | |
const isStr = x => typeof x === 'string' | |
const isArr = x => Array.isArray(x) |
'use strict' | |
const curryN = (() => { | |
const isPlaceholder = x => x['@@functional/placeholder'] === true | |
const filterPlaceholders = xs => xs.filter(x => isPlaceholder(x)) | |
const filterValues = xs => xs.filter(x => !isPlaceholder(x)) | |
return (arity, fn, accIn = []) => (...args) => { | |
const accOut = accIn.slice() |
module.exports = factory | |
function factory() { | |
const exports = { | |
isDef, | |
isUndef, | |
isNull, | |
isBool, | |
isNum, | |
isInt, |
/** | |
* Turing Machine Interpreter | |
* | |
* Features: | |
* - Infinite tape, both ways | |
* - Uses JS values, anything that matches ==, is a valid symbol | |
* | |
* Definition: | |
* - States (Q): { integer, halt } | |
* - Input symbols read/write (Σ): any integer or string |
A Hogget is a sheep between one and two years of age. Inspired by Ramda, we also like sheep.
/** | |
* This function polls the component's props for Apollo to set `props.data.loading` to `false` | |
* @example | |
* await waitDuringLoadingState(testRenderer, TodoContainer) | |
* @see {@link https://reactjs.org/docs/test-renderer.html} | |
* @param {TestRenderer} testRenderer | |
* @param {React.Component} testComponent | |
* @returns {Promise} | |
*/ | |
export function waitDuringLoadingState(testRenderer, testComponent) { |
#!/usr/bin/env node | |
const fetch = require('node-fetch') | |
const ip = require('ip') | |
const os = require('os') | |
const env = require('./.env.json') | |
const endpoint = 'https://dns.api.gandi.net/api/v5/' | |
const newip = `${ip.address()}` | |
const domain = env.domain |
const crypto = require('crypto') | |
const { promisify } = require('util') | |
const pbkdf2 = promisify(crypto.pbkdf2) | |
module.exports = { createHashPasswordFn, isPasswordCorrect } | |
/** | |
* @typedef {Object} HashPassword | |
* @property {String} hash | |
* @property {String} salt |
const indexOf = node => list => { | |
const guess = (min, max) => { | |
const index = Math.floor((max - min) / 2) + min | |
if (list[index] === node) { | |
return index | |
} else if (list[index] < node) { | |
min = index + 1 | |
} else { | |
max = index - 1 | |
} |