The Cub's Lair

Be myself, be happy — An engibear's journey through Cloud Native, AI, and life.

When I first saw the promotions for this movie, I did a quick Baidu search. Knowing it was a remake of the classic American film (12 Angry Men), a strong sense of copycat vibes made me feel like I could probably skip it.

But by pure chance, I ended up watching it. The more I watched, the more impressed I became. Any feeling of it being a cheap rip-off completely vanished. This is really not just a simple remake; it elevates the source material to a whole new level, making it entirely unique and irreplaceable.

As for the original movie it was based on, I’ve only read online summaries, so I don’t really have the ground to comment on the jury system or the progression of the legal system. However, the film’s dissection of contemporary Chinese people and society is incredibly profound. I truly believe that if you watch this movie in its entirety, it will honestly contribute to your understanding of China’s legal progress, and more importantly, teach people how to analyze and handle matters more rationally.

Due to historical reasons, we are still surrounded by a lot of reckless, impulsive mindsets and behaviors. The progress of our society has only just set foot on the right path. Therefore, we need rational understanding and actual, hands-on action even more to elevate our society’s progress and development.

Understanding Docker’s images and containers is often the very first hurdle for beginners. In this post, I’ll share some of my hands-on insights to help newcomers wrap their heads around these concepts quickly.

Note: This post is a quick-start guide to help beginners build intuition, not a deep academic dive into the inner workings of Docker. As such, some advanced details may be simplified or glossed over for clarity. For a more comprehensive look, I highly recommend checking out Daniel Eklund’s illustrated guide: Visualizing Docker Containers and Images, which is one of the main references for this post (you might need a VPN/proxy to access it).

Read more »

This post was prompted by a recent personal e-commerce experience. I ordered a large home appliance from a domestic 3C e-commerce platform that prides itself on exceptional service (let’s refer to them as “E-commerce JD”). Unfortunately, the delivery process turned out to be an absolute disaster, completely ruining the entire shopping experience. Afterward, I filed feedback with customer service. They apologized profusely with great sincerity—but what’s the point? I will never use JD to buy large appliances again.

Read more »

Scribe is Facebook’s log collection system. The moment you see “FB”, you immediately think it’s a high-end, top-tier product. However, the entire installation journey was incredibly bumpy! So, I’m writing down these setup notes to save my future self from falling into the same traps again.

Read more »

This is a true story about an O2O (Online-to-Offline) product. Although I am deeply interested in the O2O space myself, logic and sanity always prevail in the end.

It concerns a domestic cleaning O2O service whose name I won’t mention; let’s call it AppX for now. I first heard of AppX during a conversation with a friend about O2O. It felt like a true disruption to the traditional offline housekeeping industry. Driven by this curiosity, I decided to try AppX for the first time. My use case was simple: hiring an hourly cleaner to tidy up my place.

Read more »

Simply set the source directory and the target directory, and it will automatically sync all changes from the source to the target.

Found this while organizing my old code. It’s a little project I wrote ages ago when I was first learning Go (Golang)—so I guess it counts as a handy little tool.

For those who need it, smash that link: https://github.com/lfbear/go_sync_file

It is no exaggeration to describe it as “powerful.” Born in the Python ecosystem, Supervisord has grown into a highly mature process management tool. With just some simple installation and configuration, you can turn any non-daemon process into a daemon. Any little utility scripts you’ve written can instantly get a fancy service-like upgrade.

As a quick explainer—why do we want to daemonize? Simply put, it elevates your program from the application layer to the service layer (regardless of whether your program natively behaves like a service).

Now, let’s get into the good stuff:

Read more »

WebSocket gives us a completely different experience compared to traditional HTTP. I’ve been digging into it a bit lately. How to deploy a WebSocket application and expose it to the public is the main topic of this post. Since I’ve always had a soft spot for Nginx, I will outline the configurations for setting up WebSockets on Nginx below.

  1. First, check your Nginx version using nginx -v. If it’s below 1.4, sorry, but you need to update it immediately. Otherwise, native WebSocket support won’t work.

  2. The basic configuration is actually quite simple. Below is my setup for a chat application. We start by configuring an upstream, and then configure the reverse proxy within the specific server location block. Another major advantage of Nginx is its powerful reverse proxy capabilities. Since WebSocket apps usually run on non-standard ports (other than 80), using this proxy allows you to seamlessly integrate the app with the rest of your website.

Read more »

Lately I’ve been using AngularJS to build a back-end dashboard, and experiencing the sheer convenience it offers. It’s definitely worth giving a shot. Today, I want to share a subtle issue I encountered when using ng-repeat—one of Angular’s most common directives (similar to foreach in PHP or a for loop in JS).

ng-repeat can be used on both JS arrays and objects to traverse their elements. When I first used it, I simply wanted to loop through a basic array (my data structure dictated that I’d use many simple JS objects/arrays to store data). However, I ran into a snag right off the bat.

Check out the live demo on Plnkr. The code is as follows:

JS Part:

Read more »
0%