Without either MONGO_INITDB_ROOT_USERNAME
, or MONGO_INITDB_ROOT_PASSWORD
the access is unrestricted.
docker-compose.yml
:
version: '3'
services:
mongo:
image: mongo:4
import useSWR from '@zeit/swr'; | |
import localForage from 'localforage'; | |
import { ConfigInterface } from '@zeit/swr/dist/src/types'; | |
import { useState, useEffect } from 'react'; | |
export function usePersistentSWR(key: string, fn?: Function, config?: ConfigInterface) { | |
let handleSuccess; | |
if (config !== undefined && config.onSuccess !== undefined) { | |
const { onSuccess } = config; | |
handleSuccess = (data: any, key: string, config: ConfigInterface) => { |
Without either MONGO_INITDB_ROOT_USERNAME
, or MONGO_INITDB_ROOT_PASSWORD
the access is unrestricted.
docker-compose.yml
:
version: '3'
services:
mongo:
image: mongo:4
A compile-time 4-Bit Virtual Machine implemented in TypeScript's type system. Capable of running a sample 'FizzBuzz' program.
Syntax emits zero JavaScript.
type RESULT = VM<
[
["push", N_1], // 1
["push", False], // 2
["peek", _], // 3
I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.
But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.
Svelte is a language.
Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?
A few projects that have answered this question:
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |
// | |
// Implementation using express-jwt middle | |
// | |
var express = require('express'), | |
ejwt = require('express-jwt'), | |
jwt = require('jsonwebtoken'), | |
passport = require('passport'), | |
bodyParser = require('body-parser'), | |
LocalStrategy = require('passport-local').Strategy, | |
BearerStrategy = require('passport-http-bearer').Strategy; |
It's a common pattern in React to wrap a component in an abstraction. The outer component exposes a simple property to do something that might have more complex implementation details.
We used to have a helper function called transferPropsTo
. We no longer support this method. Instead you're expected to use a generic object helper to merge props.
render() {
return Component(Object.assign({}, this.props, { more: 'values' }));
The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)
It does not balance, it leaves it to the kernel.
In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)
#!/usr/bin/env zsh | |
git show-branch -a \ | |
| grep '\*' \ | |
| grep -v `git rev-parse --abbrev-ref HEAD` \ | |
| head -n1 \ | |
| sed 's/.*\[\(.*\)\].*/\1/' \ | |
| sed 's/[\^~].*//' | |
# How it works: |
git shortlog -e -s -n |