euccas.github.io

why a developer writes

Tmux Cheatsheet

| Comments

Note: This post is written with the help of ChatGPT (Dec 15 version).

What is Tmux

Tmux is a terminal multiplexer for Unix-like systems. Similar to Linux Screen, Tmux allows you to create, manage, and easily switch between multiple terminal sessions within one single terminal window or console. It also has features such as the ability to detach and reattach sessions, split terminal windows into panes, and more. It is useful for managing multiple terminal sessions and for running long-running commands in the background while you do other work in the same terminal window.

Tmux vs. Screen

One difference between the Tmux and Screen is that Tmux is more modern and has a more user-friendly interface, with support for mouse operations and better window and pane management. Screen, on the other hand, is an older tool that is more lightweight and simple, and does not have as many features as Tmux.

Another difference is that Tmux is more configurable and extensible, with support for custom scripts and plugins, while Screen is more bare-bones and does not have as much support for customization.

Ultimately, the choice between Tmux and Screen depends on your personal preferences and needs. Both are powerful tools that can be useful in different situations.

To learn more about the usage of Screen, please read another post in this blog: The Element of Linux Screen.

Tmux common usages

Install tmux on Mac

  • brew install tmux

Start a new session

  • tmux new: start a session, the session gets an automatically generated name.
  • tmux new -s <session name>: start a session with specified name.

List tmux sessions

  • tmux ls

Kill a tmux session

  • tmux kill-session: kill the last session.
  • tmux kill-session -t <session name>: kill the session with specified name.

Attach to session

  • tmux attach-session: attach to the last session.
  • tmux attach-session -t <session name>: kill the session with specified name.
  • tmux a: shortcut of tmux attach-session

Working with tmux windows

When you start a new Tmux session, by default, it creates a single window with a shell in it. You can create more windows and switch between them.

  • Ctrl+b c: Create a new window
  • Ctrl+b w: Show window list and choose from it
  • Ctrl+b n: Move to the next window
  • Ctrl+b p: Move to the previous window
  • Ctrl+b 0: Switch to window 0
  • Ctrl+b ,: Rename the current window
  • Ctrl+b &; Kill the current window

Read Inspired: How to Create Tech Products Customers Love

| Comments

Last month I read this book: Inspired - How to Create Tech Products Customers Love, by Marty Cagan. Before reading it, I thought this book was a collection of product case studies. But it’s not. This book writes about the principles, processes and techniques needed for creating a successful tech product. I find it to be a pragmatic guide, and it can be more useful to people who already have some experience in designing and developing products in the tech world. This will be a book that I keep with me and read again.

The book contains four parts. Part 1 is a strong opening, in this part the author discussed the key concepts that form the foundation of modern product work, the core principles that behind great products, and possible causes of the failed product efforts. Part 2 are sections on product teams, different roles that a successful product team needs, and how each role should work in order to lead to product success. Part 3 are sections on principles and techniques of product roadmaps, product vision, and objectives. I find this part especially valuable. Part 4 describes the right process from product discovery to delivery. In the last part, the author shared his view on the right culture that great products rely on.

Abstract: The Art of Design

| Comments

A few years ago, I watched the documentary series “Abstract: the Art of Design” when it was originally released on Netflix. This documentary is composed of stories about designers in a variety of displines: Their work, how they create them and how they think about design. This series is very well produced, I enjoyed it and still find it inspiring even after years. So here I’d like to write down some notes about it for myself, and for anyone else who might be interested in this documentary.

Read Continuous Delivery With Spinnaker

| Comments

Spinnaker is an open-source, multi-cloud continuous delivery platform originally developed by Netflix. Today, Spinnaker has built a community and many companies adopted it to power their Continous Delivery. Pinterest also uses Spinnaker to deploy some of its core services, including web and API. Recently I read this eBook: Continuous Delivery with Spinnaker. What I like about this short eBook is that it explains the key design considerations of Spinnaker, and those are, as I think of them, what really matter when designing a good cloud CD platform. In this post, I will share a few topics mentioned in this eBook together with my thoughts after reading.

Cloud Deployment Considerations

Important things to consider:

  • Credentials management
  • Regional isolation
  • Autoscaling
  • Immutable infrastructure and data persistence
  • Service discovery
  • Using multiple clouds
  • Abstracting cloud operations from users

Read D3.js in Action

| Comments

Recently at work, I have been working on developing a few features on top of Apache Airflow. Some of the features are UI heavy, and require some amount of the data visualization using D3.js. While working on those features, I thought it could be a good chance to spend some time on learning D3.js in-depth, so I chose to read this book D3.js in Action on manning.com. Here comes a summary of this book, and some notes I took while reading.

Overall I find this book is easy to read as long as you have some knowledge in JavaScript. In this book, a few key concepts in D3.js are clearly laid out, and the examples cover a good set of common usages and tactics you need to know for building data visualization features using D3.js.