$ brew install nginx
Setelah install jalankan nginx.
$ sudo nginx
Test apakah nginx sudah running, buka url http://localhost:8080.
$ brew install nginx
Setelah install jalankan nginx.
$ sudo nginx
Test apakah nginx sudah running, buka url http://localhost:8080.
Docker Basic Command | Description |
---|---|
docker run hello-world |
Download the very small hello-world image and print a “Hello from Docker“ message |
docker images |
Get List of Docker Images |
docker search busybox |
Search the online Docker registry for a Image named busybox |
docker run -t -i busybox |
Create an instance (container) of 'busybox' image interactively |
docker run -t -i busybox:latest |
Create an instance with 'latest' tag value |
docker run -t -i busybox:1.0 |
Create an instance with '1.0' tag value |
docker ps --all |
List all containers |
docker start ab0e37214358 |
Relaunch a Container |
Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found
ALTER USER 'root' IDENTIFIED WITH mysql_native_password BY 'root';
(node:15701) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
const checkFirstName = async (firstName) => {
import React, { useState } from 'react' | |
const languages = { en: 'en', fr: 'fr' } | |
const initialTheme = { colour: 'blue', lang: languages.en } | |
const { Provider, Consumer } = React.createContext(initialTheme) | |
const App = (): JSX.Element => { | |
const [theme, setTheme] = useState(initialTheme) | |
const setLanguage = (lang: string): void => { | |
setTheme({ ...theme, lang: lang }) |
// ($lt, $lte, $gt, $gte, $in, $nin, $ne, $exists, $regex) | |
// $or, $and, $not, $where | |
function extractValue(object: any) { | |
const filterArray = []; | |
for (const key in object) { | |
filterArray.push(`${key};${object[key]}`); | |
} | |
const filterSort = filterArray.sort(); | |
return filterSort.toString(); | |
} |
import jwt from "jsonwebtoken"; | |
export function tokenService() { | |
const SECRET = "secret"; | |
return new Promise<string>((resolve, reject) => { | |
jwt.sign( | |
{ foo: "bar" }, | |
SECRET, | |
(err: Error, token: string) => { | |
if (err) reject(err); |
First of all, you need to understand you are not writing documentation for you, nor for your current team. You are writing documentation for the future developers that were not there when you first wrote this code. Worst of it, they might think it is bad code for many reasons and won’t understand why you wrote this way.
Taken from: How to write good software technical documentation
#!/bin/bash | |
sysctl net.core.rmem_default=268435456 | |
sysctl net.core.wmem_default=268435456 | |
sysctl net.core.rmem_max=268435456 | |
sysctl net.core.wmem_max=268435456 | |
sysctl net.core.netdev_max_backlog=100000 | |
sysctl "net.ipv4.tcp_rmem=4096 16384 134217728" | |
sysctl "net.ipv4.tcp_wmem=4096 16384 134217728" | |
sysctl "net.ipv4.tcp_mem=786432 1048576 268435456" |