<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Code on Chenggang Wang's Blog</title><link>https://seewang.me/en/category/code/</link><description>Recent content in Code on Chenggang Wang's Blog</description><generator>Hugo</generator><language>en-AU</language><lastBuildDate>Wed, 27 Feb 2019 12:18:56 +0000</lastBuildDate><atom:link href="https://seewang.me/en/category/code/index.xml" rel="self" type="application/rss+xml"/><item><title>Technologies used in this blog</title><link>https://seewang.me/en/technologies-used-in-this-blog/</link><pubDate>Fri, 06 Apr 2018 04:49:29 +0000</pubDate><guid>https://seewang.me/en/technologies-used-in-this-blog/</guid><description>&lt;p&gt;So, let’s talk about the technologies used in this blog, just for reference.&lt;/p&gt;
&lt;h2 id="server"&gt;Server&lt;/h2&gt;
&lt;p&gt;The blog is hosted on a &lt;a href="https://m.do.co/c/50614500d0db"&gt;DigitalOcean&lt;/a&gt; droplet，$5/month，1GB RAM，25GB SSD. I have only used AWS and Digital Ocean before, and apparently, Digital Ocean is the cheaper one. I’ve once also thought about switching to Linode. At that time, DO only got 512MB RAM, so I often run into situations that my programs get killed due to insufficient memory, which was pretty annoying. But just when I was about to pull the trigger, Digital Ocean decided to increase their RAM, so that’s the end of it.&lt;/p&gt;</description></item><item><title>seewang.me now served over HTTP2</title><link>https://seewang.me/en/seewang-me-now-served-over-http2/</link><pubDate>Fri, 19 Jan 2018 06:16:55 +0000</pubDate><guid>https://seewang.me/en/seewang-me-now-served-over-http2/</guid><description>&lt;p&gt;You surely have heard HTTP2 and its advantage over the good old HTTP1.1, security, performance blah blah blah…&lt;br&gt;
And it bizarrely easy to enable on my Nginx.&lt;/p&gt;
&lt;p&gt;Firstly some requirements:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Nginx &amp;gt; 1.9.5
OpenSSL &amp;gt; 1.0.2
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then add &lt;code&gt;http2&lt;/code&gt; to the server configuration, after &lt;code&gt;listen 443 ssl&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;server {
listen 80;
server_name seewang.me www.seewang.me;
return 301 https://seewang.me$request_uri;
}
server {
listen 443 ssl http2;
server_name seewang.me www.seewang.me;
#rest of config...
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And that’s it， now we can check it on Chrome Developer Tools &amp;gt; Network tab, we’ll need to right click on the column header and check Protocol column.&lt;/p&gt;</description></item><item><title>Free SSL Certificate, Let’s Encrypt</title><link>https://seewang.me/en/free-ssl-certificate-certbot/</link><pubDate>Sat, 15 Apr 2017 10:17:13 +0000</pubDate><guid>https://seewang.me/en/free-ssl-certificate-certbot/</guid><description>&lt;p&gt;When I first launched this blog, I set up an SSL certificate from StartCom. It was an okay experience to use, other than I had to renew it via their site every year. But a couple of days ago, Chrome prompted SSL errors when I visited the blog and refused to recognise the certificate even after I renewed it. A quick Google search tells that StartCom got themselves banned by Chrome and Firefox.&lt;/p&gt;</description></item><item><title>Linux Note 1: Command Types and Frequently Used Commands</title><link>https://seewang.me/en/linux-note-1/</link><pubDate>Thu, 29 Oct 2015 22:33:26 +0000</pubDate><guid>https://seewang.me/en/linux-note-1/</guid><description>&lt;h3 id="internal-command-and-external-command"&gt;Internal Command and External Command&lt;/h3&gt;
&lt;p&gt;Internal Command is a part of the Shell program, it consists of some simple Linux system command, which will be recognized by the Shell program and executed within the Shell program. Usually, Shell gets loaded into memory when a Linux system startup.&lt;/p&gt;
&lt;p&gt;Internal Command is written within bash’s source code, so it run faster than external command as interpreting an internal command does not need to create a new child thread. Some of most common internal command includes &lt;code&gt;exit&lt;/code&gt;, &lt;code&gt;history, cd, echo etc.&lt;/code&gt;&lt;/p&gt;</description></item></channel></rss>