This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function createDockerIgnore() { | |
cp .gitignore .dockerignore | |
} | |
function createDeploySh() { | |
read -p "请输入dockerRegistry: " dockerRegistry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION=`git rev-parse --short HEAD` | |
DOCKER_NAME="act-20211123" | |
DOCKER_REPO="ccr.ccs.tencentyun.com/tcb-100005329577-jqcj/act-20211123-8gsdci257004ba48_main" | |
docker build -t ${DOCKER_NAME}-${VERSION} . | |
docker tag ${DOCKER_NAME}-${VERSION} ${DOCKER_REPO}:${VERSION} | |
docker push ${DOCKER_REPO}:${VERSION} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:12 AS build | |
WORKDIR /app | |
COPY . . | |
RUN npm i pnpm -g --registry=https://registry.npmmirror.com | |
RUN pnpm i --prefer-offline -frozen-lockfile --shamefully-hoist --registry=https://registry.npmmirror.com | |
RUN npm run build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Taobao Node Version Manager | |
# Implemented as a POSIX-compliant function | |
# Should work on sh, dash, bash, ksh, zsh | |
# To use source this file from your bash profile | |
{ # this ensures the entire script is downloaded # | |
NVM_SCRIPT_SOURCE="$_" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CANDO 1. MaxUnit | |
const DAY = 24 * 60 * 60 * 1000; | |
const HOUR = 60 * 60 * 1000; | |
const MIN = 60 * 1000; | |
function timeZero(time: number) { | |
return time < 10 ? `0${time}` : String(time); | |
} | |
interface ICountdownResult { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create podman container using the docker mongo image: docker.io/library/mongo:latest | |
`sudo podman run -d --name mongod -p 27017:27017 -v /var/lib/mongodb:/data/db:Z mongo --auth` | |
2. Create service file `/etc/systemd/system/mongod.service` to run container: | |
``` | |
[Unit] | |
Description=MongoDB Podman container | |
After=network.target firewalld.service | |
Wants=network.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// url可传入window.location.origin进行判断 | |
const isLocalIp = (url: string) => { | |
const resultUrl = url.replace(/(http|ftp|https|www):\/\//g, ''); | |
return ( | |
resultUrl.startsWith('192.') || | |
resultUrl.startsWith('172.') || | |
resultUrl.startsWith('10.') || | |
resultUrl.startsWith('localhost') | |
); | |
}; |