Skip to content

Instantly share code, notes, and snippets.

View skypesky's full-sized avatar
🍉

JianChao Ye skypesky

🍉
View GitHub Profile
@skypesky
skypesky / build-sqlite3.sh
Created December 19, 2025 13:25
How to build sqlite3 from source code(Mac OS)
mkdir -p ~/test && cd ~/test
wget https://www.sqlite.org/2023/sqlite-amalgamation-3430200.zip # 3.43.2 对应压缩包
unzip sqlite-amalgamation-3430200.zip
cd sqlite-amalgamation-3430200
gcc -arch arm64 -DSQLITE_ENABLE_LOAD_EXTENSION=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK -o sqlite3 shell.c sqlite3.c -lpthread -lm
{
"annotations": {
"list": [
{
"$$hashKey": "object:2875",
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
function getswap {
# 定义过滤阈值(100MB = 102400 KB)
MIN_TOTAL_KB=102400 # 100MB
# 列宽定义(同前)
COLUMNS=$(tput cols 2>/dev/null || echo 80)
CONTAINER_WIDTH=20
TYPE_WIDTH=10
CMD_WIDTH=$((COLUMNS - 8 - 12 - 12 - 12 - CONTAINER_WIDTH - TYPE_WIDTH - 4))
[ $CMD_WIDTH -lt 40 ] && CMD_WIDTH=40
@skypesky
skypesky / cloud-resources.grafana.json
Last active May 23, 2025 01:06
Cloud Resources grafana json
{
"annotations": {
"list": [
{
"$$hashKey": "object:2875",
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
@skypesky
skypesky / redis.grafana.json
Last active May 9, 2025 07:02
Redis grafana json
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
@skypesky
skypesky / uptime.grafana.json
Created May 7, 2025 14:03
Uptime grafana json
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
@skypesky
skypesky / dolt.grafana.json
Last active May 8, 2025 01:16
Dolt grafana config json
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
@skypesky
skypesky / nginx.grafana.json
Last active May 7, 2025 07:16
Nginx Grafana Dashboard Json
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
@skypesky
skypesky / pm2.grafana.json
Last active May 6, 2025 14:03
monitor system
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,