国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| #!/usr/bin/env bash | |
| # used to install offical chrome and selenium on Ubuntu 16.04.1 LTS, 18.04, 20.04.1 LTS desktop, Jan 2021 | |
| # also tested and works on Elem OS 5.1 :) | |
| # | |
| # make sure script is run as root or sudo | |
| if [[ $(whoami) != "root" ]] ; then | |
| echo ; echo "This script, $0, SHOULD be run as ROOT. " ; echo | |
| exit 1 | |
| fi | |
| # |
每个平台的信号定义或许有些不同。下面列出了POSIX中定义的信号。 Linux 使用34-64信号用作实时系统中。 命令man 7 signal提供了官方的信号介绍。
在POSIX.1-1990标准中定义的信号列表
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: nginx-conf | |
| data: | |
| nginx.conf: | | |
| user nginx; | |
| worker_processes 3; | |
| error_log /var/log/nginx/error.log; | |
| events { |
| ## | |
| ## How to install mcrypt in php7.2 / php7.3 | |
| ## Linux / MacOS / OSX | |
| ## | |
| ## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/ | |
| # |
| #!/bin/bash | |
| # from https://chromium.woolyss.com/ | |
| # and https://gist.github.com/addyosmani/5336747 | |
| # and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md | |
| sudo apt-get update | |
| sudo apt-get install software-properties-common | |
| sudo add-apt-repository ppa:canonical-chromium-builds/stage | |
| sudo apt-get update | |
| sudo apt-get install chromium-browser | |
| chromium-browser --headless --no-sandbox http://example.org/ |
| // get the original destination for the socket when redirect by linux iptables | |
| // refer to https://raw.githubusercontent.com/missdeer/avege/master/src/inbound/redir/redir_iptables.go | |
| // | |
| const ( | |
| SO_ORIGINAL_DST = 80 | |
| IP6T_SO_ORIGINAL_DST = 80 | |
| ) | |
| func getOriginalDst(clientConn *net.TCPConn) (rawaddr []byte, host string, newTCPConn *net.TCPConn, err error) { | |
| if clientConn == nil { |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)| // Package main demonstrates a problem with sockets. | |
| // run it with: | |
| // | |
| // go build | |
| // ./test 127.0.0.1:1234 | |
| // | |
| // Nevermind, found the problem (using select wrong) | |
| // | |
| package main |
| 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 |