This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.
This is a solution on how to theme/customize Ant Design (which is written in Less) with Sass and webpack. Ant itself offers two solutions and a related article on theming, but these are only applicable if you use Less, the antd-init boilerplate or dva-cli.
- use a single sass-file to customize (no duplicate variables for your project and Ant)
- hot reload compatibility
- no dependencies on outdated npm modules
- easy integration with your existing webpack setup (webpack 3+ tested)
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: nginx-conf | |
data: | |
nginx.conf: | | |
user nginx; | |
worker_processes 3; | |
error_log /var/log/nginx/error.log; | |
events { |
// A recursive function returning Promise<number> | |
function recurseToZero(n) { | |
console.log('B. Entering recursive function for [' + n + '].'); | |
// Once we hit zero, bail out of the recursion. The key to recursion is that | |
// it stops at some point, and the callstack can be "rolled" back up. | |
if (n === 0) { | |
// We could just return 0 but we do return Promise.resolve to have a consistent return type | |
return Promise.resolve(0); | |
} | |
// Start a NEW PROMISE CHAIN that will become the continuation of the parent |
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex
command line tool.
To learn more about migrations, check out this article on the different types of database migrations!
'use strict'; | |
// Promisifies readline.question function using node native `util.promisify` | |
// readline.question takes one callback that returns the answer, so it need custom promisifying | |
const readline = require('readline'); | |
const { promisify } = require('util'); | |
readline.Interface.prototype.question[promisify.custom] = function(prompt) { | |
return new Promise(resolve => |
In your command-line run the following commands:
brew doctor
brew update
Last updated: 2021-02-21, tested with socket.io v3.1.1
This is the simplest implementation you will find for a client/server WebSockets architecture using socket.io.
To see a full explanation, read my answer on SO here: https://stackoverflow.com/a/24232050/778272.
If you're looking for examples using frameworks, check these links: