Skip to content

Instantly share code, notes, and snippets.

View peytonyip's full-sized avatar
🙃

Payton Yip peytonyip

🙃
View GitHub Profile
@peytonyip
peytonyip / javdb-top250.md
Created October 12, 2025 04:59 — forked from jinjier/javdb-top250.md
JavDB top 250 movies list. [Updated on 2025/10]
@peytonyip
peytonyip / PVE-HP-ssacli-smart-storage-admin.md
Created August 7, 2023 06:16 — forked from mrpeardotnet/PVE-HP-ssacli-smart-storage-admin.md
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@peytonyip
peytonyip / how-to-install-openssl-1.1.1-on-centos-7.md
Created May 27, 2022 09:11
How to install openssl 1.1.1 on CentOS 7

How To Install OpenSSL 1.1.1 on CentOS 7

This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.

Requirements

Upgrade the system

yum -y update
@peytonyip
peytonyip / python_es.py
Last active July 15, 2022 02:03
python
body = {
}
@peytonyip
peytonyip / backup_mysql.sh
Last active April 15, 2022 12:02
[一些 shell 脚本] #shell
#!/bin/bash
datetime=$(date +%Y%m%d%H%M%S)
dbs=("chatbot" "chatbot_kg" "chatbot_v2" "chatbot_walle" "nlp_asr_tts_ws" "quality_check" "sound" "walle_deploy")
#dbs=("walle_deploy")
for ((i=0;i<${#dbs[@]};i++))
do
cd /home/work/workplace/backup || exit
@peytonyip
peytonyip / user.sql
Last active November 20, 2020 07:39
[SQL] 记录常用的 sql 命令 #sql
select * from test;
@peytonyip
peytonyip / README.md
Created September 23, 2020 15:18 — forked from NiceGuyIT/README.md
nginx JSON to Filebeat to Logstash to Elasticsearch

Intro

This is an example configuration to have nginx output JSON logs to make it easier for Logstash processing. I was trying to get nginx > Filebeat > Logstash > ES working and it wasn't until I connected Filebeat directly to Elasticsearch that I saw the expected data. Google led me to ingest-convert.sh and I realized filebeat setup works for Filebeat > ES but not Filebeat > Logstash > ES. This is because Logstash does not use ingest pipelines by default. You have to enable them in the elasticsearch output block.

Having nginx log JSON in the format required for Elasticsearch means there's very little processing (i.e. grok) to be done in Logstash. nginx can only output JSON for access logs; the error_log format cannot be changed.

Extra fields are output and not used by the Kibana dashboards. I included them in case they might be useful. Since they are not declared in the filebeat setup, their default is "string" when yo