Logo Ricky
  • Home
  • About
  • More
    Skills Experiences Education Projects
  • Posts
  • Notes
  • Activities
  • Transform
  • English
    English Chinese
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • Tags
  • 3D Printing
  • A10
  • ACME
  • AD
  • Ada
  • AES
  • Agent
  • Agent-Code
  • AI
  • Aliyun
  • Android
  • Ansible
  • APP
  • Application Delivery Controller
  • Arceus
  • Argo CD
  • ASCII
  • Authentication
  • Authorization
  • AWS
  • BASH
  • Bastion
  • Bayonet
  • Benchmark
  • BGP
  • BIRD
  • BitCoin
  • Board Game
  • Bookmark
  • Browser
  • Bug
  • Byte
  • Cache
  • CDN
  • Channel
  • Chart
  • Checklist
  • Chinese
  • Chrome
  • Chrome OS
  • Chrony
  • CI
  • Cilium
  • Cisco
  • Claude
  • Claude Code
  • CLI
  • Cloud-Native
  • Cloudflare
  • Cluster
  • Command Line
  • Completion
  • Computer Science
  • Config
  • Container
  • Context
  • CPU
  • CURL
  • Data
  • Database
  • Debug
  • Dehydrated
  • Design
  • DevSecOps
  • Diagrams
  • DirtyFrag
  • Dmg
  • DNS
  • DNS-01
  • Docker
  • EC2
  • EFF
  • ElasticSearch
  • ELK
  • Emoji
  • EMQX
  • Encode
  • Encrypt
  • ESXi
  • Extension
  • Firewall
  • Fortigate
  • Fortinet
  • FortiOS
  • Game
  • GeoIP
  • GIN
  • Git
  • GitBook
  • Github
  • Gitlab
  • GitOps
  • Gluetun
  • Go
  • Go-Mysql-Elasticsearch
  • Golang
  • Google
  • GPG
  • GraphQL
  • HA
  • HAProxy
  • Hash
  • HomeLab
  • Htop
  • HTTP
  • IDE
  • Infra
  • Infrastructure
  • Input Method
  • Interview
  • Introduction
  • IOS
  • IPhone
  • Iptables
  • Iso
  • Issue
  • ITerm2
  • Jenkins
  • Jsoniter
  • Juniper
  • JWT
  • Kafka
  • Kibana
  • Kindergarten
  • Kubernetes
  • LDAP
  • Learning
  • Leetcode
  • Lightweight
  • Linkerd
  • Links
  • Linux
  • Litellm
  • Llamafile
  • LLM
  • Log
  • Lua
  • Lullaby
  • LVM
  • Machinelearning
  • MacOS
  • Markdown
  • Math
  • Mattermost
  • Meilisearch
  • Mermaid
  • MinIO
  • MLX
  • Module
  • MQTT
  • MSS
  • MTU
  • Music
  • MyDumper
  • MySQL
  • NAS
  • Netcat
  • Network
  • Nftables
  • Nginx
  • OAuth
  • OIDC
  • Ollama
  • OpenResty
  • Parquet
  • Percona
  • Pinyin
  • Pip
  • Plugin
  • Pokemon
  • Postgres
  • PostgreSQL
  • PowerDNS
  • PowerShell
  • Pprof
  • Principle
  • Privacy
  • Prometheus
  • Protobuf
  • Proxy
  • Push
  • Python
  • QRCode
  • R
  • RAID
  • RDAP
  • RDP
  • Redis
  • Regex
  • Registry
  • Ringtone
  • Route
  • Rust
  • RustDesk
  • S3
  • ScreenShot
  • Security
  • Selenium
  • Sentry
  • Service Mesh
  • SFTP
  • SHELL
  • Skill
  • Slides
  • Snow
  • Software
  • SonarQube
  • SQL
  • SSH
  • SSL
  • String
  • Switch
  • Sync
  • Synology
  • System
  • Tailscale
  • Taiwan
  • Tcpdump
  • Telegram
  • Terminal
  • Terraform
  • Test
  • Testing
  • Time
  • Timeout
  • TLS
  • Tools
  • Tor
  • Trace
  • Traefik
  • Travel
  • TTS
  • Tunnel
  • Typora
  • Ubuntu
  • UNIX
  • URL
  • UserAgent
  • V2Ray
  • Vagrant
  • Video
  • Vim
  • Virtual Machine
  • Virtualization
  • Visualization
  • VNC
  • VPN
  • VSCode
  • WAF
  • WASM
  • Web
  • WebAssembly
  • Webp
  • Windows
  • WSL
  • XDG Base Directory
  • YAML
  • Youtube
  • Zabbix
  • Zero Trust
  • Zim
  • ZSH
  • 台語
Hero Image
I can feel the speed — optimize zsh and oh my zsh cold start

I can feel the speed — optimize zsh and oh my zsh cold start Profiling # .zshrc zmodload zsh/zprof $ /bin/zsh $ zprof num calls time self name ----------------------------------------------------------------------------------- 1) 1 395.66 395.66 33.10% 395.59 395.59 33.09% _zsh_nvm_auto_use 2) 1 216.22 216.22 18.09% 216.13 216.13 18.08% nvm_die_on_prefix 3) 1 648.00 648.00 54.20% 168.85 168.85 14.12% nvm_auto 4) 2 479.15 239.57 40.08% 160.50 80.25 13.43% nvm 5) 1 102.30 102.30 8.56% 84.99 84.99 7.11% nvm_ensure_version_installed 6) 2 51.21 25.60 4.28% 29.55 14.78 2.47% compinit 7) 1 680.18 680.18 56.89% 22.17 22.17 1.85% _zsh_nvm_load 8) 2 21.66 10.83 1.81% 21.66 10.83 1.81% compaudit 9) 1 17.31 17.31 1.45% 17.31 17.31 1.45% nvm_is_version_installed 10) 193 17.43 0.09 1.46% 14.50 0.08 1.21% _zsh_autosuggest_bind_widget [Redacted] The zprof module only reports the time for each zsh function, so it is useful for finding oh-my-zsh plugins that slow down cold start. To profile the entire .zshrc, use xtrace. Add the following at the top of .zshrc:

Thursday, July 15, 2021 Read
Hero Image
[Community] Cisco UCS CIMC series

[Community] Cisco UCS CIMC series Ansible - configure Cisco UCS CIMC time zone Ansible - configure Cisco UCS CIMC DNS and disable IPv6 Ansible - configure Cisco UCS CIMC fan policy Ansible - configure Cisco UCS CIMC mail alert Ansible - configure Cisco UCS CIMC 40Gb vNIC settings Ansible - configure Cisco UCS CIMC NTP time sync

Thursday, July 15, 2021 Read
Hero Image
SQL queries don't start with SELECT

SQL queries don’t start with SELECT SQL queries happen in this order FROM/JOIN and all the ON conditions WHERE GROUP BY HAVING SELECT (including window functions) ORDER BY LIMIT

Wednesday, July 14, 2021 Read
Hero Image
6 YAML Features most programmers don't know

6 YAML Features most programmers don’t know There are more examples that are similarly dangerous as Tom Ritchford pointed out 013 is mapped to 11 as the leading zero triggers the octal notation 4:30 is mapped to 270. Max Werner Kaul-Gothe and Niklas Baumstark informed me that this is automatically converted to minutes (or seconds?) as it is interpreted as a duration: 4*60 + 30 = 270 . Interestingly, this pattern still “works” with 1:1:1:1:1:1:1:1:4:30 . Multi-Line String mail_signature: | Martin Thoma Tel. +49 123 4567 { "mail_signature": "Martin Thoma\nTel. +49 123 4567" } Anchor The & defined a variable emailAddress with the value "info@example.de". The * then indicated that the name of a variable follows.

Wednesday, July 7, 2021 Read
Hero Image
Draw Diagrams With Markdown

Draw Diagrams With Markdown

Tuesday, June 29, 2021 Read
Hero Image
ansible.builtin.slurp - read file content

ansible.builtin.slurp - read file content --- - name: Use HTTP POST to upload file hosts: all tasks: - name: Read binary file content slurp: path: "/bin/ls" register: bin_file - name: Send HTTP POST Request uri: url: "https://your_server/upload.php" headers: Accept: "application/json" Content-Type: "application/octet-stream" method: POST validate_certs: false body: "{{ bin_file.content }}" status_code: - 200 - 201 register: upload_result - name: Display upload_result debug: var: upload_result Using slurp avoids the limitations of lookup(‘file’). You can read files on managed hosts, or use delegate_to: localhost to read files on the controller. You can read binary files for further processing, such as base64 encoding.

Monday, May 31, 2021 Read
Hero Image
Nginx request_time and upstream_response_time explained

Nginx request_time and upstream_response_time explained Time definitions request_time Time from the first byte of the client request to the completion of response data being sent. $request_time includes time to receive the request, time for the upstream to respond, and time to send the response (excluding log write time). upstream_response_time Time from Nginx establishing a connection to the upstream until all data is received and the connection is closed. upstream_connect_time Time to connect to the upstream server. If using an encrypted protocol, this includes handshake time.

Friday, May 14, 2021 Read
Hero Image
How to use a here documents to write data to a file in bash script

How to use a here documents to write data to a file in bash script allow here-documents within shell scripts to be indented in a natural fashion using EOF<<- command <<-EOF msg1 msg2 $var on line EOF Disabling pathname/parameter/variable expansion, command substitution, arithmetic expansion with 'EOF' #!/bin/bash OUT=/tmp/output.txt echo "Starting my script..." echo "Doing something..." # No parameter and variable expansion, command substitution, arithmetic expansion, or pathname expansion is performed on word. # If any part of word is quoted, the delimiter is the result of quote removal on word, and the lines in the here-document # are not expanded. So EOF is quoted as follows cat <<'EOF' >$OUT Status of backup as on $(date) Backing up files $HOME and /etc/ EOF echo "Starting backup using rsync..."

Friday, May 7, 2021 Read
Hero Image
Upgrade database failed after ugrade to Zabbix 5...

Upgrade database failed after ugrade to Zabbix 5… Upgrade Zabbix (4.0, 4.2, 4.4) to 5.0 / 5.2 | Step by Step Guide

Monday, May 3, 2021 Read
Hero Image
High Performance Go Workshop

High Performance Go Workshop

Wednesday, April 28, 2021 Read
Hero Image
Bypass X-Frame-Options with Nginx

Bypass X-Frame-Options with Nginx The X-Frame-Options HTTP response header tells the browser whether a page can be displayed inside <frame>, <iframe>, <embed>, or <object>. Sites can prevent clickjacking by ensuring their pages are not embedded elsewhere. By using Nginx as a forward proxy, we can bypass X-Frame-Options and embed a third-party page in our own page. X-Frame-Options has three possible values: deny: the page cannot be displayed in a frame, even on the same origin. sameorigin: the page can be displayed in a frame on the same origin. allow-from uri: the page can be displayed in a frame only from the specified origin. When Chrome tries to load frame content and X-Frame-Options denies it, the console shows an error like: Refuse to display 'http://192.168.20.101:8080' in a frame because it set 'X-Frame-Options' to 'deny'.

Monday, April 26, 2021 Read
Hero Image
Setting up JWT Authentication

Setting up JWT Authentication Nginx 实现 JWT 验证-基于 OpenResty 实现

Friday, April 23, 2021 Read
  • ««
  • «
  • 15
  • 16
  • 17
  • 18
  • 19
  • »
  • »»
Navigation
  • About
  • Skills
  • Experiences
  • Education
  • Projects
Contact me:
  • zeyanlin@outlook.com
  • linzeyan
  • Ricky
  • Ricky