Winks of life

  • Home
  • Tags
  • Archives
  • About
  • Search

When 2 teams inside same company needs a fight

Posted on 2019-10-02

As a programmer

We all know how useful hotkeys can be and we usually try our best to make good use of them.

More ever, some terminal features can only be accessed via keyboard shortcuts, making them as important as water and air to our daily life.

Read more »

Docker and SELinux

Posted on 2019-09-25

Mounting a volume from host

was very easy for docker.

Specifying whether the host volume should be readonly or read/writable was also very easy.

Sample command:

1
2
3
-v "$(pwd)"/target:/app
-v "$(pwd)"/target:/app:ro
-v "$(pwd)"/target:/app:rw

But when your mounting a volume from host with SELinux enabled, things can get a little more complex.

Read more »

GitHub pages no more

Posted on 2019-09-24

GitHub pages were everybody’s favorite

It is not very surprising, for a very long time, if you see a developer with a GitHub account, then you will also find out he/she is hosting something on GitHub pages.

Either it could be his personal homepage, blog or project intro.

I personally really appreciate how GitHub invented gh-pages branch for hosting GitHub pages.

Read more »

Gatsby believed in the green light

Posted on 2018-10-04

Gatsby believed in the green light, the orgastic future that year by year recedes before us. It eluded us then, but that’s no matter— tomorrow we will run faster, stretch out our arms farther… And one fine morning——

–Fitzgerald, F. Scott The Great Gatsby (p. 180)

Get IP addresses of interfaces in Docker containers

Posted on 2018-09-27

Docker containers can be binded to multiple interfaces

Each interfaces comes with a dynamic IP address.

Think about following scenario:

  • In your Docker compose file you specified your DB and Web service.

  • You bind DB to internal network interface.

  • You bind your web service to both your internal network interface and external interface.

  • You want your Web service only bind to external interface.

  • How do you do that?

Read more »

Golang: the extreme way to obscure through convention

Posted on 2018-07-26

The way to use append in Golang

is described as following:

1
a = append(a, x)

because append may either modify its argument in-place or return a copy of its argument with an additional entry, depending on the size and capacity of its input. Using a slice that was previously appended to may give unexpected results.

Read more »

Don't forget those hard days

Posted on 2018-07-22

Still remember the days…

however hard you try,

  • your program refuse to compile?
  • your program may compile but crash immediately when start?
  • your program may start but won’t produce correct results?
Read more »

We accept the love

Posted on 2017-09-27

We accept the love we think we deserve.

–Stephen Chbosky, The Perks of Being a Wallflower

It is not a lack of love

Posted on 2017-09-27

It is not a lack of love, but a lack of friendship that makes unhappy marriages.

–Friedrich Nietzsche

Keep true to the dream of your youth

Posted on 2017-09-19

Keep true to the dreams of your youth.

–Friedrich Schiller
123…9
Haocen Xu

Haocen Xu

La vie est drôle

90 posts
9 tags
Contact Form Privacy Policy
Creative Commons
© 2016 — 2025 Haocen Xu
Powered by Hexo
|
Theme — NexT.Mist