This file contains hidden or 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
set-option -sg escape-time 10 | |
set-option -g focus-events on | |
set -gq allow-passthrough on | |
set -g visual-activity off | |
set-option history-limit 1000 | |
set -g default-terminal screen-256color | |
set -g prefix C-a | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' |
This file contains hidden or 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
lss() { | |
select=$(lsof -Pn | grep LISTEN | awk '{cmd = "ps -o command= -p"$2; printf "%s ||| %s ||| ",$1,$9; system(cmd)}' | grep -iE '^node|^python' | fzf) | |
if [ -z != $select ];then | |
port=$(echo $select | awk '{print $3}' | cut -d':' -f2) | |
localIP=$(ipconfig getifaddr en0) | |
open http://$localIP:$port | |
fi | |
} |
This file contains hidden or 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
gitSelectBranch() { | |
selected=$(git branch -a | grep -v "*" | fzf | sed -e "s/remotes\/origin\///" | sed 's/^\s*\|\s*$//g') | |
echo "$selected" | |
} | |
gitSelectBranchOprateFactory() { | |
comd=$1 | |
branch=$2 |
This file contains hidden or 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
#!/usr/bin/env bash | |
if ! type fzf >/dev/null 2>&1; then | |
echo "请先安装 fzf" | |
exit 0 | |
fi | |
declare -A source | |
source["npm"]="https://registry.npmjs.org/" | |
source["taobao"]="https://registry.npm.taobao.org/" |
This file contains hidden or 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
import { Application, Router } from "https://deno.land/x/[email protected]/mod.ts"; | |
const sentMsgToQQ = (channelId: string, body: string) => { | |
const QQ_QUNPRO_API_BASE = "https://sandbox.api.sgroup.qq.com" | |
const QQ_QUNPRO_API_SENT_MESSAGE = `/channels/${channelId}/messages` | |
const options = { | |
method: 'POST', | |
headers: { | |
'Authorization': 'Bot ${QQ_BOT_ID}.${QQ_BOT_TOKEN}', |
This file contains hidden or 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
import requests | |
import json | |
github_token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
headers = { 'Authorization': 'token ' + github_token } | |
data_url = 'https://raw.githubusercontent.com/sxzz/github-block-tool/main/analyze.json' | |
get_data = lambda : json.loads(requests.get(data_url).text) | |
get_user_name = lambda data: list(map(lambda x: x['username'], data)) |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdarg.h> | |
/* #define DEBUG */ | |
#ifdef DEBUG | |
#define DEBUG_WRITE(args) DebugWrite args | |
#else | |
#define DEBUG_WRITE(args) | |
#endif |