First Hands-on Experience with Docker 1.12 Swarm Mode

First Hands-on Experience with Docker 1.12 Swarm Mode

Recently, Docker released the official version 1.12, introducing several new features, including the official version of Docker Native. One significant update is the addition of Swarm Mode, providing native cluster support. I tried it as soon as possible and am writing this blog post to record my experience. It’s important to note that despite the similar names, Swarm Mode and Docker Swarm are not the same thing and are not seamlessly compatible. Their main differences are:

Read More
Hybrid Properties and Methods in SQLAlchemy: hybrid_property and hybrid_method

Hybrid Properties and Methods in SQLAlchemy: hybrid_property and hybrid_method

SQLAlchemy provides many ORM functionality extensions in its sqlalchemy.ext library. Today, we’re going to introduce the very powerful Hybrid Attributes feature.

This article’s code examples use Flask-SQLAlchemy for illustration. The differences with native SQLAlchemy are minor, mainly:

  • db.Model is roughly equivalent to sqlalchemy.ext.declarative.declarative_base
  • Model.query is roughly equivalent to db.session.query(Model)

Read More
Inheritance in SQLAlchemy

Inheritance in SQLAlchemy

SQLAlchemy is one of the commonly used ORMs in Python. Although it has a steeper learning curve compared to other ORMs like Django ORM or Peewee, it offers a wealth of advanced and flexible features. This article will discuss model inheritance.

Read More
Rescuing a Bricked R6250 with Merlin Firmware and Reverting to Stock

Rescuing a Bricked R6250 with Merlin Firmware and Reverting to Stock

A few days ago, I bought a Netgear R6250 router. Its 5G performance and coverage were quite impressive. After enjoying it for a few days, I couldn’t resist tinkering and flashed it with Merlin firmware[^netgear-merlin], and then, unfortunately… it bricked. It would start up with a blinking yellow light and automatically enter tftp mode, but transferring firmware via tftp had no effect, and pinging it always returned a ttl of 100 (a ttl=100 for a router indicates recovery mode, ttl=64 indicates normal operation). I’ve tinkered with quite a few routers, but this was the first time I bricked one. After scouring through forums, it seemed that using a tty was the only solution. After flashing, I realized its features were incredibly powerful, but its stability was not reliable. My mother had quite a few complaints, so I decided to revert to the original firmware, which turned out to be another challenge. I’m recording my experience here, hoping to help others in the future.

Read More

About Me

Having my own product was an ideal when I first started working, but for various reasons, it was not realized. After working for over a decade, transitioning from development to architecture and then to management, I have experienced a lot. However, I have gradually lost my passion for my current position, and now it seems to be the right time to leave and start anew.

know more