This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:18.04 | |
| EXPOSE 8000 | |
| RUN apt-get update && apt-get install -y python3 python3-pip | |
| RUN python3 -m pip install tornado | |
| WORKDIR /srv | |
| COPY main.py /srv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wrk.method = "POST" | |
| local f = io.open("data.json", "r") | |
| wrk.body = f:read("*all") | |
| wrk.headers["Content-Type"] = "application/json" | |
| wrk.headers["Host"] = "foo.bar.net" | |
| local counter = 1 | |
| local threads = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Split out the key | |
| openssl pkcs12 -in <my-cert-with-key.pfx> -nocerts -out gcs_encrypted.key -passin "pass:asdf1234" | |
| openssl rsa -in gcs_encrypted.key -out gcs.key -passin "pass:asdf1234" | |
| # Split out the cert | |
| openssl pkcs12 -in <my-cert-with-key.pfx> -clcerts -nokeys -out gcs.cert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| adamhartford.vscode-base64 | |
| eamodio.gitlens | |
| HookyQR.beautify | |
| ms-python.python | |
| ms-vscode.cpptools | |
| WakaTime.vscode-wakatime | |
| yzhang.markdown-all-in-one | |
| BazelBuild.vscode-bazel | |
| esbenp.prettier-vscode | |
| ev3dev.ev3dev-browser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # apt update | |
| sudo apt update | |
| sudo apt list --upgradable | |
| # Review and upgrade | |
| sudo apt upgrade | |
| # Add apt repository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # apt update | |
| sudo apt-get update | |
| sudo apt-get list --upgradable | |
| # Review and upgrade | |
| sudo apt-get upgrade | |
| # Add apt repository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:18.04 AS PREP | |
| RUN apt-get update && apt-get install -y build-essential git libssl-dev libz-dev liblua5.1-0-dev wget | |
| WORKDIR /code | |
| RUN git clone https://github.com/giltene/wrk2 | |
| WORKDIR /code/wrk2 | |
| RUN make CFLAGS="-O3 -DNDEBUG -I/usr/include/lua5.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # It is goint to create a new pod with all sidecars injected. | |
| kubectl run [-n <namespace>] -i --rm --restart=Never busybox --image=odise/busybox-curl -- sh -c "curl -i -X POST -d 'body=parameters' 172.17.0.4:80/post" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # If run in Ubuntu server or WSL, need to install the following dependencies before run this scipt | |
| # sudo apt install libxcursor1 libnss3 libxss1 libasound2 libatk1.0-0 libatk-bridge2.0-0 libgtk-3-0 | |
| import asyncio | |
| from pyppeteer import launch | |
| async def main(): | |
| browser = await launch() | |
| page = await browser.newPage() | |
| await page.goto('https://linuxize.com/post/how-to-install-python-3-7-on-ubuntu-18-04/') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pyecharts import options as opts | |
| from pyecharts.charts import Page, WordCloud | |
| from pyecharts.globals import SymbolType | |
| import jieba | |
| with open('./tianlong.txt', 'r') as f: | |
| txt = f.read() | |
| seg_list = jieba.cut(txt, cut_all=True) |