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
# 需要使用 fontforge 的 ffpython 执行 | |
import fontforge | |
# 可以在 fontawesome.com 找到 glyph ,字体里面 glyphname 加了 uni 前缀 | |
glyphs = [ | |
"unif09a", #facebook | |
"unif099", #twitter | |
"unif16d", #instagram | |
"unie07b", #tiktok | |
"unif09b", #github | |
"unif167", #youtube |
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
SELECT table_name, | |
column_name, | |
ordinal_position, | |
data_type, | |
column_type, | |
COLUMN_DEFAULT, | |
COLUMN_COMMENT | |
FROM (SELECT table_name, | |
column_name, | |
ordinal_position, |
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
create schema shard_1; | |
create sequence shard_1.global_id_sequence; | |
CREATE OR REPLACE FUNCTION shard_1.id_generator(OUT result bigint) AS $$ | |
DECLARE | |
seq_len int := 14; | |
shard_len int := 1; | |
seq_max bigint := pow(2, seq_len); | |
-- 2022-08-08 |
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/sh | |
for x | |
do | |
echo "Converting $x" | |
tr -d '\015' < "$x" > "tmp.$x" | |
mv "tmp.$x" "$x" | |
done |
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
.github.com | |
.githubusercontent.com | |
.githubassets.com | |
||postman.com | |
||polyfill.io | |
||steem.ninja | |
||3speak.online | |
||cnsteem.io | |
.github.io |
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
recaptcha__zh_cn.js:534 Uncaught Error: Invalid site key or not loaded in api.js: xxxxxxx |
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
" vim-bootstrap | |
"***************************************************************************** | |
"" Vim-PLug core | |
"***************************************************************************** | |
let vimplug_exists=expand('~/.vim/autoload/plug.vim') | |
let g:vim_bootstrap_langs = "rust" | |
let g:vim_bootstrap_editor = "vim" " nvim or vim |
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
# https://zh.wikipedia.org/wiki/%E6%B1%89%E8%AF%BA%E5%A1%94 | |
# 分为3步进行 | |
# 1. 将a上面的n-1个移到b上(c作为中转) | |
# 2. 将a上面的那一个移到c上 | |
# 3. 将b上的那n-1个移到c上(a作为中转) | |
# 所以这个函数的四个参数为,n:层数 a:需要移动的一堆盘子 b:中转站 c:目标塔。 | |
# 注意形参和实参 | |
def hanoi(n, a='A', b='B', c='C'): | |
if n == 1: | |
print('move', a, '-->', c) |