Skip to content

Instantly share code, notes, and snippets.

View Foair's full-sized avatar
🦩
Proceeding...

Foair

🦩
Proceeding...
View GitHub Profile
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
def main():
symbol = os.environ.get('ARG_SYMBOL')
if not symbol:
symbol = 'Δ'
@Foair
Foair / helper.py
Created April 5, 2020 11:16
在文本中书写长字符串
s = """
s | asd +
adf sdaf+
dfasdfasdf_
"""
s = """
select *_
from app+
le+
@Foair
Foair / colors.js
Created April 5, 2020 12:41
https://flatuicolors.com/ 提取颜色代码
var rgbToHex = function(rgb) {
var hex = Number(rgb).toString(16);
if (hex.length < 2) {
hex = "0" + hex;
}
return hex;
};
var fullColorHex = function(r, g, b) {
var red = rgbToHex(r);

PowerShell:

git init; ni -ItemType SymbolicLink -Target "prepare-commit-msg" .git\hooks\prepare-commit-msg

Bash:

curl -Lo .git/hooks/prepare-commit-msg https://gist.github.com/
@Foair
Foair / .wslconfig
Last active June 20, 2022 03:28
WSL
[wsl2]
memory=16GB
swap=0