Skip to content
Go back

系统设计 memo

Updated:
Edit page

如何优化报表

问题来源: 求各位大佬给些报表优化的思路?

可能的解决方案


如何动态配置 Nginx 代理 host

问题来源: https://github.com/leandromoreira/cdn-up-and-running/issues/2#issue-1327709419

可能的解决方案4


如何自由的控制 env

看到 https://github.com/Infisical/infisical , 比较好奇它的运行机制. 然后发散性的想了一下, 如何接入 https://github.com/hashicorp/vault 做出同样效果: 将 vault 的秘钥注入到一个类似 python virtual env 中, 然后直接在这个环境中运行application, 通过环境变量获取秘钥(和 nix shell 一样)

下面这段代码是 infisical 的执行环境

func executeMultipleCommandWithEnvs(fullCommand string, secretsCount int, env []string) error {
	shell := [2]string{"sh", "-c"}
	if runtime.GOOS == "windows" {
		shell = [2]string{"cmd", "/C"}
	} else {
		currentShell := os.Getenv("SHELL")
		if currentShell != "" {
			shell[0] = currentShell
		}
	}

	cmd := exec.Command(shell[0], shell[1], fullCommand)
	cmd.Stdin = os.Stdin
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	cmd.Env = env

	color.Green("Injecting %v Infisical secrets into your application process", secretsCount)
	log.Debugf("executing command: %s %s %s \n", shell[0], shell[1], fullCommand)

	return execCmd(cmd)
}

其实和 var=value cmd 差不多


如何在 iframe 中无感登录

来源: https://www.v2ex.com/t/920543

解决方式:

Footnotes

  1. https://debezium.io/

  2. https://nightlies.apache.org/flink/flink-docs-master/zh/docs/try-flink/table_api/

  3. https://www.youtube.com/watch?v=ChISx0-cMpU

  4. https://groups.google.com/g/openresty/c/claxKss8zc0

  5. https://juejin.cn/post/6962576607928123428

  6. https://www.digitalocean.com/community/tutorials/how-to-use-confd-and-etcd-to-dynamically-reconfigure-services-in-coreos#creating-the-nginx-container

  7. https://stackoverflow.com/questions/28672152/pass-an-event-to-an-iframe-from-the-parent-window-javascript


Edit page
Share this post on:

Previous Post
Lombok JSR 269
Next Post
实现 TDD 的一些方法