This file contains 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
build-container: | |
stage: build | |
image: | |
name: moby/buildkit:rootless | |
entrypoint: [ "sh", "-c" ] | |
variables: | |
BUILDKITD_FLAGS: --oci-worker-no-process-sandbox | |
before_script: | |
- | | |
mkdir ~/.docker |
This file contains 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
#!/usr/bin/env bash | |
# | |
# Usage: | |
# s3-get.sh <bucket> <region> <source-file> <dest-path> | |
# | |
# Description: | |
# Retrieve a secured file from S3 using AWS signature 4. | |
# To run, this shell script depends on command-line curl and openssl | |
# | |
# References: |
This file contains 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
#!/usr/bin/env bash | |
# Run as root or with sudo | |
# Make script exit if a simple command fails and | |
# Make script print commands being executed | |
set -e -x | |
# Set names of latest versions of each package | |
export VERSION_PCRE=pcre-8.43 | |
export VERSION_ZLIB=zlib-1.2.11 |
This file contains 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
# 日志打印屏幕或文件 | |
def setup_logger_2(logger_name, level=logging.INFO, handler='all', log_file=''): | |
""" | |
:param logger_name: | |
:param log_file: | |
:param level: | |
:param handler: file or stream or all | |
:return: | |
""" | |
log_setup = logging.getLogger(logger_name) |
This file contains 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 config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
This file contains 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
:%s/r//g 删除DOS方式的回车^M | |
:%s= *$== 删除行尾空白 | |
:%s/^(.*)n1/1$/ 删除重复行 | |
:%s/^.{-}pdf/new.pdf/ 只是删除第一个pdf | |
:%s/<!--_.{-}-->// 又是删除多行注释(咦?为什么要说「又」呢?) | |
:g/s*^$/d 删除所有空行 :这个好用有没有人用过还有其他的方法吗? |