Skip to content

Instantly share code, notes, and snippets.

View GrayXu's full-sized avatar

Guanglei Xu GrayXu

View GitHub Profile
@GrayXu
GrayXu / down.sh
Created March 5, 2020 12:03
youtube-dl easy call
# use it like "$./down.sh https://***/ https://***/ ..." to use youtube-dl eaiser
# log would be append to file "./log"
echo -e "\033[32mDownload list↓:\033[0m"
echo $*
nohup youtube-dl -cit $* > log &
@GrayXu
GrayXu / .tmux.conf
Last active October 19, 2021 11:45
personal tmux.conf
# file path: ~/.tmux.conf
# download: wget http://gist.githubusercontent.com/GrayXu/851fa9b7db6733a2fb8ebc9569c26d35/raw/.tmux.conf -O ~/.tmux.conf
# note: for tmux > 2.8
# Enable title for Terminal
set-option -g set-titles on
set-option -g set-titles-string "#S / #W"
# Enable mouse mode (tmux 2.1 and above)
@GrayXu
GrayXu / init.toml
Last active December 19, 2020 08:41
personal SpaceVim init config
# file path: ~/.SpaceVim.d/init.toml
# how to install:
# curl -sLf https://spacevim.org/install.sh | bash
# download config:
# wget https://gist.githubusercontent.com/GrayXu/19d74689d0a5370f6e3ba5e36d91b4f5/raw/init.toml -O ~/.SpaceVim.d/init.toml
#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2020 Wang Shidong & Contributors
@GrayXu
GrayXu / .zshrc
Last active October 14, 2024 02:03
personal .zshrc
# ZSH是好文明 => https://github.com/ohmyzsh/ohmyzsh
# sudo apt install zsh
# sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# 然后如下简单配置你的.zshrc!
export ZSH="$HOME/.oh-my-zsh"
@GrayXu
GrayXu / zsh_init.sh
Last active December 24, 2020 08:18
install&config zsh for personal usage
# default home path is /home/gray
# sh -c "$(curl -fsSL https://gist.githubusercontent.com/GrayXu/8d4433e9b5f9b0202b9966a9280a47a1/raw/zsh_init.sh)"
echo "rush..."
sudo apt install zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
wget https://gist.githubusercontent.com/GrayXu/407ec274b4783f8381a5b4daa2b31025/raw/.zshrc -O ~/.zshrc
echo "done!"
@GrayXu
GrayXu / init.sh
Last active May 18, 2022 10:31
init.sh to init a ubuntu machine for personal usage
# RUN THIS SCRIPT
# sh -c "$(curl -fsSL https://gist.githubusercontent.com/GrayXu/6bfe73de93e7f2431bbf545f3522c200/raw/init.sh)"
echo "config zsh..."
sudo apt install zsh -y
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
wget https://gist.githubusercontent.com/GrayXu/407ec274b4783f8381a5b4daa2b31025/raw/.zshrc -O ~/.zshrc
echo "---zsh is ok---"
@GrayXu
GrayXu / asplos21.py
Created January 12, 2021 18:14
asplos '21 abstracts pdf crawler
# pip install bs4 request
# python3 asplos21.py
import requests
from bs4 import BeautifulSoup
import os
from multiprocessing.dummy import Pool as ThreadPool
import sys
pool = ThreadPool(10)
@GrayXu
GrayXu / md2csv.py
Last active March 26, 2021 10:15
convert markdown table to csv
# warning: catch dirty corner case, but will not handle it
with open("2020Mar.md") as f:
data = f.readlines()
lengths = []
ll = []
for line in data:
items = line.split("|")[1:-1]
lengths.append(len(items))
for j in range(len(items)):
@GrayXu
GrayXu / uBlacklist.txt
Last active January 11, 2022 11:57
用于屏蔽谷歌搜索的垃圾中文站的uBlacklist。用于补充penzai等list没cover的。
*://www.clqcqz.com/*
*://chaosou.cc/*
*://yo.zgserver.com/*
*://www.cxymm.net/*
*://m.lacestion.com/*
*://159.138.37.243/*
*://www.i4k.xyz/*
*://www.cxybb.com/*
*://githubhelp.com/*
*://yiyu.gaoyongboke.com/*
@GrayXu
GrayXu / Awesome Ph.D advice lists.md
Last active January 20, 2024 13:44
Awesome Ph.D advice lists