<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tutorial on zhi</title><link>https://zhichen3.github.io/categories/tutorial/</link><description>Recent content in Tutorial on zhi</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 14 Apr 2026 00:00:00 -0400</lastBuildDate><atom:link href="https://zhichen3.github.io/categories/tutorial/index.xml" rel="self" type="application/rss+xml"/><item><title>GDB Tutorial</title><link>https://zhichen3.github.io/posts/gdb-tutorial/</link><pubDate>Tue, 14 Apr 2026 00:00:00 -0400</pubDate><guid>https://zhichen3.github.io/posts/gdb-tutorial/</guid><description>&lt;p>&lt;a href="https://www.sourceware.org/gdb/" target="_blank" rel="noopener">GDB&lt;/a> , the GNU Project debugger, is a useful debugger for many
languages (C, C++, Fortran, etc). Here I keep a set of useful
commands for my records.&lt;/p>
&lt;h2 id="using-gdb">Using GDB&lt;/h2> &lt;p>To use GDB, compile the program with debugging information.
For standard C++ program, add &lt;code>-g&lt;/code> flag when compiling, i.e.
something like&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>g++ -g -o myprogram myprogram.cpp
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For &lt;code>AMReX&lt;/code> related application codes like &lt;code>Castro&lt;/code>, compile with
&lt;code>DEBUG=TRUE&lt;/code>, i.e.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>make DEBUG&lt;span style="color:#f92672">=&lt;/span>TRUE
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now launch GDB with compiled program as the following.&lt;/p></description></item><item><title>Using ox-Hugo</title><link>https://zhichen3.github.io/posts/ox-hugo-tutorial/</link><pubDate>Sat, 17 Jan 2026 00:00:00 -0500</pubDate><guid>https://zhichen3.github.io/posts/ox-hugo-tutorial/</guid><description>&lt;p>&lt;a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo&lt;/a> is a static website generator written with GO, providing easily
capability to convert &lt;strong>markdown&lt;/strong> files into a &lt;strong>website&lt;/strong>. For those who use
&lt;a href="https://www.gnu.org/software/emacs/" target="_blank" rel="noopener">emacs&lt;/a> &lt;a href="https://orgmode.org/" target="_blank" rel="noopener">Org mode&lt;/a> , one can use &lt;a href="https://ox-hugo.scripter.co/" target="_blank" rel="noopener">ox-hugo&lt;/a> to convert Org files into markdown files
that will be compatible with Hugo. Hence the workflow is:&lt;/p>
&lt;p>\[\mathrm{Org} \\ \xrightarrow{\text{ox-hugo}} \\ \mathrm{markdown} \\ \xrightarrow{\text{Hugo}} \\ \mathrm{HTML}\]&lt;/p>
&lt;p>For me, I use it to create my research journal and personal website.&lt;/p>
&lt;p>Here I describe different ways of writing things &lt;strong>in Org mode&lt;/strong> that can be
re-interpreted by &lt;code>ox-hugo&lt;/code> to generate the corresponding &lt;code>md&lt;/code> files that
can be used by &lt;code>Hugo&lt;/code> for my own records.&lt;/p></description></item></channel></rss>