IceHe / lib

IceHe's Library: http://icehe.life

Home Page:https://icehe.life

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Notes

Welcome to IceHe's web notes!


好记性不如烂博客

Technology

Reading

IceHe's Reading List @douban.com

短期太急躁,總想走捷徑快速見效; 長期沒耐心,小覷長期堅持的成長。

Coding

Designing Data Intensive Applications - TOC

JVM - Java Virtual Machine - TOC

Fundamentals of Software Architecture - TOC

Snippet

巨大的建築,總是由一木一石疊起來的,我們何妨做做這一木一石呢?我時常做些零碎事,就是為此。

—— 鲁迅《致赖少麟》

Algorithm & Data Structure

Terminology

Message Queue

Storage

  • MySQL: lessons p1 / p2 / p3 / commands

    • robust SQL database server
  • PostgreSQL: notes

  • Elasticsearch: usage

    • for search and analysis
  • Redis: basics / notes / key notes

    • in-memory data structure store as a database, cache and message broker
  • LSM Tree: intro

    • basic data structure of LevelDB & RocksDB
  • Cache Patterns

    • cache aside / read through / write through / write behind caching

Markdown

Web

Programming Languages - at a glance

Others

Efficiency

磨刀不誤砍柴工。

macOS

Git

Command

Manual

  • ab: Apache HTTP server benchmarking tool
  • ag: The Silver Searcher. Like ack, but faster.
  • awk: pattern-directed scanning and processing language
    • gawk: pattern scanning and processing language
  • bash: GNU Bourne-Again SHell
  • brew: the missing package manager for macOS
  • bzip2: block-sorting file compressor
  • cat: concatenate files & print on the standard output
  • cd: change the current directory
  • chgrp: change group ownership
  • chmod: change file mode bits
  • chown: change file owner & group
  • column: columnate lists
  • comm: compare two sorted files line by line
  • cp: copy files & directories
  • cpu: show cpu info - not a command
  • crontab: time-based job scheduler
  • curl: transfer data from or to a server
  • cut: remove sections from each line of files
    • common combo: column | cut
  • date: print or set the system date & time
  • df: report file system disk space usage - display free space
  • diff: compare files line by line
    • better choice: comm
  • dig: DNS lookup utility
  • docker: base command for the Docker CLI
  • dstat: versatile tool for generating system resource statistics
    • iftop: display bandwidth usage on an interface by host
    • iostat: statistics of CPU & IO for devices & partitions
    • vmstat: report virtual memory statistics
  • du: estimate file space usage - disk usage
  • env: run a program in a modified environment
  • expect: interact with programs
  • expr: evaluate expressions
  • file: determine file type
  • find: search for files in a directory hierarchy
  • git: the stupid content tracker
  • gpg: OpenPGP encryption and signing tool
  • grep: print lines matching a pattern
    • zgrep: search possibly compressed files for a regular expression
  • head: output the first part of files
  • htop: interactive process viewer
  • ifconfig: configure a network interface
  • ip: show / manipulate routing, devices, policy routing & tunnels
  • jobs, bg, fg, disown, wait, …
    • stop (suspend) the execution of processes & continue (resume) their execution at a later point
  • join: join lines of two files on a common field
  • jq: command-line JSON processor
  • kill: terminate or signal a process
  • last: show listing of last logged in users
  • less: provides `more` emulation plus extensive enhancements
    • more: file perusal filter for paging through text one screenful at a time
  • ln: make links between files
  • locale: get locale-specific information
  • ls: list directory contents
  • lsof: list open files
  • man: an interface to the on-line reference manuals
  • mailx: send mails on CentOS
  • msmtp: send mails on macOS - sth wrong?
  • mkdir: make directories
  • mount: mount a filesystem
    • umount: un-mount a filesystem
  • mv: move (rename) files
  • mvn: a tool for building & managing any Java-based project
  • mysql: MySQL CLI tool - not only a command
  • nc: TCP / UDP connect & listen
  • netstat: show network status
  • nl: number lines of files
  • nginx: HTTP and reverse proxy server
  • nohup: invoke a utility immune to hangups
  • nslookup: query Internet name servers interactively
  • os: show os info - not a command
  • output: redirect output - not a command
  • passwd: modify a user's password
  • paste: merge lines of files
  • perf: performance analysis tools for Linux
  • php: PHP Command Line Interface
  • pidstat: report statistics for Linux tasks
  • ping: send ICMP ECHO_REQUEST to network hosts
  • python: Python Command Line Interface
  • ps: process status
  • realpath: print the resolved path
  • redis-cli: Redis client
  • redis-server & redis-sentinel: Redis server
  • redis-dump & redis-load: Backup & restore Redis data to and from JSON
  • rm: remove files or directories
  • rsync: transfer files
  • scp: secure copy - remote file copy program
  • sed: stream editor for filtering & transforming text
  • seq: print a sequence of numbers
  • service: run a System V init script
  • sleep: delay for a specified amount of time
  • sort: sort lines of text files
  • ssh: OpenSSH Client - remote login program
  • stat: display file or file system status
  • su: run a command with substitute user & group ID
  • sudo: execute a command as another user
  • sysctl: configure kernel parameters at runtime
  • systemctl: control systemd & service manager
  • tac: concatenate and print files in reverse
  • tail: output the last part of files
  • tar: pack & compress
  • tee: write to standard output & files
  • terminal-notifier: send macOS User Notifications
  • time: time command execution
  • timeout: run a command with a time limit
  • tmux: terminal multiplexer
  • touch: change file access & modification times
  • tr: translate or delete characters
  • ulimit: system resource limit to shell
  • uname: print system information
  • uniq: report or omit repeated lines
  • uptime: show how long system has been running
  • vim: terminal text editor
  • visudo: edit the sudoers file
  • w: show who is logged on & what they are doing
  • watch: execute a program periodically, showing output fullscreen
  • wc: print newline, word, & byte counts for each file
  • wget: network downloader
  • whereis & which & whatis: locate, show path & description
  • whoami: print effective userid
  • xargs: build and execute command lines from standard input
  • xxd: make a hexdump or do the reverse
  • yes: be repetitively affirmative
  • zsh: one of shells
  • Linux Abbreviations
  • CLI Notes - todo some day

Scene

  • automate: expect, yes
  • connect: curl, nc, ssh, telnet
  • directory: cp, find, ln, ls, mv
  • disk: df, du, duf
  • monitor status: dstat, htop, lsof, netstat, pidstat, ps, stat, top
  • network detect: dig, ifconfig, ip, netstat, nslookup, ping
  • string display: cat, head, less, tac, tail
  • string process:
    • awk, column, comm, cut, grep,
    • join, jq, paste, sed, sort,
    • tr, uniq, wc, …
  • transfer data: ftp, nc, rsync, scp
  • write file: tee, >, 2>&1
  • notify: terminal-notifier
  • http benchmark: ab, watch
  • differ output: comm, diff, vimdiff, watch
  • run in background: ^z, bg, fg, nohup [CMD] &
  • ……

Shell

Batch 批处理

Java

Basics

Package Manager

  • Maven: a software project management and comprehension tool
    • Based on the concept of a project object model (POM), Maven can:
      • manage a project's build,
      • reporting and
      • documentation from a central piece of information.
  • Gradle
    • From mobile apps to microservices, from small startups to big enterprises,
    • Gradle helps teams build, automate and deliver better software, faster.

Benchmark, Stress Testing & Unit Testing

  • Benchmark & Stress Testing: JMH - Java Microbenchmark Harness
  • Unit testing & Integration testing: Spock or JUnit
    • Groovy: a multi-faceted language for the Java platform

Code Snippet

Command Line Tool

  • jar: archive tool
  • java: application launcher
  • javac: compiler
  • javap: class file disassembler
  • jps: JVM process status - list the instrumented JVMs on the target system
  • jcmd: send diagnostic command requests to a running JVM
  • jhsdb: HotSpot Debugger
    • attach to a Java process or launch a postmortem debugger to analyze the content of a core dump from a crashed JVM
    • available after JDK 9
  • Seldom-used and deprecated
    • javadoc: API documentation generator
    • jstat: monitor JVM statistics
    • jinfo: configuration info - generate configuration info for a specified Java process
    • jmap: memory map - print details of a specified process
    • jhat: Heap Analysis Tool - only available in JDK 8 !
    • jstack: stack trace - print Java stack traces of Java threads for a specified Java process

JavaScript

Basics

Code Snippet

  • Base Encoding: encode, decode
  • Environment: running under Node or browser-like environments
  • Jest: for unit tests
  • *.d.ts declaration files that functions as an interface to the components compiled in JavaScript
  • debugger statement invokes any available debugging functionality, such as setting a breakpoint.

Package Management

  • npm: share and borrow packages
  • yarn: a package manager that doubles down as project manager
  • pnpm: fast, disk space efficient package manager

NPM: the world's largest software registry

TypeScript

Package

ASM & CPP

Assembly

Prepare on Windows 7

  1. register / cs / ip / CPU / memory
  2. endian / register / ds / [addr] / stack
  3. pseudo instruction / compile / link / debug / [bx] / loop / seg prefix / mem space
  4. stack / data / code / 栈的段 / 多段程序 / 大小写转换 / addressing / si / di
  5. bx / si / di / bp / addressing / division / dd / dup / Structural Data
  6. jump / offset / jmp / jcxz / loop / dec / bounds checking
  7. call / ret / mul / show str (pos, color) / division overflow / show value
  8. course design: 公司数据以指定格式在屏幕上显示
  9. flag register / adc / sbb / cmp 检测比较结果的条件转移指令,DF 标识和串传送指令 / Tests
  10. internal interrupt / interrupt routine / install 中断向量表 / 设置中断向量
  11. int instruction / Interrupt Routine / tests
  12. port IO / in / out / shl / shr / visit CMOS RAM
  13. external interrupt / 接口芯片和端口,可屏蔽|不可屏蔽中断,PC 机键盘的处理过程 / tests
  14. 直接定址表 / data / 地址标号 / 在其它段中,计算 sin(x) / tests
  15. 用 BIOS 进行键盘输入和磁盘读写 / tests
  16. Appendix: 汇编编译器对 jmp 的处理,地址计数器(AC),处理伪操作指令,栈传递参数,无溢出除法…

C++

Auth*

Life

Living

Past

如果你要拥有你从未有过的东西,那么你必须去做你从未做过的事。

Bio: Backend Experience & Education

  • Silverhand: Founding Team - Node.js
  • YFD: Zebra - Supply Chain - Java
  • Alibaba Local Life: 蜂鸟跑腿前台 - Java
  • Alibaba Local Life: 众包物流运营 & 数据组后台 - Java
  • Weibo: Video Platform - Java
  • Weibo: Mobile API - PHP
  • Huawei: Telecom Software Customization - Java Intern.
  • SCUT: Software Engineering - Bachelor

Timeline

愚蠢,懒惰,贫穷,没有梦想。越活越畏畏缩缩,生怕别人发现自己尚未泯灭的野心,还有无能。

Practice

博弈论:理性就是对你的各种东西设定一个优先级,并且能够贯彻执行这个优先级。

  • How to Ask: Prepare before asking
    • Avoid the stupid ways
    • JFGI: Just Fucking Google It
    • RTFM: Read The Fucking Manual
    • Trade-off: Ask for help if stuck over 15 | 30 min.
  • How to Work: Working Standards
    • 请示工作说方案
    • 布置工作说标准
    • 汇报工作说结果
    • 总结工作说流程
    • 回顾工作说感受
  • GTD Flow: Get Thing Done
  • PDCA Cycle: Plan → Do → Check → Act or Adjust
  • SMART principle: Specific / Measurable / Achievable / Relevant / Time-based
  • STAR principle: Situation → Target → Action → Result
  • Deployment Checklist: avoid low-level mistakes
  • How to Leave:《解除劳动合同告知书》

Read

写一部小说就像在黑夜里开车,你只能看到车灯照亮的部分,但是你却可以走完整个旅程。

—— E.L. Doctorow

好文共赏

  • Bookmarks
  • Cruel Reality - ZH ver. - digest
    • Nice guy? I never give a shit.
  • Life Meaning - digest
    • 因为活着,才去寻找意义。
  • Happiness Course - digest
    • 如果你只有一个选择,它让你满意吗?
  • Why Unhappy - digest
    • 我,并不特别。
  • Poet: 诗和远方 - digest
    • 眼前的苟且,也正是诗和远方。
  • Teacher Said - digest
    • 我们用「我能做到什么」来判断和定位自己,而别人用「你已经做过什么」来判断和定位你。
    • 做正确的选择,而不是可以接受的选择。
  • Pessimist - digest
    • It's the hardest part when memories remain.
  • Anti-Fragile - book
    • 一只火鸡被屠夫喂养了 1000 天,每天都向其分析师证实,屠夫对火鸡的爱的「统计置信度与日俱增」。
  • VicodinXYZ's Life Beliefs
    • 决策的第一要务是给自己创造足够多的好选项。大多数决策失败来源于在几个都不够好的选择中反复纠结。
    • 对于日常小决策,决策速度大于决策质量,不要拖;对于重大而难逆转的大决策,要收集足够多信息尽量保证做对。
    • 不是生活中的每一个问题都要解决,和问题共处是人生常态。把精力用在重要的事情上
  • Sspai Time Management
    • 更大的效率来自于重要事情上做得好,而不是在处处做得好,管理精力比管理时间更重要。
    • 在考虑如何提高精力之前,我们得先解决导致精力被浪费的主要原因:精力错位,也就是把最好的时间和状态,浪费在了低产出的任务上。
    • 「不做事」一定是最节省时间、最高效的做事方式,学会「做重要的事」才是掌控时间的终极法门。
    • 提高自控力的一个小窍门是尽量避免在无谓的小事情上做决定。
    • 何谓「真正的休息」呢?不少人习惯将阅读网站和新闻当作一种休息,事实上研究表明, 认知活动(阅读文字、视频等)加重了工作需求产生消极情绪,另一项研究则表明, 对于减少疲惫感,而且通过智能手机应用休息的效果差于与朋友或同事社交。
  • The Tyranny of Merit
    • 《“绩点”的暴政》 成功者會認為他們的成功是靠自己的才能和努力,而與社會無關,既然成功是我自己的事,那失敗就是輸家自己的錯,這會製造出「才德的驕傲」(meritocratic hubris),對階梯下的人缺乏同理心,甚至不屑和輕蔑,因此更不會有對於共同體內同胞的相互責任。
  • How to Be an Imperfectionist
    • The New Way to Self-Acceptance, Fearless Living, and Freedom from Perfectionism
    • 《如何成为不完美主义者》
      • 不那么在意问题本身,更在意在有问题存在的情况下能取得的进展。
      • 不那么在意行动正确与否,更在意是否在行动。
      • 不那么在意所谓时机,更在意任务本身。
    • 个人感受:很棒的书,解决了很多自己对于工作和生活的困惑以及心态问题;但说实话,不能应用到完美主义的职场中。
  • The Complete Guide to Effective Reading
  • Just-In-Case vs. Just-In-Time Learning

Friend

To be a better me.

  • Jan Fan: Pythonist / Tencent / Applied Mathematics PhD @ Sweden
  • Johnson Zhang: Sina Mobile / Didi / Meituan / … @ Beijing
  • SF Zhou: ACMer / Microsoft / SenseTime / Weixin / High-Flyer Quant @Hangzhou
  • Shiwey Yan: Game Engine Developer / Tencent - Timi @ Shenzhen
  • Toxic Johann: Frontend / 360 / UC / Tencent / Tubi @ Beijing
  • ME: Backend / Weibo / Alibaba / YFD / Silverhand / What's next? @ Beijing

靡不有初,鮮克有終。

About

IceHe's Library: http://icehe.life

https://icehe.life

License:GNU General Public License v3.0


Languages

Language:TypeScript 29.5%Language:Java 23.8%Language:HTML 13.8%Language:PHP 9.5%Language:C++ 6.5%Language:Shell 5.0%Language:JavaScript 4.9%Language:Kotlin 4.5%Language:Ruby 1.9%Language:Dockerfile 0.2%Language:Go 0.2%Language:Elixir 0.0%