Docker Compose 存放在Git Hub,不太稳定。 你可以也通过执行下面的命令,高速安装Docker Compose。
curl -L https://get.daocloud.io/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
def utc8_now(): | |
import datetime | |
dt = datetime.datetime.now() + + datetime.timedelta(hours=+8) | |
ts = dt.timestamp() | |
return datetime.datetime.utcfromtimestamp( | |
ts).strftime("%Y-%m-%d-%H:%M:%S") + "-UTC+8:00" | |
# 2021-03-02-14:45:57-UTC+8:00 |
const bubbleSort = arr => { | |
if (!Array.isArray(arr)) { | |
return -1 | |
} | |
if (arr.length < 2) { | |
return arr | |
} | |
for (let n = 0; n < arr.length; n++) { | |
let swapped = false |
#!/usr/bin/env python3 | |
import os | |
from pathlib import Path | |
def exec(cmd: str): | |
os.system(cmd) | |
def copy_to_clip(content: str) -> None: | |
t = 'echo "{}" | xclip -selection clipboard' |
#!/usr/bin/env python3 | |
""" | |
assume today is 2019-11-5. | |
now, we want to code. | |
> mkdir ~/Documents/py3/2019-11-05-big-deal | |
> code ~/Documents/py3/2019-11-05-big-deal | |
oh! it's boring, even though you can use !$ | |
so, this is the script, it is equal to all of above steps: |