Skip to content

Instantly share code, notes, and snippets.

View Timothy-Liuxf's full-sized avatar
🎯
Focusing

Timothy Liu Timothy-Liuxf

🎯
Focusing
View GitHub Profile
@rxaviers
rxaviers / gist:7360908
Last active July 30, 2024 03:42
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@x5lcfd
x5lcfd / ConvertToChinese.cs
Last active May 3, 2022 20:30
NumberToCn
public static String ConvertToChinese( Decimal number )
{
var s = number.ToString( "#L#E#D#C#K#E#D#C#J#E#D#C#I#E#D#C#H#E#D#C#G#E#D#C#F#E#D#C#.0B0A" );
var d = Regex.Replace( s, @"((?<=-|^)[^1-9]*)|((?'z'0)[0A-E]*((?=[1-9])|(?'-z'(?=[F-L\.]|$))))|((?'b'[F-L])(?'z'0)[0A-L]*((?=[1-9])|(?'-z'(?=[\.]|$))))", "${b}${z}" );
var r = Regex.Replace( d, ".", m => "负元空零壹贰叁肆伍陆柒捌玖空空空空空空空分角拾佰仟万亿兆京垓秭穰"[m.Value[0] - '-'].ToString() );
return r;
}
@duskmoon314
duskmoon314 / proxy.sh
Last active March 17, 2023 16:01
a shell script to set proxy in wsl2 and Linux / MacOS
#!/bin/sh
if [ $(uname -r | sed -n 's/.*\( *Microsoft *\).*/\1/ip') ]; then
hostip=${host:=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')}
else
hostip=${host:-127.0.0.1}
fi
port_http=${port_http:-10809}
port_sock=${port_sock:-10808}