Skip to content

Instantly share code, notes, and snippets.

View real-jiakai's full-sized avatar
🎯
Focusing

Jaya real-jiakai

🎯
Focusing
View GitHub Profile
# Bird 2 configuration file for 你的ASN号
# Log to syslog
log syslog all;
# Set router ID to the IP address of my VPS
router id 你的vps的ipv4地址;
# Device protocol
protocol device {
@real-jiakai
real-jiakai / github-api-proxy.js
Created March 6, 2024 08:44
反代github api
export default {
async fetch(request, env, ctx) {
try {
// 用您要代理的 GitHub API URL 替换这个 URL
const url = new URL('https://api.github.com' + new URL(request.url).pathname)
// 克隆原始请求,但更改其 URL
const newRequest = new Request(url, {
body: request.body,
headers: request.headers,
@real-jiakai
real-jiakai / supervised-learning.md
Last active November 10, 2023 06:53
监督学习笔记。

1、FP16、BF16是什么?

image

2、使用预训练的ResNet-50模型,基于ImageNet数据集进行分类。

# 导入必要的库
import torch
import torchvision.models as models
@real-jiakai
real-jiakai / ssh-snippets.md
Last active May 10, 2024 08:31
ssh工具代码脚本片段

1、debian、ubuntu更新并升级软件包

apt update && apt upgrade -y

2、docker compose重新部署

docker compose down && docker compose up -d

Keybase proof

I hereby claim:

  • I am real-jiakai on github.
  • I am jiakai (https://keybase.io/jiakai) on keybase.
  • I have a public key ASCW5-2AMt-C6M_SV89GaqKtunio0bYB8B2HMx_yu5xtiQo

To claim this, I am signing this object:

@real-jiakai
real-jiakai / supabase_selfhosed_notes.md
Last active May 16, 2023 02:53
supabase selfhosted notes
  • 假设你有一个二级域名example.com托管至cloudflare。
# Get the code
git clone --depth 1 https://github.com/supabase/supabase

# Go to the docker folder
cd supabase/docker

# Copy the fake env vars
@real-jiakai
real-jiakai / debian_pip.md
Last active April 16, 2023 09:51
debian安装pip和虚拟环境

1、debian安装pip

# 安装Python 3的pip包管理器。
apt install python3-pip
# 安装Python 3的virtualenv工具。
pip3 install virtualenv

# 使用内置venv模块创建Python虚拟环境。
python3 -m venv /root/gpt_env
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<string name="correlation_id">t.ca4fd640-d1c8-11ed-ba8f-ae9f230380a6</string>
<string name="warp_public_key">twd7/7JnEyzhMP0WyijvgHmMbytAB0onh2zNA86qGi0=</string>
<boolean name="is_device_name_submitted" value="true" />
<boolean name="missing_splits" value="false" />
<boolean name="power_manager_warning_shown" value="true" />
<boolean name="switch_locked" value="false" />
<string name="families_block_type">NONE</string>
<string name="gatewayUniqueID">67529fa35c25e16e4500a160ff61dbdb</string>
@real-jiakai
real-jiakai / xui.json
Last active April 3, 2023 04:02
xui默认xray配置模板
{
"api": {
"services": [
"HandlerService",
"LoggerService",
"StatsService"
],
"tag": "api"
},
"inbounds": [
@real-jiakai
real-jiakai / settings.json
Created February 19, 2023 05:00
my global vscode settings config.
{
// 工作区图标主题
"workbench.iconTheme": "material-icon-theme",
// 工作区侧边栏位置
"workbench.sideBar.location": "right",
// 控制对于未经信任的文件的处理方式【VS Code 将尝试打开这些文件,但在打开前会进行一些安全检查。如果发现问题,VS Code 将阻止打开文件,并在编辑器的底部显示一个安全警告。您需要手动选择是否打开文件】
"security.workspace.trust.untrustedFiles": "open",
// 工作区主题
"workbench.colorTheme": "Default Light+",
// 保存文件自动对代码格式化