上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 491 下一页
摘要: Server wait for database get ready # From https://docs.docker.com/compose/startup-order/ #!/bin/sh # wait-for-postgres.sh set -e host="$1" shift # Log 阅读全文
posted @ 2023-02-05 00:37 Zhentiw 阅读(53) 评论(0) 推荐(0)
摘要: To clean up Docker images and containers, you can use the following commands in the terminal: Remove all containers: docker rm $(docker ps -a -q) Remo 阅读全文
posted @ 2023-02-04 23:12 Zhentiw 阅读(33) 评论(0) 推荐(0)
摘要: Existing Dockerfile Dockerfile: FROM python:3 ENV PYBASE /pybase ENV PYTHONUSERBASE $PYBASE ENV PATH $PYBASE/bin:$PATH RUN pip install pipenv WORKDIR 阅读全文
posted @ 2023-02-04 17:42 Zhentiw 阅读(194) 评论(0) 推荐(0)
摘要: type A = {other: 'string', url: 'string'} type B = {other: 'string', ids: 'string'} type Exclusive< T extends Record<PropertyKey, unknown>, U extends 阅读全文
posted @ 2023-02-03 18:40 Zhentiw 阅读(20) 评论(0) 推荐(0)
摘要: import { Equal, Expect } from "../helpers/type-utils"; const obj = { a: 1, b: 2, c: 3, } as const; type ObjKey = keyof typeof obj; // If don't pass in 阅读全文
posted @ 2023-02-02 16:04 Zhentiw 阅读(25) 评论(0) 推荐(0)
摘要: Requirement is if pass in initialData, then return type should not contain undefined, otherwise, it should. import { it } from "vitest"; import { Equa 阅读全文
posted @ 2023-02-02 15:51 Zhentiw 阅读(16) 评论(0) 推荐(0)
摘要: When we pass in "div" to document.querySelector, it returns an HTMLDivElement or null. Similarly, when we pass it "span" we're getting an HTMLSpanElem 阅读全文
posted @ 2023-02-02 15:42 Zhentiw 阅读(24) 评论(0) 推荐(0)
摘要: Here's a function called returnWhatIPassInExceptFor1: function returnWhatIPassInExceptFor1(t: unknown): unknown { if (t 1) { return 2; } return t; } W 阅读全文
posted @ 2023-02-02 01:15 Zhentiw 阅读(35) 评论(0) 推荐(0)
摘要: ### Create a docker file 1. Cd to the project: `cd widget-factory-inc/` 2. create a dockerfile: `vim dockerfile` ```bash FROM httpd:2.4 RUN apt update 阅读全文
posted @ 2023-01-31 19:57 Zhentiw 阅读(114) 评论(0) 推荐(0)
摘要: Union type: function runGenerator(generator: { run: () => string } | (() => string)) { if (typeof generator 'function') { return generator(); } return 阅读全文
posted @ 2023-01-31 19:36 Zhentiw 阅读(29) 评论(0) 推荐(0)
上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 491 下一页