Skip to content

Instantly share code, notes, and snippets.

View dellnoantechnp's full-sized avatar
🛴
Working from home

Eric_Ren dellnoantechnp

🛴
Working from home
  • BNDK
  • 成都
View GitHub Profile
@frafra
frafra / .gitlab-ci.yml
Created November 6, 2020 15:46
Build containers with GitLab CI without root nor daemons by using buildkit
build-container:
stage: build
image:
name: moby/buildkit:rootless
entrypoint: [ "sh", "-c" ]
variables:
BUILDKITD_FLAGS: --oci-worker-no-process-sandbox
before_script:
- |
mkdir ~/.docker
@mmaday
mmaday / s3-get.sh
Last active September 5, 2024 08:11 — forked from jpillora/s3get.sh
S3 signed GET in plain bash (Requires openssl and curl)
#!/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:
@DSpeckhals
DSpeckhals / install-nginx-1.17.4.sh
Last active April 18, 2020 13:53 — forked from wouterds/install-nginx-1.9.9.sh
Install nginx-1.17.4 with OpenSSL on Debian (including Raspbian)
#!/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
@hxer
hxer / log.py
Last active September 18, 2021 14:37
python logging 将日志同时输出文件和屏幕
# 日志打印屏幕或文件
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)
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
:%s/r//g 删除DOS方式的回车^M
:%s= *$== 删除行尾空白
:%s/^(.*)n1/1$/ 删除重复行
:%s/^.{-}pdf/new.pdf/ 只是删除第一个pdf
:%s/<!--_.{-}-->// 又是删除多行注释(咦?为什么要说「又」呢?)
:g/s*^$/d 删除所有空行 :这个好用有没有人用过还有其他的方法吗?