Skip to content

Instantly share code, notes, and snippets.

View Deali-Axy's full-sized avatar
⌨️
Recently writing code in Go language

DealiAxy Deali-Axy

⌨️
Recently writing code in Go language
View GitHub Profile
@Deali-Axy
Deali-Axy / git-proxy-config-on-windows.md
Created January 17, 2024 15:54
Windows 下的 git 代理配置

Windows 下的 git 代理配置

经过不断的尝试,我找到找到了属于我的正确配置方法

Host github.com
  User git
  Port 443
  Hostname ssh.github.com
 IdentityFile "C:\Users\用户名\.ssh\id_rsa"
@Deali-Axy
Deali-Axy / clean_pycache.py
Created April 15, 2023 13:41
自动清理当前目录下的 `__pycache__` 目录和文件
import os
import shutil
current_path = os.path.abspath('.')
exclude_path = [
os.path.join(current_path, '.idea'),
os.path.join(current_path, '.git'),
os.path.join(current_path, 'venv'),
]
@Deali-Axy
Deali-Axy / ExtractToc.cs
Last active October 26, 2022 16:08
C#实现生成Markdown文档目录树
class Heading {
public int Id { get; set; }
public int Pid { get; set; } = -1;
public string? Text { get; set; }
public string? Slug { get; set; }
public int Level { get; set; }
}
public class TocNode {
public string? Text { get; set; }
@Deali-Axy
Deali-Axy / watermark.py
Last active October 24, 2023 05:18
Python给图片加水印
import enum
import os
import math
import textwrap
from PIL import Image, ImageFont, ImageDraw, ImageEnhance, ImageChops, ImageOps
class WatermarkerStyles(enum.Enum):
"""水印样式"""
# 斜向重复
@Deali-Axy
Deali-Axy / 状态栏沉浸.dart
Last active September 17, 2022 14:09
Flutter 设置状态栏沉浸
void main() {
Global.init().then((value) {
runApp(MyApp());
});
if (Platform.isAndroid) {
// 以下两行 设置android状态栏为透明的沉浸。写在组件渲染之后,是为了在渲染后进行set赋值,覆盖状态栏,写在渲染之前MaterialApp组件会覆盖掉这个值。
var systemUiOverlayStyle = SystemUiOverlayStyle(statusBarColor: Colors.transparent);
SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
}