Posts tagged with “en”

Don't change the inode when editing a file with Vim

I keep my config files on github, and I use hard-link for most of the config files. It's convenient, as I can check the new changes easily and submit some of the changes when necessary. However, the default behavior of vim troubles me. It always changed the inode when I save the config file!

tldr; the solution is: put the following line in your .vimrc

set backupcopy=yes

PS Though this way fixed Vim's behavior, I sadly found that git pull will change the config file's inode as well. So there is actually no feasible solution. I have abandoned this hard link approach. If you have better solutions to maintain all your config files in one repository, please let me know!

Alternative to Oracle Regular expression for word boundaries

You might already know that Oracle regular expression doesn't support \b. However, we need it. So the answer is

(^|\W)yourstring(\W|$)

Reference

Set up DN8245X6-10 as a secondary WIFI router

I recently signed a new broadband contract with One NZ and received a HUAWEI DN8245X6-10 wifi router. This new router offers WIFI6 connection, which is faster than the Vodafone UltraHub. Unfortunately, I was unable to get port forwarding to work on this router, which was quite frustrating. Even One NZ's customer support couldn't assist me, as they admitted to not having training on port forwarding support. However, they did provide me with some useful information - One NZ doesn't block any ports, and the old Vodafone Ultrahub can also support the cable modem. This gave me some hope. I decided to use the Vodafone Ultrahub as the main router and DN8245 as a secondary WIFI router. After spending a few hours on it this afternoon, I finally made it work. Here are the key steps.

  1. Connect the Ultrahub's WAN port to the cable modem. I didn't change any settings; it simply works. I was happy to find that the port map settings work with this new HFC broadband as well!
  2. Connect the DN8245X6-10's WAN port to one of the LAN ports of the Ultrahub.
  3. Go to http://192.168.1.1/ and log in to the router using "admin" as the username and the password printed on the router. Login
  4. Go to Advanced => Wan.
    • Remove all three existing WAN interfaces.
    • Create a new one with the following settings. new wan
    • Apply.
  5. Go to Route => IPV4 default route. (I spent at two hours before I found this step is critical)
    • Enable default route.
    • Set the new WAN interface you just created as the default route.set default route
    • Apply

And, that's all! BTW, don't waste your time to try to set a bridge wan. It simply doesn't work:cannot get an IP from master router for unknown reason.

12 Angry Men (1957)/ 十二怒汉

I watched this movie at Last Friday night. I love it.

"Wind River" is a great movie

I watched the movie yesterday morning on my own. It's a moving movie, and it's great! The reason to choose this movie is this tweet. I always have the interest in the Indian people in America. They are kind of our Asian's relatives, aren't they?

Three things made me love this movie.

  • The plot, no preachment, just a story.
  • The hunter, he is a great father!
  • The mountains and the snow everywhere.

Indian people deserve a better treatment.