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
#!/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: |
#!/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' |
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 |
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 |
// ==UserScript== | |
// @name b站自动宽屏 | |
// @author Huu Lane | |
// @description auto enable theater mode in bilibili. | |
// @version 3.0.0 | |
// @include *://www.bilibili.com/video/* | |
// @namespace nobody_space | |
// ==/UserScript== | |
;(async function () { |
// ==UserScript== | |
// @name HideFilesSection | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description I just need to see readme!!! | |
// @author lane | |
// @match https://github.com/* | |
// @exclude https://github.com/*/*/tree/* | |
// @grant none | |
// ==/UserScript== |
// ==UserScript== | |
// @name HideWikiRefer | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Huu | |
// @match https://*.wikipedia.org/wiki/* | |
// @match https://*.wikipedia.org/zh*/* | |
// @grant none | |
// @run-at document-end |
// ==UserScript== | |
// @name c | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.zhihu.com/question/* | |
// @match https://www.douban.com/note/* | |
// @grant none | |
// @run-at document-end |
def create_any_MB_file(filepath, n): | |
with open(filepath, 'wb+') as f: | |
for _ in range(2**20 * n): | |
f.write(bytes(1)) |