Siyuan's Blog

Read(); Think(); Try(); Repeat();

How to use CMake

Today I started working on an existing CUDA project and the first thing I did was to try to build the project. However, there were some problems with the CMake system which is used in the project. Therefore, I decided to learn more about CMake and fix the problem. I would like to share what I’ve learnt here in this blog post. Specifically, I wanna talk about how CMake should be used, which can be a bit confusing for someone using CMake for the first time.

Shadowsocks on CentOS 7 minimal

I have a cheap VPS in the U.S. running a shadowsocks service. When I first bought the VPS, it was running Debian 7 and the Shadowsocks implementation I picked back then was its Python implementation. I used this combination mostly because I’m familiar with Debian and Python. However, since the VPS only has 64MB memory and limited disk space, the Python implementation wasn’t ideal for my server. Therefore, I deleted the old system and installed CentOS 7 minimal.

Kickstart CentOS 7 installation

Recently I was playing around with kickstart files. Kickstart files contains specification on how a CentOS (or RHEL) OS should be installed. For example, it may be used to specify the keyboard layout, the system language, the time zone, the disk partition, the network, etc. Basically it can set anything that you could set with the graphical installation interface. If a kickstart file is referenced during OS installation, then the OS can be installed automatically without any human intervention.

List of IP in Ansible templates

I was developing a simple Ansible role for deploying elasticsearch today and I encountered a problem with Ansible’s Jinja2 template. Basically, in the configuration file for elasticsearch, I need something like discovery.zen.ping.unicast.hosts: ["192.168.0.1", "192.168.0.2", "192.168.0.3"] At first, I cannot extract IP addresses for all Ansible hosts. Later I figured out a way to do that, but I don’t know how to turn a list of IPs into a string with the IPs all quoted.

How domain name works

It has been about 5 years since I bought my first domain name to set up my old WordPress blog. Over the years, I’ve bought several domains and set up some common services with my domains (e.g. website, email). I understand how hard it is to understand the concepts related to domain name when you don’t have much network knowledge. Therefore, I would like to explain some of the important concepts related to setting up your own domain names in an easy-to-understand way.