<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: JulieS</title>
    <description>The latest articles on Forem by JulieS (@juliecodestack).</description>
    <link>https://forem.com/juliecodestack</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1028662%2Ff73ff7ff-b881-4f5b-af12-f7397a158089.png</url>
      <title>Forem: JulieS</title>
      <link>https://forem.com/juliecodestack</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/juliecodestack"/>
    <language>en</language>
    <item>
      <title>Hugo: How to Add a Table of Contents(TOC) to Your Post?</title>
      <dc:creator>JulieS</dc:creator>
      <pubDate>Fri, 28 Apr 2023 12:45:00 +0000</pubDate>
      <link>https://forem.com/juliecodestack/hugo-how-to-add-a-table-of-contentstoc-to-your-post-4bjn</link>
      <guid>https://forem.com/juliecodestack/hugo-how-to-add-a-table-of-contentstoc-to-your-post-4bjn</guid>
      <description>&lt;p&gt;Maybe you want to add a Table of Contents ( TOC ) to the articles on your Hugo site but don’t know how to do it, or maybe you want to insert a TOC somewhere in the middle of your post. This is the tutorial for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The TOC configuration
&lt;/h3&gt;

&lt;p&gt;First you need to see if your Hugo theme contains Table of Contents ( TOC ) settings.  Open the &lt;code&gt;config.toml&lt;/code&gt; file in your Hugo site folder ( Later we’ll call it &lt;code&gt;YourSite&lt;/code&gt; in this article ), find the parameter &lt;code&gt;tableOfContents&lt;/code&gt; ( or &lt;code&gt;toc&lt;/code&gt; ), set it to be &lt;code&gt;true&lt;/code&gt; like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="py"&gt;tableOfContents&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, if your Hugo theme has a TOC configuration, a TOC will be added at the beginning of every post.&lt;/p&gt;

&lt;p&gt;Q: What if I don’t want to show the TOC of an article?&lt;/p&gt;

&lt;p&gt;A: Go to the front matter of that article, and set:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;toc: false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then only the TOC of that article won’t be shown. &lt;/p&gt;

&lt;h3&gt;
  
  
  2. How to insert a TOC in the middle of your post?
&lt;/h3&gt;

&lt;p&gt;However, some Hugo themes don’t have Table of Contents ( TOC )  settings, or you may want to insert a TOC somewhere in the middle of the post. In that case, you can use Hugo shortcodes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gohugo.io/content-management/shortcodes/"&gt;Hugo Shortcodes Page&lt;/a&gt;  introduces shortcodes as this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A shortcode is a simple snippet inside a content file that Hugo will render using a predefined template. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We can think of a shortcode as a function. When we call it,  Hugo will render in the way the shortcode defined.&lt;/p&gt;

&lt;p&gt;How to use shortcodes?&lt;/p&gt;

&lt;p&gt;By written &lt;code&gt;{{% shortcodeName parameters %}}&lt;/code&gt; or &lt;code&gt;{{&amp;lt; shortcodeName parameters &amp;gt;}}&lt;/code&gt; wherever you want to use it in the markdown article. Actually, if you’ve read &lt;a href="https://juliecodestack.github.io/2023/04/13/build_hugo_site/"&gt;my first tutorial&lt;/a&gt; , you may have already used shortcodes. In it the shortcode &lt;code&gt;figure&lt;/code&gt; is used to display an image and its title.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;{{&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nt"&gt;figure&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/image1.jpg"&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"image1_title"&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;figure&lt;/code&gt; is a built-in shortcode. There is no built-in shortcode for Table of Contents ( TOC ) , so we need to define it, which is a bit hard for beginners. Thankfully the author of Hugo theme &lt;a href="https://github.com/parsiya/Hugo-Octopress"&gt;hugo-octopress&lt;/a&gt; has done it for us. You just need to download &lt;a href="https://github.com/parsiya/Hugo-Shortcodes"&gt;this repository on GitHub&lt;/a&gt; . Go to &lt;code&gt;YourSite &amp;gt; layouts&lt;/code&gt; folder, create a &lt;code&gt;shortcodes&lt;/code&gt; folder in it if it doesn’t exist. Then copy the &lt;code&gt;toc.html&lt;/code&gt; from the downloaded &lt;code&gt;Hugo-Shortcodes &amp;gt; shortcodes&lt;/code&gt; folder to &lt;code&gt;YourSite &amp;gt; layouts &amp;gt; shortcodes&lt;/code&gt;  folder. &lt;/p&gt;

&lt;p&gt;To insert TOC somewhere in your article, just write a line: &lt;code&gt;{{% toc %}}&lt;/code&gt; ( or &lt;code&gt;{{&amp;lt; toc &amp;gt;}}&lt;/code&gt; ).&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Set the range of headings to be displayed
&lt;/h3&gt;

&lt;p&gt;Sometimes you may find the page doesn’t show all the headings, and you can fix it by setting in &lt;code&gt;YourSite &amp;gt; config.toml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[markup]&lt;/span&gt;
  &lt;span class="nn"&gt;[markup.tableOfContents]&lt;/span&gt;
    &lt;span class="py"&gt;startLevel&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
    &lt;span class="py"&gt;endLevel&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;startLevel&lt;/code&gt; and &lt;code&gt;endLevel&lt;/code&gt; refer to the highest and lowest levels of the headings to be shown. For example, the above setting means that the TOC only shows headings between level 3 and level 5. &lt;/p&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://gohugo.io/content-management/shortcodes/"&gt;Hugo Shortcodes Page&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The author of the &lt;a href="https://github.com/parsiya/Hugo-Octopress"&gt;hugo-octopress theme&lt;/a&gt; introduced the use of shortcodes in detail and I find it helpful : &lt;a href="https://github.com/parsiya/Hugo-Octopress/blob/master/README.md#shortcodes"&gt;https://github.com/parsiya/Hugo-Octopress/blob/master/README.md#shortcodes&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>hugo</category>
      <category>blog</category>
    </item>
    <item>
      <title>Switching from Hexo to Hugo</title>
      <dc:creator>JulieS</dc:creator>
      <pubDate>Thu, 27 Apr 2023 12:30:00 +0000</pubDate>
      <link>https://forem.com/juliecodestack/switching-from-hexo-to-hugo-5bd7</link>
      <guid>https://forem.com/juliecodestack/switching-from-hexo-to-hugo-5bd7</guid>
      <description>&lt;p&gt;Several months ago I switched &lt;a href="https://juliecodestack.github.io/"&gt;my site&lt;/a&gt; from Hexo-building to Hugo-building. Some readers asked me why the move and how to do it, so here I’d like to share my experience with you.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Hugo v.s. Hexo
&lt;/h3&gt;

&lt;p&gt;Both Hexo and Hugo are static site generators, so why did I choose Hugo?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hugo is super fast&lt;/strong&gt;. At first I thought it means the page load time is short, so my readers could view the pages of my site instantly, and that’s the reason I decided to switch to Hugo. Later I realized it refers to the site building speed ( &amp;lt; 1ms per page according to &lt;a href="https://gohugo.io/"&gt;Hugo site&lt;/a&gt; ), which means I can build the site fast and preview the changes in real time. It’s really a benefit, especially when you have written hundreds of articles, for you can still build your site in seconds (or even in a second) .&lt;/p&gt;

&lt;p&gt;Besides, Hexo depends on Node.js. Sometimes when you install a wrong version of Node.js, it leads to problems. You don’t need to worry about that in Hugo because you don’t need to install external dependencies for it.&lt;/p&gt;

&lt;p&gt;What about Hugo’s drawbacks?&lt;/p&gt;

&lt;p&gt;From my experience, compared with Hexo, the site configuration of Hugo is a bit difficult for beginners. Hexo provides a default theme for you to begin with. While in Hugo, at first you have to pick a theme and install it. Besides, Hexo has a site configuration as well as a theme configuration. The site configuration fits all themes and saves your time when you change the theme. While Hugo has only one configuration file, and different themes have different settings, which makes beginners a little confused. &lt;/p&gt;

&lt;h3&gt;
  
  
  2. How I switched from Hexo to Hugo?
&lt;/h3&gt;

&lt;p&gt;Since I have written some posts on the Hexo site, &lt;strong&gt;the main question is how to switch to Hugo without changing the links of the posts&lt;/strong&gt;. I find &lt;a href="https://jdhao.github.io/2018/10/10/hexo_to_hugo/"&gt;this article&lt;/a&gt; helpful, so I followed the instructions in it to make the change.&lt;/p&gt;

&lt;h4&gt;
  
  
  2.1. Generate the pages by Hugo locally
&lt;/h4&gt;

&lt;p&gt;First I followed the step0 and step1 in &lt;a href="https://juliecodestack.github.io/2023/04/13/build_hugo_site/"&gt;my first tutorial&lt;/a&gt; to build a Hugo site. Then:&lt;/p&gt;

&lt;p&gt;(1) &lt;strong&gt;Copy&lt;/strong&gt; the posts from &lt;code&gt;MyHexoSite &amp;gt; source &amp;gt; _posts&lt;/code&gt; to &lt;code&gt;MyHugoSite &amp;gt; content &amp;gt; post&lt;/code&gt; folder. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Please use &lt;code&gt;copy&lt;/code&gt; , not &lt;code&gt;move&lt;/code&gt; , so that if something went wrong, you can go to &lt;code&gt;MyHexoSite&lt;/code&gt; folder and try it again. And I also advice you to make a backup of  &lt;code&gt;MyHexoSite&lt;/code&gt; folder.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(2) Change the front matter of the posts. &lt;/p&gt;

&lt;p&gt;In Hexo the the published date is formatted as &lt;code&gt;date:yyyy-mm-dd HH:MM:SS&lt;/code&gt; , while in Hugo a time zone needs to be added. For example, in my articles the format is &lt;code&gt;date:yyyy-mm-ddTHH:MM:SS+08:00&lt;/code&gt; .&lt;/p&gt;

&lt;p&gt;(3) Change the image links ( You may read &lt;a href="https://juliecodestack.github.io/2023/04/13/build_hugo_site/#15-how-to-display-images"&gt;Step1.5 in my first tutorial&lt;/a&gt; first)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For local images:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Copy all images from &lt;code&gt;MyHexoSite &amp;gt; source &amp;gt; _posts &amp;gt; imgs&lt;/code&gt; folder to &lt;code&gt;MyHugoSite &amp;gt; static &amp;gt; imgs&lt;/code&gt; folder, then change the links in the markdown files. &lt;/p&gt;

&lt;p&gt;If in Hexo the link is like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;![&lt;/span&gt;&lt;span class="nv"&gt;image1_title&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;imgs/image1.jpg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Hugo it’s changed to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;![&lt;/span&gt;&lt;span class="nv"&gt;image1_title&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;/imgs/image1.jpg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If in Hexo the link is like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"imgs/image1.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"image1_title"&lt;/span&gt; &lt;span class="na"&gt;align=&lt;/span&gt;&lt;span class="s"&gt;center&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Here &lt;code&gt;align=center&lt;/code&gt; is optional. It’s set to display the image in the center of the line.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In Hugo it’s changed to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;{{&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nt"&gt;figure&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/imgs/image1.jpg"&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"image1_title"&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For web images:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If in Hexo the link is like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;![image2_title](image2_weblink)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can keep the links as the same.&lt;/p&gt;

&lt;p&gt;If in Hexo the link is like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;img src="image2_weblink" alt="image2_title" align=center /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You need to remove the double quotes around &lt;code&gt;image2_weblink&lt;/code&gt; and &lt;code&gt;image2_title&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;(4) permanent link&lt;/p&gt;

&lt;p&gt;To be consistent with the URL of my Hexo site, I set the permanent links in the &lt;code&gt;config.toml&lt;/code&gt; of the Hugo site as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[permalinks]&lt;/span&gt;
  &lt;span class="py"&gt;post&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"/:year/:month/:day/:filename/"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;I used the Next theme of Hexo. You may need to refer to the links of your own Hexo site before setting the &lt;code&gt;permalinks&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  2.2. Push to GitHub for the first time
&lt;/h4&gt;

&lt;p&gt;(1) Save the links of several articles of your Hexo site. Later you can use them to check the links of your Hugo site.&lt;/p&gt;

&lt;p&gt;(2)  Follow the step2 in &lt;a href="https://juliecodestack.github.io/2023/04/13/build_hugo_site/"&gt;my first tutorial&lt;/a&gt;, except one thing. Because I have pushed Hexo-generated pages to GitHub before, the GitHub repository was not empty, the first time I added &lt;code&gt;-f&lt;/code&gt; after &lt;code&gt;git push&lt;/code&gt; as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"YourCommitMessage"&lt;/span&gt;
git push &lt;span class="nt"&gt;-f&lt;/span&gt; upstream master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From the next time I use &lt;code&gt;git push upstream master&lt;/code&gt; .&lt;/p&gt;

&lt;p&gt;(3) Clicking the links saved in step(1) and check whether the links point to the same articles as before.&lt;/p&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Comparison of Hexo and Hugo: &lt;a href="https://www.stackshare.io/stackups/hexo-vs-hugo"&gt;https://www.stackshare.io/stackups/hexo-vs-hugo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Switch from Hexo to Hugo: &lt;a href="https://jdhao.github.io/2018/10/10/hexo_to_hugo/"&gt;https://jdhao.github.io/2018/10/10/hexo_to_hugo/&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>hugo</category>
      <category>blog</category>
      <category>hexo</category>
      <category>github</category>
    </item>
    <item>
      <title>How to Build a Personal Website Using GitHub Pages and Hugo?</title>
      <dc:creator>JulieS</dc:creator>
      <pubDate>Wed, 26 Apr 2023 12:16:52 +0000</pubDate>
      <link>https://forem.com/juliecodestack/how-to-build-a-personal-website-using-github-pages-and-hugo-3n93</link>
      <guid>https://forem.com/juliecodestack/how-to-build-a-personal-website-using-github-pages-and-hugo-3n93</guid>
      <description>&lt;p&gt;A personal website is a good place to display your work, either your projects or your technical notes. Then how to build one? In this article I’ll introduce the simplest way to build a site. ( Maybe you’d like to have a look at &lt;a href="https://juliecodestack.github.io/"&gt;my site&lt;/a&gt; first.)&lt;/p&gt;

&lt;h3&gt;
  
  
  Site-Building Pipeline
&lt;/h3&gt;

&lt;p&gt;There are two kinds of sites: static sites and dynamic ones. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Static sites generate web pages locally, and put them on the server, so every user will get the same view when they click the link. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dynamic sites display different pages to different users on their requests, so it need things like databases. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As beginners, we choose the simpler one — static sites, and it’s easy to follow after you learn the pipeline. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aW50q4K---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rdtysczwcjucfjuv04le.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aW50q4K---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rdtysczwcjucfjuv04le.jpg" alt="Figure 1. The pipeline of building a static website" width="726" height="324"&gt;&lt;/a&gt;&lt;br&gt;
Figure 1. The pipeline of building a static website&lt;/p&gt;

&lt;p&gt;As shown in the figure above, there are two main steps in building a static website:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generate pages locally. The popular static site generators (or frameworks) are JekyII, Hugo, Hexo, etc. Here we’ll use &lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt; as an example. Many people (including me) like Hugo because it’s super fast to build a site.&lt;/li&gt;
&lt;li&gt;Deploy the site to the server. Here we’ll use GitHub as the server to store the pages. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Not that hard, right ? Now let’s dive into the details.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 0 : Preparation
&lt;/h3&gt;

&lt;p&gt;Install &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; . We will use Git Command to generate website, connect to GitHub and push web pages to it.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1 : Generate pages locally
&lt;/h3&gt;
&lt;h4&gt;
  
  
  1.1 Install Hugo
&lt;/h4&gt;

&lt;p&gt;Go to &lt;a href="https://gohugo.io/installation/"&gt;Hugo Installation Page&lt;/a&gt; , and find the corresponding installation for the operating system you’re using.&lt;/p&gt;

&lt;p&gt;I’m using Windows and I haven’t installed Chocolatey or Scoop, so I installed Hugo using binary files following &lt;a href="https://www.brycewray.com/posts/2022/10/how-i-install-hugo"&gt;this installation tutorial&lt;/a&gt; . If you’re in the same case as mine, you may follow the steps below to install Hugo. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In the following steps, &lt;code&gt;YourUserName&lt;/code&gt; refers to the user name of your Windows-system computer. More specifically, it’s the name displayed on the screen when you login in Windows.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(1) Go to folder &lt;code&gt;C:\Users\YourUserName&lt;/code&gt;, and create a &lt;code&gt;bin&lt;/code&gt; folder in it if it doesn’t exist. The &lt;code&gt;bin&lt;/code&gt; folder is the place to store the Hugo binary file.&lt;/p&gt;

&lt;p&gt;(2) Add the &lt;code&gt;bin&lt;/code&gt; folder to &lt;code&gt;PATH&lt;/code&gt;. In Windows Taskbar Search Box, enter &lt;code&gt;cmd&lt;/code&gt; and select the Command Prompt result ( right click and choose the “Run as administrator” option ). In Command Prompt, enter :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;setx PATH &lt;span class="s2"&gt;"C:&lt;/span&gt;&lt;span class="se"&gt;\U&lt;/span&gt;&lt;span class="s2"&gt;sers&lt;/span&gt;&lt;span class="se"&gt;\Y&lt;/span&gt;&lt;span class="s2"&gt;ourUserName&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="s2"&gt;in;%PATH%"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then close and reopen the Command Prompt again, enter &lt;code&gt;echo %PATH%&lt;/code&gt; to check if &lt;code&gt;bin&lt;/code&gt; has been successfully added to &lt;code&gt;PATH&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;(3) Download &lt;code&gt;.zip&lt;/code&gt; file from &lt;a href="https://github.com/gohugoio/hugo/releases"&gt;Hugo release page on GitHub&lt;/a&gt; . Be Sure to choose the &lt;strong&gt;extended version&lt;/strong&gt;, which will be found near the bottom of the list of archives. &lt;/p&gt;

&lt;p&gt;From the &lt;code&gt;.zip&lt;/code&gt; extract the binary file &lt;code&gt;hugo.exe&lt;/code&gt; and move it to the &lt;code&gt;bin&lt;/code&gt; folder.  After that, open Command Prompt and enter :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hugo version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If Hugo is successfully installed, you will see a series of characters about information including Hugo version, operating system, build date.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.2 Create a Hugo site
&lt;/h4&gt;

&lt;p&gt;Supposing you use &lt;code&gt;FolderA&lt;/code&gt;  to store your site files. Right click &lt;code&gt;FolderA&lt;/code&gt;, and select “Git Bash Here” in the menu to open the Git Bash Command. Now enter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hugo new site MySite
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then a new folder named &lt;code&gt;MySite&lt;/code&gt; will be created in &lt;code&gt;FolderA&lt;/code&gt;, that is your Hugo site.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.3 Pick a theme and configure the site
&lt;/h4&gt;

&lt;p&gt;Since a new site has been created, maybe you’d like to see what your Hugo site looks like, but wait a minute, you have to choose a theme first. &lt;/p&gt;

&lt;p&gt;What is a theme? &lt;/p&gt;

&lt;p&gt;You can regard it as the design of your website. &lt;a href="https://themes.gohugo.io/"&gt;Hugo Themes&lt;/a&gt; site has many different themes. When you pick a theme, you can download it from its GitHub repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to pick a theme?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here I’d like to give you some advice to save your time on choosing themes, for I’ve spent a lot of time on Hugo themes, picking one, configuring it and then changing to another one.&lt;/p&gt;

&lt;p&gt;(1) A theme that has an &lt;code&gt;exampleSite&lt;/code&gt; folder is easier to use. Different themes have different settings, for example, on choosing which folder to store the posts. The most important file in &lt;code&gt;exampleSite&lt;/code&gt; is the &lt;code&gt;config.toml&lt;/code&gt; ( or &lt;code&gt;config.yml&lt;/code&gt;, or &lt;code&gt;config.json&lt;/code&gt; ) file, which provides an example for your configuration, so you know which parameters to tweak to get the desired result. Without &lt;code&gt;exampleSite&lt;/code&gt;, you’ll need much more time to configure it.  &lt;/p&gt;

&lt;p&gt;(2) When previewing the theme, you need pay attention to some features that you’ll use. For example, if you write technical articles, you should check whether the theme displays Math equations and highlights code blocks well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After I pick a theme, how to configure it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Copy the theme folder you’ve downloaded into &lt;code&gt;MySite &amp;gt; themes&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;If the theme folder contains &lt;code&gt;exampleSite&lt;/code&gt;, you can copy the files in &lt;code&gt;exampleSite&lt;/code&gt; to &lt;code&gt;MySite&lt;/code&gt; folder. After that, copy other folders except &lt;code&gt;exampleSite&lt;/code&gt; ( especially &lt;code&gt;archetypes&lt;/code&gt;, &lt;code&gt;layouts&lt;/code&gt;, &lt;code&gt;static&lt;/code&gt; folders ) to &lt;code&gt;MySite&lt;/code&gt; folder.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Some themes don’t have &lt;code&gt;exampleSite&lt;/code&gt;. If you’re a beginner, I don’t recommend you to use it now, because you’ll spend much more time to figure out how to set the parameters. When I wrote this article, I was using  &lt;a href="https://github.com/spf13/hyde"&gt;Hyde&lt;/a&gt; as the theme of &lt;a href="https://juliecodestack.github.io/"&gt;my site&lt;/a&gt; . I like its simple design. It doesn’t have &lt;code&gt;exampleSite&lt;/code&gt; . However, I have used several themes before, so I used &lt;code&gt;config&lt;/code&gt; file of the previous themes and changed some parameters to set as the Hyde Theme.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then Open Git Bash Prompt on &lt;code&gt;MySite&lt;/code&gt; folder, and enter :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hugo server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When it’s done, open the URL displayed in your terminal, and you’ll see the example site locally. If you change the parameters in &lt;code&gt;config.toml&lt;/code&gt;, the page will make corresponding changes at the same time. In this way, you can configure your site. &lt;/p&gt;

&lt;p&gt;In the future, when you write a new post or make some revisions, you can still use &lt;code&gt;hugo server&lt;/code&gt; to view your site locally before pushing to GitHub.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.4 Write posts
&lt;/h4&gt;

&lt;p&gt;To create a new post, open Git Bash Command on &lt;code&gt;MySite&lt;/code&gt; folder, and enter :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hugo new new_post.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will create a new markdown file named “new_post” in &lt;code&gt;MySite &amp;gt; content&lt;/code&gt; folder. But if you use &lt;code&gt;hugo server&lt;/code&gt;, you may not see the new post. Why?&lt;/p&gt;

&lt;p&gt;(1) Depending on the theme you choose, you may need to put the &lt;code&gt;new_post.md&lt;/code&gt; into &lt;code&gt;post&lt;/code&gt; (or &lt;code&gt;posts&lt;/code&gt; ) folder in the &lt;code&gt;content&lt;/code&gt; folder to generate the web page.  In this case, you can also enter the following command to create a new post :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hugo new post/new_post.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(2) Open the new post in your editor (Typora, VS Code, etc). In the header of the post , there are settings about the post (it’s also called front matter). Find &lt;code&gt;draft: true&lt;/code&gt; , which means this post is a draft and you don’t want to publish it now. Change it to &lt;code&gt;draft: false&lt;/code&gt; so that the post will be published on the site. Besides, the &lt;code&gt;title&lt;/code&gt; in the header refers to the title of the post, and it is set to be the file name when created (for example, “new_post” here) . You can change it to whatever you want in your editor.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.5 How to display images?
&lt;/h4&gt;

&lt;p&gt;Although many tutorials didn’t mention how to insert and display images, I think for beginners it’s an important part in the building process, for you may add pictures to make your article easier to understand or look better. &lt;/p&gt;

&lt;h5&gt;
  
  
  1. For local images
&lt;/h5&gt;

&lt;p&gt;In Hugo, the local images are stored in &lt;code&gt;MySite &amp;gt; static&lt;/code&gt; folder in order to be displayed. Supposing you have an image named &lt;code&gt;image1.jpg&lt;/code&gt;, after putting it into the &lt;code&gt;static&lt;/code&gt; folder, you can insert it in your post this way :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;![&lt;/span&gt;&lt;span class="nv"&gt;image1_title&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;/image1.jpg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or you may put all images in one folder :  &lt;code&gt;MySite &amp;gt; static &amp;gt; imgs&lt;/code&gt;, then insert the image in your post by :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;![&lt;/span&gt;&lt;span class="nv"&gt;image1_title&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;/imgs/image1.jpg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But the above method doesn’t display the title of the image. If you want to show the title along with the image, you can use :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;{{&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nt"&gt;figure&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/image1.jpg"&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"image1_title"&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here please notice the space between the angle brackets ( &lt;code&gt;&amp;lt;&lt;/code&gt; and &lt;code&gt;&amp;gt;&lt;/code&gt; ) and the content. &lt;/p&gt;

&lt;p&gt;The pipeline figure you’ve seen in “Site-Building Pipeline” Section was inserted in this way. &lt;/p&gt;

&lt;h5&gt;
  
  
  2. For web images
&lt;/h5&gt;

&lt;p&gt;If your image is stored on the web, you can insert the image using its web link by one of the three ways below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Way-1: show the image without the title
![image2_title](image2_weblink)

Way-2: show the image with the title
{{&amp;lt; figure src=image2_weblink title=image2_title &amp;gt;}}

Way-3: show the image without the title
&amp;lt;img src=image2_weblink alt=image2_title align=center /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;In way-2 and way-3,  there are no double quotes around &lt;code&gt;image2_weblink&lt;/code&gt; or &lt;code&gt;image2_title&lt;/code&gt;, i.e. write &lt;code&gt;image2_weblink&lt;/code&gt;, not &lt;code&gt;“image2_weblink”&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You may look at &lt;a href="https://juliecodestack.github.io/2023/04/13/build_hugo_site/#2-for-web-images"&gt;the post on my site&lt;/a&gt; to look at the example of web image display.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 : Deploy the site to GitHub
&lt;/h3&gt;

&lt;h4&gt;
  
  
  2.1 Create a GitHub repository
&lt;/h4&gt;

&lt;p&gt;Log in &lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt; and create a public repository named &lt;code&gt;YourGitHubName.github.io&lt;/code&gt;, this is where you’re going to store your web pages on GitHub so that others can view your site. Here please make sure &lt;code&gt;YourGitHubName&lt;/code&gt; is the same as your GitHub username. &lt;/p&gt;

&lt;h4&gt;
  
  
  2.2 Build your site and push it to the repository on GitHub
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;I followed the steps introduced in &lt;a href="https://jdhao.github.io/2018/10/10/hexo_to_hugo/"&gt;this tutorial&lt;/a&gt; .&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Things you need to do before deploying for the first time:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For the first time, you need to connect &lt;code&gt;MySite &amp;gt; public&lt;/code&gt; folder to your GitHub repository. The &lt;code&gt;public&lt;/code&gt; folder is the place to store your site files after they are generated by Hugo. Connect it to your GitHub repository, so that the site files will be synchronized on GitHub.&lt;/p&gt;

&lt;p&gt;Open Git Bash Command on &lt;code&gt;MySite&lt;/code&gt; folder, enter :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;public
git init
git remote add upstream https://github.com/YourGitHubName/YourGitHubName.github.io.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, set the parameter &lt;code&gt;baseurl&lt;/code&gt; in &lt;code&gt;config.toml&lt;/code&gt; to be your GitHub repository above :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="py"&gt;baseurl&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"https://YourGitHubName.github.io/"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The following are the things you do every time you push your site to GitHub:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First generate the site files:&lt;/p&gt;

&lt;p&gt;Open Git Bash Command on &lt;code&gt;MySite&lt;/code&gt; folder, enter :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hugo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When it’s done, Hugo will generate the site files and store it in the &lt;code&gt;public&lt;/code&gt; folder.  &lt;/p&gt;

&lt;p&gt;Then we’ll push these files to GitHub, continue to enter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;public
git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="s2"&gt;"your_commit_message"&lt;/span&gt;
git push upstream master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;The above commands use &lt;code&gt;git remote add upstream...&lt;/code&gt; and &lt;code&gt;git push upstream master&lt;/code&gt;, I also used these two commands. I saw &lt;a href="https://zhiqiyu.github.io/post/git-setup-for-hugo-blog-with-github-pages/"&gt;a tutorial&lt;/a&gt; use &lt;code&gt;origin&lt;/code&gt; instead of &lt;code&gt;upstream&lt;/code&gt;, i.e. &lt;code&gt;git remote add origin...&lt;/code&gt; and &lt;code&gt;git push origin master&lt;/code&gt;, which also works. You may have a try.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Future Work
&lt;/h3&gt;

&lt;p&gt;Some tutorials introduced GitHub Actions for automating the deployment, and next I’m going to learn it. &lt;/p&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://blog.hellohuigong.com/en/posts/how-to-build-personal-blog-with-github-pages-and-hugo/"&gt;Hui Gong: How to build personal blog using GitHub Pages and Hugo&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://flaviocopes.com/start-blog-with-hugo/"&gt;Flavio Copes: How to start a blog using Hugo&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hugo installation : &lt;a href="https://www.brycewray.com/posts/2022/10/how-i-install-hugo/"&gt;https://www.brycewray.com/posts/2022/10/how-i-install-hugo/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set the Hugo theme quickly: &lt;a href="https://www.tomasbeuzen.com/post/making-a-website-with-hugo/"&gt;https://www.tomasbeuzen.com/post/making-a-website-with-hugo/&lt;/a&gt;  (I wish I had read the step 4 in it about the configuration of website earlier, it’s efficient.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy Hugo site to GitHub: &lt;a href="https://jdhao.github.io/2018/10/10/hexo_to_hugo/"&gt;https://jdhao.github.io/2018/10/10/hexo_to_hugo/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>hugo</category>
      <category>blog</category>
      <category>github</category>
    </item>
    <item>
      <title>What’s the Return Value of a Bool Expression in Python?</title>
      <dc:creator>JulieS</dc:creator>
      <pubDate>Fri, 17 Feb 2023 12:40:18 +0000</pubDate>
      <link>https://forem.com/juliecodestack/whats-the-return-value-of-a-bool-expression--11o5</link>
      <guid>https://forem.com/juliecodestack/whats-the-return-value-of-a-bool-expression--11o5</guid>
      <description>&lt;p&gt;We know that the boolean value of 0 is False, and the boolean value of 1 is True. What about the boolean value of a negative number, for example, -2 ? What‘s the result of the expression &lt;code&gt;True and 3&lt;/code&gt; in Python? Is it True or False, or other value? Let’s find it out. &lt;/p&gt;

&lt;h3&gt;
  
  
  1. Boolean Value
&lt;/h3&gt;

&lt;p&gt;Here is a question I came across while I was doing &lt;a href="https://inst.eecs.berkeley.edu/~cs61a/fa20/lab/lab01/" rel="noopener noreferrer"&gt;a lab of Berkeley CS61A Course&lt;/a&gt; . What would Python print?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; positive &lt;span class="o"&gt;=&lt;/span&gt; 28 

&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;while &lt;/span&gt;positive: 

...     print&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"positive?"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; 

...     positive -&lt;span class="o"&gt;=&lt;/span&gt; 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I thought that after printing “positive?” 10 times , the variable “positive” would become negative, so the program would stop. But my answer didn’t pass the test, so I ran it locally to see what happened. To my surprise, the program didn’t stop! It’s an infinite loop. Why? &lt;/p&gt;

&lt;p&gt;Because the boolean value of a negative number is True. &lt;strong&gt;Only the boolean value of 0 is False, while the boolean value of a positive or negative number is True&lt;/strong&gt;, so &lt;code&gt;bool(-2)=True&lt;/code&gt; .&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In Python, the boolean value of False (or 0, or ‘’, or None) is False. The boolean value of others is True.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then how to evaluate the bool expression?&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Bool Expression
&lt;/h3&gt;

&lt;p&gt;A bool expression usually contains logic operators such as &lt;code&gt;and&lt;/code&gt;, &lt;code&gt;or&lt;/code&gt;, &lt;code&gt;not&lt;/code&gt;.  &lt;/p&gt;

&lt;h4&gt;
  
  
  (1)  &lt;code&gt;&amp;lt;exp1&amp;gt; and &amp;lt;exp2&amp;gt;&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;The result of &lt;code&gt;False and True&lt;/code&gt; is False, so for the expression &lt;code&gt;&amp;lt;exp1&amp;gt; and &amp;lt;exp2&amp;gt;&lt;/code&gt; , only when the value of the first element &lt;code&gt;&amp;lt;exp1&amp;gt;&lt;/code&gt; is True do we need to check the second element &lt;code&gt;&amp;lt;exp2&amp;gt;&lt;/code&gt; . For example, the value of &lt;code&gt;True and 0&lt;/code&gt; is 0. &lt;/p&gt;

&lt;p&gt;That is, &lt;strong&gt;&lt;code&gt;and&lt;/code&gt; stops evaluating at the first false value.&lt;/strong&gt; For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; 0 and 2
0
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; False and &lt;span class="nt"&gt;-2&lt;/span&gt;
False
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If all values evaluate to be True, the last value is returned. So the value of expression &lt;code&gt;True and 3&lt;/code&gt; is 3, while the expression &lt;code&gt;3 and True&lt;/code&gt; returns True. The following is another example of &lt;code&gt;and&lt;/code&gt; between two numbers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; 2 and &lt;span class="nt"&gt;-3&lt;/span&gt;
&lt;span class="nt"&gt;-3&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;-3&lt;/span&gt; and 2
2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From the results above, you‘ll see that  &lt;strong&gt;the return value of  a bool expression like &lt;code&gt;&amp;lt;exp1&amp;gt; and &amp;lt;exp2&amp;gt;&lt;/code&gt; is not always True or False&lt;/strong&gt; . Take &lt;code&gt;True and 3&lt;/code&gt; as an example, it evaluates the boolean value of &lt;code&gt;&amp;lt;exp1&amp;gt;&lt;/code&gt; /&lt;code&gt;&amp;lt;exp2&amp;gt;&lt;/code&gt; ( &lt;code&gt;bool(3)=True&lt;/code&gt; ), but returns the actual value ( 3 ), so it‘s a number. &lt;/p&gt;

&lt;h4&gt;
  
  
  (2)  &lt;code&gt;&amp;lt;exp1&amp;gt; or &amp;lt;exp2&amp;gt;&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;or&lt;/code&gt; expression uses an evaluating order like &lt;code&gt;and&lt;/code&gt; expression. The result of &lt;code&gt;True or False&lt;/code&gt; is True, so for the expression &lt;code&gt;&amp;lt;exp1&amp;gt; or &amp;lt;exp2&amp;gt;&lt;/code&gt; , only when the value of the first element &lt;code&gt;&amp;lt;exp1&amp;gt;&lt;/code&gt; is False do we need to check the second element &lt;code&gt;&amp;lt;exp2&amp;gt;&lt;/code&gt; . &lt;/p&gt;

&lt;p&gt;That is, &lt;strong&gt;&lt;code&gt;or&lt;/code&gt; stops evaluating at the first true value.&lt;/strong&gt; For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; 0 or &lt;span class="nt"&gt;-1&lt;/span&gt;
&lt;span class="nt"&gt;-1&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; 2 or &lt;span class="nt"&gt;-1&lt;/span&gt;
2
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;True or 2
True
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;0 or False or &lt;span class="nt"&gt;-3&lt;/span&gt; or 1 / 0
&lt;span class="nt"&gt;-3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the last element &lt;code&gt;1/0&lt;/code&gt; in the last expression won’t be evaluated, otherwise it’ll produce an error. &lt;/p&gt;

&lt;p&gt;If all values evaluate to be False, the last value is returned. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; False or 0
0
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; 0 or False
False
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  (3)  &lt;code&gt;not &amp;lt;exp&amp;gt;&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Unlike &lt;code&gt;and&lt;/code&gt; and &lt;code&gt;or&lt;/code&gt; expression, &lt;code&gt;not&lt;/code&gt; expression returns the opposite boolean value of  &lt;code&gt;&amp;lt;exp&amp;gt;&lt;/code&gt;, so the result is either True or False. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; not 10
False
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Reference&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://inst.eecs.berkeley.edu/~cs61a/fa20/lab/lab01/" rel="noopener noreferrer"&gt;Lab 1: Variables &amp;amp; Functions, Control | CS 61A Fall 2020&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://inst.eecs.berkeley.edu/~cs61a/fa20/disc/disc01.pdf" rel="noopener noreferrer"&gt;disc01| CS 61A Fall 2020&lt;/a&gt;&lt;/p&gt;

</description>
      <category>community</category>
      <category>gratitude</category>
      <category>writing</category>
    </item>
    <item>
      <title>Beginner’s Guide to Shell Commands</title>
      <dc:creator>JulieS</dc:creator>
      <pubDate>Fri, 17 Feb 2023 12:01:25 +0000</pubDate>
      <link>https://forem.com/juliecodestack/beginners-guide-to-terminalshell-commands-1caj</link>
      <guid>https://forem.com/juliecodestack/beginners-guide-to-terminalshell-commands-1caj</guid>
      <description>&lt;p&gt;Maybe you just began to use Linux, or maybe you need to run programs in Terminal/Shell, in both cases, you need a command reference or cheat sheet. Here’s what you’re looking for, a list of some basic commands with examples. &lt;/p&gt;

&lt;h3&gt;
  
  
  1. Work on Directories (or Folders in Windows)
&lt;/h3&gt;

&lt;h4&gt;
  
  
  ls : list
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;ls&lt;/code&gt; : to list all the directories/files in the current directory(folder).&lt;/p&gt;

&lt;h4&gt;
  
  
  pwd : present working directory
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;pwd&lt;/code&gt;: to show the current file path.&lt;/p&gt;

&lt;h4&gt;
  
  
  cd : change directory
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;cd folder_name&lt;/code&gt;: to change directory to the directory(folder).&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;cd folder1&lt;/code&gt;  changes the directory to the subfolder “folder1” in the current folder.&lt;/p&gt;

&lt;p&gt;Three special signs for directory:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;.&lt;/code&gt; : current directory&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;..&lt;/code&gt; : parent directory, thus &lt;code&gt;cd ..&lt;/code&gt; means changing to the parent directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;~&lt;/code&gt; : home directory, thus &lt;code&gt;cd ~&lt;/code&gt; means changing to the home directory. We can also type &lt;code&gt;cd&lt;/code&gt; for the same result.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  mkdir : make a directory
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;mkdir folder_name&lt;/code&gt; : to make a new directory (folder).&lt;/p&gt;

&lt;h4&gt;
  
  
  rm -r : remove
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;rm -r folder_name&lt;/code&gt; : to remove the whole directory (folder) ( “-r” means recursively).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;:  In UNIX, when you &lt;code&gt;rm&lt;/code&gt; a file or directory, it's gone. There is no Recycle bin or Trash for you to "undo" &lt;code&gt;rm&lt;/code&gt;, so please think twice before you use it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  2. Work on Files
&lt;/h3&gt;

&lt;h4&gt;
  
  
  echo : similar to “print”
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;echo content&lt;/code&gt; : to print the content on the screen. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;echo content&amp;gt;&amp;gt;filename.filetype&lt;/code&gt;: to write to the file.&lt;/p&gt;

&lt;h4&gt;
  
  
  cat : display
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;cat filename.filetype&lt;/code&gt; : to display the content of the file.&lt;/p&gt;

&lt;h4&gt;
  
  
  touch : create a file
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;touch filename.filetype&lt;/code&gt;: to create a new empty file.&lt;/p&gt;

&lt;p&gt;The following example uses these three commands. First we use &lt;code&gt;echo&lt;/code&gt; to print “hello” on the screen :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"hello!"&lt;/span&gt;
hello!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we create a new directory named “example”, and use &lt;code&gt;touch&lt;/code&gt; to create a new txt file named “ex01” in it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;example
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;example
/example&amp;gt; &lt;span class="nb"&gt;touch &lt;/span&gt;ex01.txt
/example&amp;gt; &lt;span class="nb"&gt;ls
&lt;/span&gt;ex01.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we type &lt;code&gt;cat ex01.txt&lt;/code&gt;, the output is nothing, because “ex01.txt” is an empty file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/example&amp;gt; &lt;span class="nb"&gt;cat &lt;/span&gt;ex01.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can use &lt;code&gt;echo&lt;/code&gt;  command to write something into “ex01.txt” :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/example&amp;gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"hello"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;ex01.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now using &lt;code&gt;cat&lt;/code&gt; command, we’ll see the content of “ex01.txt”:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/example&amp;gt; &lt;span class="nb"&gt;cat &lt;/span&gt;ex01.txt
hello
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can also write many times, the content will be added to the file :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/example&amp;gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Let us learn Python."&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;ex01.txt
/example&amp;gt; &lt;span class="nb"&gt;cat &lt;/span&gt;ex01.txt
hello
Let us learn Python.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  mv : move
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;mv source_path dest_path&lt;/code&gt; ：to move the file/directory from the source_path to the dest_path.&lt;/p&gt;

&lt;p&gt;There are two ways of using &lt;code&gt;mv&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;1.&lt;code&gt;mv source_file/directory dest_directory&lt;/code&gt; : to &lt;strong&gt;move&lt;/strong&gt; the source file/directory to the dest_directory &lt;/p&gt;

&lt;p&gt;2.&lt;code&gt;mv source_file dest_file&lt;/code&gt; : to &lt;strong&gt;rename&lt;/strong&gt; the source_file,  now the file name is dest_file. If dest_file has already existed, it will be overwritten as the content of the source file.&lt;/p&gt;

&lt;p&gt;Let’s see an example. Here we still use the “example” folder in the previous example, with “ex01.txt” inside it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/example&amp;gt; &lt;span class="nb"&gt;ls
&lt;/span&gt;ex01.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First we create a new folder named “sub_example” as the dest_directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/example&amp;gt; &lt;span class="nb"&gt;mkdir &lt;/span&gt;sub_example
/example&amp;gt; &lt;span class="nb"&gt;ls
&lt;/span&gt;ex01.txt  sub_example/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The folder “sub_example” is empty now:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/example&amp;gt; &lt;span class="nb"&gt;ls &lt;/span&gt;sub_example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(1) use &lt;code&gt;mv source_file/directory dest_directory&lt;/code&gt; to move a file :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/example&amp;gt; &lt;span class="nb"&gt;mv &lt;/span&gt;ex01.txt sub_example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the file “ex01.txt” is in the subfolder “sub_example”, not in the folder “example”:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/example&amp;gt; &lt;span class="nb"&gt;ls
&lt;/span&gt;sub_example/
/example&amp;gt; &lt;span class="nb"&gt;ls &lt;/span&gt;sub_example
ex01.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(2) use &lt;code&gt;mv source_file dest_file&lt;/code&gt; to rename a file :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/example&amp;gt; &lt;span class="nb"&gt;cd &lt;/span&gt;sub_example
.../sub_example&amp;gt; &lt;span class="nb"&gt;mv &lt;/span&gt;ex01.txt ex02.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the file name is changed from “ex01” to “ex02”.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;.../sub_example&amp;gt; &lt;span class="nb"&gt;ls
&lt;/span&gt;ex02.txt
.../sub_example&amp;gt; &lt;span class="nb"&gt;cat &lt;/span&gt;ex02.txt
hello
Let us learn Python.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may wonder: what will happen if the dest_file has already existed? &lt;/p&gt;

&lt;p&gt;We create a file “ex03.txt” with the content “another txt file”.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;.../sub_example&amp;gt; &lt;span class="nb"&gt;touch &lt;/span&gt;ex03.txt
.../sub_example&amp;gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"another txt file"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;ex03.txt
.../sub_example&amp;gt; &lt;span class="nb"&gt;cat &lt;/span&gt;ex03.txt
another txt file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After typing &lt;code&gt;mv ex02.txt ex03.txt&lt;/code&gt;, there will be a prompt to check if you really want to overwrite dest_file “ex03.txt”.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;.../sub_example&amp;gt; &lt;span class="nb"&gt;mv &lt;/span&gt;ex02.txt ex03.txt
&lt;span class="nb"&gt;mv&lt;/span&gt;: overwrite &lt;span class="s1"&gt;'ex03.txt'&lt;/span&gt;? y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you type “y”, “ex03.txt” will be overwritten as the  content of “ex02.txt”.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;.../sub_example&amp;gt; &lt;span class="nb"&gt;ls
&lt;/span&gt;ex03.txt
.../sub_example&amp;gt; &lt;span class="nb"&gt;cat &lt;/span&gt;ex03.txt
hello
Let us learn Python.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  cp : copy
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;cp file/directory dest_directory&lt;/code&gt;: to copy the file/directory to the dest_directory.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For &lt;code&gt;mv&lt;/code&gt;/ &lt;code&gt;cp&lt;/code&gt; command, if the dest_directory is the current directory,  we can write &lt;code&gt;.&lt;/code&gt;  instead.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  rm : remove
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;rm file_name&lt;/code&gt;: to remove a single file. Here only a file is removed, so &lt;code&gt;-r&lt;/code&gt; is not needed.&lt;/p&gt;

&lt;h4&gt;
  
  
  unzip
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;unzip file_name.zip&lt;/code&gt; : to unzip the .zip file.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Others
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;man command_name&lt;/code&gt;: to display manual pages for the command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reference&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://inst.eecs.berkeley.edu/~cs61a/fa20/lab/lab00/" rel="noopener noreferrer"&gt;Lab 0: Getting Started | CS 61A Fall 2020&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://inst.eecs.berkeley.edu/~cs61a/fa20/articles/unix.html" rel="noopener noreferrer"&gt;UNIX tutorial | CS 61A Fall 2020&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.geeksforgeeks.org/touch-command-in-linux-with-examples/" rel="noopener noreferrer"&gt;touch command in Linux with Examples - GeeksforGeeks&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>bash</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
