Logo Ricky
  • 首頁
  • 關於
  • 更多的
    技能 經歷 學歷 專案
  • 文章
  • 筆記
  • 活動
  • Transform
  • Chinese
    English Chinese
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • 標籤
  • A10
  • ACME
  • AD
  • AES
  • AI
  • Aliyun
  • Ansible
  • APP
  • Application Delivery Controller
  • Arceus
  • Argo CD
  • ASCII
  • Authentication
  • Authorization
  • AWS
  • BASH
  • Bayonet
  • Benchmark
  • BGP
  • BIRD
  • Board Game
  • Browser
  • Byte
  • Cache
  • CDN
  • Channel
  • Chart
  • Checklist
  • Chrome
  • Chrome OS
  • Chrony
  • CI
  • Cilium
  • Cisco
  • Cloud-Native
  • Cloudflare
  • Cluster
  • Command Line
  • Completion
  • Config
  • Container
  • CPU
  • CURL
  • Data
  • Database
  • Debug
  • Dehydrated
  • Design
  • DevSecOps
  • Diagrams
  • Dmg
  • DNS
  • DNS-01
  • Docker
  • 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
  • Infra
  • Infrastructure
  • Input Method
  • Interview
  • Introduction
  • IPhone
  • Iptables
  • Iso
  • Issue
  • ITerm2
  • Jenkins
  • Jsoniter
  • Juniper
  • JWT
  • Kibana
  • Kubernetes
  • LDAP
  • Leetcode
  • Lightweight
  • Linkerd
  • Linux
  • LLM
  • Log
  • Lua
  • Lullaby
  • LVM
  • Machinelearning
  • MacOS
  • Markdown
  • Mattermost
  • Mermaid
  • MinIO
  • Module
  • MQTT
  • MSS
  • MTU
  • Music
  • MyDumper
  • MySQL
  • NAS
  • Netcat
  • Network
  • Nftables
  • Nginx
  • OAuth
  • OIDC
  • Ollama
  • OpenResty
  • Parquet
  • Percona
  • Pinyin
  • Pip
  • Plugin
  • Pokemon
  • PowerDNS
  • PowerShell
  • Pprof
  • Principle
  • Prometheus
  • Protobuf
  • Proxy
  • Push
  • Python
  • QRCode
  • R
  • RAID
  • RDP
  • Redis
  • Regex
  • Ringtone
  • Route
  • Rust
  • S3
  • ScreenShot
  • Security
  • Selenium
  • Sentry
  • Service Mesh
  • SFTP
  • SHELL
  • Slides
  • Snow
  • Software
  • SonarQube
  • SQL
  • SSH
  • SSL
  • String
  • Switch
  • Sync
  • Synology
  • System
  • Tcpdump
  • Telegram
  • Terminal
  • Terraform
  • Test
  • Testing
  • Time
  • Timeout
  • TLS
  • Tor
  • Trace
  • Traefik
  • Travel
  • Tunnel
  • Typora
  • Ubuntu
  • URL
  • UserAgent
  • V2Ray
  • Vagrant
  • Video
  • Vim
  • Virtualization
  • Visualization
  • VNC
  • VPN
  • VSCode
  • WAF
  • Web
  • WebAssembly
  • Webp
  • Windows
  • WSL
  • YAML
  • Youtube
  • Zabbix
  • Zero Trust
  • Zim
  • ZSH
  • 台語
Hero Image
[網友好文]Cisco UCS CIMC系列文章

[網友好文]Cisco UCS CIMC 系列文章 Ansible - 設定 Cisco UCS CIMC 時區 Ansible - 設定 Cisco UCS CIMC DNS 和停用 IPv6 Ansible - 設定 Cisco UCS CIMC Fan Policy Ansible - 設定 Cisco UCS CIMC Mail Alert Ansible - 設定 Cisco UCS CIMC 40Gb vNIC 參數 Ansible - 設定 Cisco UCS CIMC NTP 時間校時

Thursday, July 15, 2021 閱讀
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 閱讀
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 閱讀
Hero Image
Draw Diagrams With Markdown

Draw Diagrams With Markdown

Tuesday, June 29, 2021 閱讀
Hero Image
ansible.builtin.slurp - 讀取檔案內容

ansible.builtin.slurp - 讀取檔案內容 --- - 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 使用 slurp,就可以避掉 lookup(‘file’) 的限制。 可以讀取受控端主機上的檔案,也可以利用 delegate_to: localhost 來讀取主控端主機上的檔案。 可以讀取二進位檔案來做進一步處理,例如做 base64 編碼

Monday, May 31, 2021 閱讀
Hero Image
Nginx - request_time和upstream_response_time详解

Nginx - request_time 和 upstream_response_time 详解 time definition request_time 从接受用户请求的第一个字节到发送完响应数据的时间,即$request_time 包括接收客户端请求数据的时间、后端程序响应的时间、发送响应数据给客户端的时间(不包含写日志的时间)。 upstream_response_time 从 Nginx 向后端建立连接开始到接受完数据然后关闭连接为止的时间 upstream_connect_time 跟后端 server 建立连接的时间,如果是到后端使用了加密的协议,该时间将包括握手的时间。 upstream_header_time 接收后端 server 响应头的时间 如果把整个过程补充起来的话 应该是: [1用户请求][2建立 Nginx 连接][3发送响应][4接收响应][5关闭 Nginx 连接] 那么 upstream_response_time 就是 2+3+4+5 但是 一般这里面可以认为 [5关闭 Nginx 连接] 的耗时接近 0 所以 upstream_response_time 实际上就是 2+3+4 而 request_time 是 1+2+3+4 二者之间相差的就是 [1用户请求]的时间。 upstream_response_time 比 request_time 大 https://forum.nginx.org/read.php?21,284448,284450#msg-284450 $upstream_response_time 由 clock_gettime(CLOCK_MONOTONIC_COARSE)计算,默认情况下,它可以过去 4 毫秒,相反,$request_time 由 gettimeofday()计算。 所以最终 upstream_response_time 可能比 response_time 更大。

Friday, May 14, 2021 閱讀
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 閱讀
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 閱讀
Hero Image
High Performance Go Workshop

High Performance Go Workshop

Wednesday, April 28, 2021 閱讀
Hero Image
通过 Nginx 绕过 X-Frame-Options 限制

通过 Nginx 绕过 X-Frame-Options 限制 X-Frame-Options HTTP 响应头是用来给浏览器指示允许一个页面是否可以在 <frame>, <iframe>, <embed> 或者 <object> 中展现的标记。站点可以通过确保网站没有被嵌入到别人的站点里面,从而避免 Clickjacking 攻击。通过 Nginx 的作为正向代理,我们可以绕过 X-Frame-Options 限制成功的将第三方网页嵌入到自己的页面中。 X-Frame-Options 响应头有三个可能的值: deny: 表示该页面不允许在 frame 中展示,即便是在相同域名的页面中嵌套也不允许。 sameorigin: 表示该页面可以在相同域名页面的 frame 中展示。 allow-from uri: 表示该页面可以在指定来源的 frame 中展示。 在 Chrome 尝试加载 frame 的内容时,如果 X-Frame-Options 响应头设置为禁止访问,那么 Chrome 会在控制台中显示如下错误。 Refuse to display 'http://192.168.20.101:8080' in a frame because it set 'X-Frame-Options' to 'deny'. server { listen 8080; location / { proxy_hide_header X-Frame-Options; proxy_pass http://{target}; } } 这也当请求 http://{proxy_server}:8080 时,nginx 会做代理转发到 http://{target},同时在返回结果的时候会隐藏掉 X-Frame-Options 相应头,这样我们自己的网页就能正常通过 iFrame 载入目标网页了。

Monday, April 26, 2021 閱讀
Hero Image
Setting up JWT Authentication

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

Friday, April 23, 2021 閱讀
Hero Image
SSH failing with Error : fatal: daemon() failed: No such device

SSH failing with Error : fatal: daemon() failed: No such device /var/log/secure Oct 10 10:58:05 vps sshd[23799]: fatal: daemon() failed: No such device # rm -vf /dev/null removed `/dev/null` -bash-3.2# mknod /dev/null c 1 3 Started SSH and the SSH started responding: # service sshd restart Stopping sshd: [ OK ] Starting sshd: [ OK ] -bash-3.2# service sshd status openssh-daemon (pid 30608) is running…

Thursday, March 4, 2021 閱讀
  • ««
  • «
  • 14
  • 15
  • 16
  • 17
  • 18
  • »
  • »»
導覽列
  • 關於
  • 技能
  • 經歷
  • 學歷
  • 專案
聯絡方式:
  • zeyanlin@outlook.com
  • linzeyan
  • Ricky
  • Ricky