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
@wey-gu
wey-gu / animated_connectors.md
Last active August 20, 2025 02:40
How to create diagrams like Alex Xu/bytebytego's great work

Tool: draw.io

Animate the connectors

Animating your connectors is great for demonstrating directional flow charts, electrical circuits and more. To animate your connectors:

  1. Click on the connector you wish to animate. Hold Ctrl or Cmd and click to select multiple connectors
  2. On the right-hand side go to Style > Property and click on the arrow to expand the field
  3. Scroll down to Flow Animation and check the box
@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 January 28, 2025 01:02 — 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:
@bilxio
bilxio / login-ssh-trap-WINCH.expect
Created November 29, 2017 07:32
使用 expect 自动登录 ssh,修复 WINCH 信号传递
#!/usr/bin/expect -f
# 捕获 WINCH 信号,并传递给 Spawned 出来的 Children,
# 这样 ssh 的 TTY 就能随着窗口 resize 而适应。
trap {
set rows [stty rows]
set cols [stty columns]
stty rows $rows columns $cols < $spawn_out(slave,name)
} WINCH
@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 删除所有空行 :这个好用有没有人用过还有其他的方法吗?