シーケンス図とかフローチャートをしごとで描画することになった場合、 テキストから生成できたら楽なので、それ系のツールまとめ
- C製
- Doxygen, Moinmoinなどと連携可能
- ブロック図、クラス図、ネットワーク図など
from subprocess import Popen, PIPE | |
cmd = 'cat | head -5' | |
proc = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) | |
outs, errs = proc.communicate(input=""" | |
Popen.communicate(input=None, timeout=None) | |
Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional input argument should be data to be sent to the child process, or None, if no data should be sent to the child. The type of input must be bytes or, if universal_newlines was True, a string. | |
communicate() returns a tuple (stdout_data, stderr_data). |
シーケンス図とかフローチャートをしごとで描画することになった場合、 テキストから生成できたら楽なので、それ系のツールまとめ
package main | |
import "core:fmt" | |
import "core:simd" | |
main :: proc() { | |
i := index_any([]u8{'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', '\r', '&', 'a'}, 16) | |
fmt.println(i) | |
} |
FROM ubuntu:20.04 | |
RUN apt-get update \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get -y install git mercurial build-essential cmake ninja-build golang-go zlib1g-dev libpcre3-dev | |
RUN git clone https://github.com/google/boringssl \ | |
&& cd boringssl \ | |
&& mkdir build \ | |
&& cd build \ | |
&& cmake -GNinja .. \ |
#!/bin/bash | |
# コマンドライン引数を配列に格納 | |
args=("$@") | |
# 配列の要素を表示 | |
for arg in "${args[@]}"; do | |
echo $arg | |
done |
package main | |
import ( | |
"context" | |
"html" | |
"log" | |
"net/http" | |
"golang.org/x/text/language" | |
"golang.org/x/text/message" |
package testx | |
import "testing" | |
func Must0(t *testing.T) func(error) { | |
return func(err error) { | |
t.Helper() | |
if err != nil { | |
t.Fatal(err) | |
} |
local wezterm = require 'wezterm' | |
local mux = wezterm.mux | |
local config = {} | |
if wezterm.config_builder then | |
config = wezterm.config_builder() | |
end | |
-- set startup Window position | |
-- https://github.com/wez/wezterm/issues/2976#issuecomment-1419492777 |
{ | |
"package main": { | |
"prefix": "package main", | |
"body": [ | |
"package main", | |
"", | |
"import \"log\"", | |
"", | |
"func main() {", | |
"\tif err := run(); err != nil {", |
#!/bin/bash | |
if [ $BASH_ARGV0 = -bash ]; then | |
echo sourced | |
else | |
echo executed | |
fi |