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
| clean: | |
| docker rm -f xxxx 2>/dev/null; true |
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:alpine AS build | |
| WORKDIR /usr/src/app | |
| COPY package*.json ./ | |
| RUN npm install | |
| COPY . . | |
| RUN npm run build | |
| FROM nginx:alpine AS runtime | |
| COPY default.conf /etc/nginx/conf.d/default.conf | |
| COPY --from=build /usr/src/app/dist /site |
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 python:3.8 AS build | |
| RUN pip install mkdocs mkdocs-material | |
| WORKDIR /root | |
| COPY . . | |
| RUN mkdocs build | |
| FROM nginx:alpine | |
| COPY default.conf /etc/nginx/conf.d/default.conf | |
| COPY --from=build /root/site /site |
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
| Other 28 hrs 4 mins โโโโโโโโโโโโโโโโโโโโโ 56.4% | |
| TypeScript 18 hrs 59 mins โโโโโโโโโโโโโโโโโโโโโ 38.2% | |
| JSON 2 hrs 10 mins โโโโโโโโโโโโโโโโโโโโโ 4.3% | |
| Python 26 mins โโโโโโโโโโโโโโโโโโโโโ 0.9% | |
| JavaScript 3 mins โโโโโโโโโโโโโโโโโโโโโ 0.1% |
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
| git push origin :branch-name |
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
| # ๅ ้คๆๆimage | |
| docker rmi $(docker images -a -q) -f | |
| # A dangling image is one that is not tagged and is not referenced by any container | |
| # To remove dangling images: | |
| docker image prune | |
| # To remove all images which are not used by existing containers: | |
| docker image prune -a |
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
| ./a >/dev/null 2>&1 |
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
| git add a.txt | |
| git reset HEAD -- a.txt # ๅๆถๆๅญ | |
| git checkout -- a.txt # ๅๆถๅฏน a.txt ็ไฟฎๆน | |
| git checkout . && git clean -df # ๆพๅผๆๆไฟฎๆนใๆฐๅขใๅ ้คๆไปถ, -d่กจ็คบๅๆถ็งป้ค็ฎๅฝ,-f่กจ็คบforceใzsh ไธญ gco . && gclean -df | |
| git rm file_path # ๅทฅไฝๅบๅๆถๅๆด๏ผๆฌๅฐๆไปถๅๆถๅๆด | |
| git rm --cached file_path # ๅทฅไฝๅบๅๆถๅๆด | |
| # head index work dir wd safe | |
| # Commit Level | |
| # reset --soft [commit] REF NO NO YES |
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
| docker logs nginx 2>&1 | grep "127." | |
| # ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
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
| # Now we are in branch master | |
| # Pull PR #50 from remote origin to a new branch dev | |
| git fetch origin pull/50/head:dev | |
| git merge dev | |
| # If PR #50 is merging from branch test, push the change to it to update the pull request | |
| git push origin dev:test |