Skip to content

Instantly share code, notes, and snippets.

@vebodev
vebodev / warp-terminal-on-arch-linux.md
Last active October 28, 2024 06:46
How to install Warp Terminal on Arch Linux

Install Warp Terminal on Arch Linux

sudo sh -c "echo -e '\n[warpdotdev]\nServer = https://releases.warp.dev/linux/pacman/\$repo/\$arch' >> /etc/pacman.conf"
sudo pacman-key -r "[email protected]"
sudo pacman-key --lsign-key "[email protected]"

删除某个时间点前的indics

# 列出当前所有indics
curl -k  "https://localhost:9200/_cat/indices"
curl -k -X POST "http://localhost:9200/graylog_148/_delete_by_query?pretty" -H 'Content-Type: application/json' -d'
{
@vebodev
vebodev / mysql-search-in-comments.sql
Created July 10, 2023 11:47
Search in all comments
# match text in all tables' comments
SELECT TABLE_NAME, COLUMN_NAME, COLUMN_COMMENT
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'iCRM2_CustomerDB_Saas_xzdyf'
AND COLUMN_COMMENT LIKE '%复购%';
@vebodev
vebodev / 查询TiKV节点状态.sql
Created July 8, 2023 01:55
查询TiKV节点状态
/* 查询 TiKV 节点状态 */
select * from INFORMATION_SCHEMA.TIKV_STORE_STATUS;
@vebodev
vebodev / list-running-processlist.sql
Created May 18, 2023 05:11
List all running processes from TiDB
# list all running tasks from tidb
select * from information_schema.cluster_processlist where INFO is not null order by Time DESC
#[derive(Debug, StructOpt)]
#[structopt(name = "wechat-user-refresh", about = "批量刷新微信用户 unionid")]
struct Opt {
#[structopt(short="t", long="token", help="微会员企业Token, 不是微信token")]
token: String,
#[structopt(short="c", long="concurrency", default_value="16", help="并发数")]
concurrency: usize,
#[structopt(name="FILE", parse(from_os_str), help="包含 card_num,openid 格式的 csv文件")]
file: PathBuf,
}
@vebodev
vebodev / odbcinst.ini
Last active April 23, 2023 09:42
odbc config
# This is the UnixODBC driver config
[mysql]
Driver = /usr/local/lib/libmyodbc8a.so
UsageCount = 1
@vebodev
vebodev / mysql-odbc.ini
Created April 20, 2023 06:48
An exmaple of MySQL ODBC.ini
[test]
Driver = mysql
Description = Connector/ODBC 8.0 UNICODE Driver DSN
SERVER = tidb-dev
PORT = 4000
USER =
Password =
Database = patrolman
OPTION = 3
SOCKET =