This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#ifdef __APPLE__ | |
#include <OpenCL/opencl.h> | |
#else | |
#include <CL/cl.h> | |
#endif | |
int main() { |
This file contains 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
# 新建一个无密码,无法登陆,没home的系统用户,就叫shadowsocks | |
adduser --system --disabled-password --disabled-login --no-create-home shadowsocks | |
# 修改 /etc/default/shadowsocks-libev | |
USER=shadowsocks | |
GROUP=nogroup | |
# 使用setcap,允许非root用户无法监听低位端口 | |
apt-get install libcap2-bin | |
setcap 'cap_net_bind_service=+ep' /usr/bin/ss-server |
This file contains 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 --posix | |
docker logs snowflake-proxy 2>&1 | grep --color=auto 'Traffic Relayed' | awk ' | |
{ | |
# Extract the download and upload values | |
down[1] = $14 | |
down[2] = $15 | |
gsub(/[^a-zA-Z]/, "", down[2]) | |
up[1] = $17 | |
up[2] = $18 |
This file contains 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
# ╔═╡ 9e5d37c8-c45c-4eb0-bc38-fd42bb408508 | |
html""" | |
<script> | |
const calculate_slide_positions = (/** @type {Event} */ e) => { | |
const notebook_node = /** @type {HTMLElement?} */ (e.target)?.closest("pluto-editor")?.querySelector("pluto-notebook") | |
console.log(e.target) | |
if (!notebook_node) return [] | |
const height = window.innerHeight | |
const headers = Array.from(notebook_node.querySelectorAll("pluto-output h1, pluto-output h2")) |