国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/md5" | |
"crypto/rand" | |
"errors" | |
"fmt" | |
"io" |
var fileStorage = { | |
/** | |
* Saves a file on the device | |
* @param {string} name - filename (can include sub folders) | |
* @param {string} data - file contents | |
* @param {boolean} useSandbox - uses protected sandbox if true, otherwise external (default false) | |
* @returns {Promise} executes .then with saved file path as first param | |
*/ | |
write: function (name, data, useSandbox) { |
set -eu | |
set -x | |
# create a `cmake` directory and extract cmake into there | |
# build cmake in there, and install to prefix | |
PREFIX=$HOME/software/cmake-3.17.0-rc3 | |
wget -SL https://github.com/Kitware/CMake/releases/download/v3.17.0-rc3/cmake-3.17.0-rc3.tar.gz | |
mkdir -p cmake-3.17.0-rc3.src |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.
Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.
All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.
Install Xquartz
to get X11 support on MacOS. You can google Xquartz
and download it from its official site, or install using HomeBrew.
brew cask install xquartz
Launch Xquartz
. Go to Preference
-> Security
, click the box Allow connections from clients
. NOTE: You have to lauch Xquartz
with Allow connections from clients
enable everytime you want to ssh
to remote server with X11 forwarding support.
环境:shadowsocks、windows | |
本地ss端口设置(这里1080) | |
cmd命令行:(不用socks5)(临时设置)(也可放置环境变量) | |
set http_proxy=http://127.0.0.1:1080 | |
set https_proxy=http://127.0.0.1:1080 | |
ps:一定要用cmd命令行,千万别用powershell !!! | |
简易测试命令:curl https://www.google.com(别用ping) |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
function excelDateToJSDate(serial) { | |
var utc_days = Math.floor(serial - 25569); | |
var utc_value = utc_days * 86400; | |
var date_info = new Date(utc_value * 1000); | |
var fractional_day = serial - Math.floor(serial) + 0.0000001; | |
var total_seconds = Math.floor(86400 * fractional_day); | |
var seconds = total_seconds % 60; |