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
  • 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
  • Links
  • Linux
  • Llamafile
  • 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
  • PostgreSQL
  • 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
Faster Multi-Platform Builds: Dockerfile Cross-Compilation Guide

Faster Multi-Platform Builds: Dockerfile Cross-Compilation Guide method docker buildx create --use FROM --platform=linux/amd64 debian / FROM --platform=$BUILDPLATFORM debian variables BUILDPLATFORM — matches the current machine. (e.g. linux/amd64) BUILDOS — os component of BUILDPLATFORM, e.g. linux BUILDARCH — e.g. amd64, arm64, riscv64 BUILDVARIANT — used to set ARM variant, e.g. v7 TARGETPLATFORM — The value set with --platform flag on build TARGETOS - OS component from --platform, e.g. linux TARGETARCH - Architecture from --platform, e.g. arm64 TARGETVARIANT example before FROM golang:1.17-alpine AS build WORKDIR /src COPY . . RUN go build -o /out/myapp . FROM alpine COPY --from=build /out/myapp /bin after FROM --platform=$BUILDPLATFORM golang:1.17-alpine AS build WORKDIR /src ARG TARGETOS TARGETARCH RUN --mount=target=. \ --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg \ GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /out/myapp . FROM alpine COPY --from=build /out/myapp /bin

Monday, September 4, 2023 Read
Hero Image
How to deal with a 50GB large csv file in r language?

How to deal with a 50GB large csv file in r language? question all <- read.csv.ffdf( file="<path of large file>", sep = ",", header=TRUE, VERBOSE=TRUE, first.rows=10000, next.rows=50000, ) answer library(sqldf) iris2 <- read.csv.sql("iris.csv", sql = "select * from file where Species = 'setosa' ")

Thursday, July 20, 2023 Read
Hero Image
15 Rules of Channels and Their Implementation

15 Rules of Channels and Their Implementation Operation rules Operation nil Closed channel Open buffered channel Open unbuffered channel Close panic panic Close succeeds; buffered values can be read. After buffer drains, further reads return the zero value of the channel type. Close succeeds; further reads return the zero value of the channel type. Receive Block Non-blocking; returns the zero value of the channel type Non-blocking; reads values normally Block Send Block panic Non-blocking; writes values normally Block Compile-time rules Operation Channel type Result Receive Send-only channel Compile error Send Receive-only channel Compile error Close Receive-only channel Compile error

Thursday, June 22, 2023 Read
Hero Image
Create macOS DMG and Bootable ISO

Create macOS DMG and Bootable ISO dmg AppStore ==> search ‘install macos’ ==> get installer ==> du -sh /Applications/Install\ macOS\ Mojave.app/ Disk Utility ==> File ==> New Image ==> Blank Image Size: installer size Format: Mac OS Extended (Journaled) Partition: Single partition - GUID Partition Map Image Format: read/write disk image same as hdiutil create -o ~/Desktop/macOS\ Mojave -size 6500m -layout SPUD -fs HFS+J sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/macOS\ Mojave iso hdiutil convert ~/Desktop/macOS\ Mojave.dmg -format UDTO -o ~/Desktop/macOS\ Mojave.iso mv ~/Desktop/macOS\ Mojave.iso.cdr ~/Desktop/macOS\ Mojave.iso

Monday, June 12, 2023 Read
Hero Image
Synology: Your NAS RAM Details at a Glance

Synology: Your NAS RAM Details at a Glance step1 Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script step2 General: In the Task field type in RAM Details. Uncheck the “Enabled” option. Select root User. Schedule: Select Run on the following date then select “Do not repeat”. Task Settings: Check “Send run details by email”, add your email then copy paste the code below in the Run command area. After that, click OK.

Monday, May 8, 2023 Read
Hero Image
Zsh Config Files and Priority

Zsh Config Files and Priority Zsh environment variable config files: .zprofile .zlogin .zshrc .zshenv .zlogout .zshrc is used for overall shell customization .zprofile and .zlogin are similar. They both set environment variables for login shells, but their load timing differs. .zprofile is based on Bash’s .bash_profile, while .zlogin is the CSH-style .login legacy name. .zshrc sets environment variables for interactive shells. It loads after .zprofile. Typically used for $PATH, $PROMPT, aliases, functions, etc. .zshenv is always read, so you can set environment variables like $PATH or $EDITOR there, but it is generally not used. .zlogout is loaded when a session logs out, which is good for cleanup, such as resetting terminal titles. Zsh loads ~/.zprofile at login (login shell).

Monday, May 8, 2023 Read
Hero Image
My Productivity Mac Settings and Apps

My Productivity Mac Settings and Apps Control dark mode per app https://nightowlapp.co/ brew install --cask nightowl Control external monitor brightness with the keyboard - MonitorControl https://github.com/MonitorControl/MonitorControl brew install --cask monitorcontrol Raycast Raycast is a free and more powerful Alfred. You can do most things with the keyboard and quickly launch features with Option + Space. It includes many features that other apps charge for. Launch apps quickly Quick dictionary lookup and calculator Built-in clipboard history search Window management like Magnet, with shortcuts to resize and move windows Calendar integration: quickly open Google Meet with the correct account when a meeting starts Write shell/nodejs/applescript to bind shortcuts for quick actions Rich extension store https://www.raycast.com/

Thursday, April 20, 2023 Read
Hero Image
Some Software Design Principles

Some Software Design Principles 1. Don’t Repeat Yourself (DRY) 2. Keep It Simple, Stupid (KISS) Making something complex is easy, but making something complex simple is difficult. 3. Program to an interface, not an implementation Prefer composition over inheritance Dependency inversion principle 4. Command-Query Separation (CQS) Query: when a method returns a value to answer a question Command: when a method changes the state of an object 5. You Ain’t Gonna Need It (YAGNI) Only design and implement what is necessary. Avoid overengineering. Implement what you need now; add more when needed later.

Tuesday, April 18, 2023 Read
Hero Image
On High Availability Systems

On High Availability Systems Item / Mechanism Backups M/S MM 2PC Paxos Consistency Weak Eventual Eventual Strong Strong Transactions No Full Local Full Full Latency Low Low Low High High Throughput High High High Low Medium Data loss Lots Some Some None None Failover Down Read only Read only Read/write Read/write This table essentially covers the foundational solutions for high-availability systems today. M/S and MM are not hard to implement, but have many issues. 2PC suffers from poor performance, while Paxos is too complex and difficult to implement.

Tuesday, April 18, 2023 Read
Hero Image
Everything About MTU and MSS

Everything About MTU and MSS

Wednesday, April 12, 2023 Read
Hero Image
Pitfalls When Parsing Binary Data in Go

Pitfalls When Parsing Binary Data in Go for { buf := make([]byte, bufSize) n, err := r.Read(buf) if err == io.EOF { return } else if err != nil { aerr.Store(err) return } ch <- buf[:n] } The code returns immediately when err is io.EOF, which is the most likely problem. The docs say: Callers should always process the n > 0 bytes returned before considering the error err. Doing so correctly handles I/O errors that happen after reading some bytes and also both of the allowed EOF behaviors.

Friday, January 20, 2023 Read
Hero Image
Rust Easy! Modern Cross-platform Command Line Tools to Supercharge Your Terminal

Rust Easy! Modern Cross-platform Command Line Tools to Supercharge Your Terminal Alacritty Alacritty is a cross-platform modern terminal emulator with sensible defaults. It is GPU accelerated, super fast, and highly configurable. You can use it on Linux, macOS, and Windows. bat bat is one of my favorite tools from this list. It’s a replacement for cat. dust Dust is an alternative for the du command. It is fast and has a better UX with nice visualization for disk usage.

Friday, January 13, 2023 Read
  • ««
  • «
  • 7
  • 8
  • 9
  • 10
  • 11
  • »
  • »»
Navigation
  • About
  • Skills
  • Experiences
  • Education
  • Projects
Contact me:
  • zeyanlin@outlook.com
  • linzeyan
  • Ricky
  • Ricky