Skip to content

Instantly share code, notes, and snippets.

View jueti's full-sized avatar
🏠
Working from home

Jason Yang jueti

🏠
Working from home
View GitHub Profile
@jueti
jueti / GWF_notion.txt
Created January 25, 2021 13:34
GWF: notion.so
||notion.so^

Keybase proof

I hereby claim:

  • I am jueti on github.
  • I am jueti (https://keybase.io/jueti) on keybase.
  • I have a public key ASCAClhqN8jglXN-1J3UqCAbByckz40KUycC3F9YSm2kFQo

To claim this, I am signing this object:

@jueti
jueti / clean.bat
Last active February 14, 2020 07:31
静态顺序表
@echo off
chcp 65001 >nul 2>&1
pushd %~dp0
del *obj *.exe
popd
@jueti
jueti / autoindex.html
Last active December 4, 2018 03:25
[Nginx 自定义目录索引样式] 将autoindex.html放于根目录,然后修改default.con #nginx
<!-- autoindex for nginx, see https://phuslu.github.io -->
<script>
if (this.location.href.slice(-1) === "/") {
var website_title = ''
var datetime_format = '%d-%b-%Y %H:%M'
var show_readme_md = true
var max_name_length = 50
var dom = {
element: null,
@jueti
jueti / default.conf
Last active December 4, 2018 03:23
[Nginx 禁用单个目录的目录索引] "/"开启目录索引,"/Chapter 3/"关闭目录索引,但可以访问目录下的文件 #nginx
server {
listen 80;
server_name localhost;
gzip on;
gzip_min_length 1k;
gzip_comp_level 6;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
location / {
@jueti
jueti / default.conf
Last active December 4, 2018 02:40
[Nginx & FRP共用80端口] 方案二:主域名和三级泛主域名都位于本地 #nginx #frp
server {
listen 80;
server_name *.frp.jasonyang.xin;
location / {
resolver 114.114.114.114 8.8.8.8;
proxy_pass $scheme://$host:7000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@jueti
jueti / default.conf
Last active December 4, 2018 01:54
[Nginx & FRP 共用80端口] 方案一:主域名的站点位于服务器,三级泛域名位于本地 #nginx #frp
server {
listen 80;
server_name www.jasonyang.xin jasonyang.xin;
return 301 https://www.jasonyang.xin$request_uri;
}
server {
listen 443 ssl http2;
server_name www.jasonyang.xin jasonyang.xin;
@jueti
jueti / default.conf
Created December 4, 2018 01:10
[Docker for Nginx] #docker #nginx
server {
listen 80;
server_name www.jasonyang.xin jasonyang.xin;
return 301 https://www.jasonyang.xin$request_uri;
}
server {
listen 443 ssl http2;
server_name www.jasonyang.xin jasonyang.xin;
@jueti
jueti / example.bat
Last active December 3, 2018 08:32
[bat get parent folder name] #bat #cmd
@echo off
set "cd_=%cd%"
:loop
set "cd_=%cd_:*\=%"
set "cd_tmp=%cd_:\=%"
if not "%cd_tmp%"=="%cd_%" goto loop
echo "cd_"
@jueti
jueti / device.py
Last active September 22, 2018 15:57
[Snippet - tool class]
#!/usr/bin/python 3
# -*- coding: utf-8 -*-
"""
`Device` is a tool class to operate serial ports.
"""
import json
import logging
import time
from typing import List, Dict, Tuple