top
'xterm-ghostty': unknown terminal type.# Workaround, set `TERM` to be a universal type.
TERM=xterm-256color top
# Or override it when ssh to the server.
TERM=xterm-256color ssh user@hosttop
'xterm-ghostty': unknown terminal type.# Workaround, set `TERM` to be a universal type.
TERM=xterm-256color top
# Or override it when ssh to the server.
TERM=xterm-256color ssh user@host| import sys | |
| import os | |
| import urllib.request | |
| def add_copyright_header(file_path): | |
| """ | |
| Adds a copyright header to the specified file. | |
| """ | |
| file_url = "https://github.com/ClickHouse/ClickHouse/blob/30fcaeb2a3fff1bf894aae9c776bed7fd83f783f/{}".format(file_path) | |
| try: |
| #!/usr/bin/env python | |
| from __future__ import print_function | |
| import os | |
| import sys | |
| class UsageInfo(object): | |
| def __init__(self, inode_used, bytes_used): | |
| self.inode = inode_used |
| #!/bin/bash | |
| # set -x | |
| DOC="A tiflash alive detect helper script.\ | |
| If tiflash is hanging, it receives the packets but doesn't respond. \ | |
| Dropping the packets will slow down the queries caused by the tidb \ | |
| alive detecting mechanism. \ | |
| This script checks the status port to detect whether TiFlash is hanging. \ | |
| Add a rule to iptables to REJECT the TCP packets once tiflash is hanging, \ |
| #!/usr/bin/env python3 | |
| import sys | |
| import json | |
| import logging | |
| def main(): | |
| logging.basicConfig(format='%(asctime)s [%(levelname)s] %(message)s', datefmt='%Y/%m/%d %H:%M:%S', level=logging.INFO) | |
| if len(sys.argv) < 2: | |
| logging.error("Usage: {} path/to/grafana.json".format(sys.argv[0])) |
| #!/usr/bin/env python3 | |
| from concurrent.futures import thread | |
| from random import sample | |
| import re | |
| import hashlib | |
| from pprint import pprint | |
| import sys | |
| import unittest | |
| class Frame: |
| #!/usr/bin/env python3 | |
| from __future__ import print_function | |
| __doc__ = """ | |
| Put it to the machine deploy TiUP and add it to the crontab. | |
| e.g. | |
| > crontab -e | |
| # clean up the patch caches for TiUP every day |
| # vi: ft=dosini | |
| [main] | |
| # Enables context sensitive auto-completion. If this is disabled the all | |
| # possible completions will be listed. | |
| smart_completion = True | |
| # Multi-line mode allows breaking up the sql statements into multiple lines. If | |
| # this is set to True, then the end of the statements must have a semi-colon. | |
| # If this is set to False then sql statements can't be split into multiple |
| tap "adoptopenjdk/openjdk" | |
| tap "grpc/grpc" | |
| tap "homebrew/bundle" | |
| tap "homebrew/cask", "https://mirrors.ustc.edu.cn/homebrew-cask.git" | |
| tap "homebrew/core", "https://mirrors.ustc.edu.cn/homebrew-core.git" | |
| tap "homebrew/services" | |
| brew "autoconf" | |
| brew "automake" | |
| brew "bloaty" | |
| brew "boost" |