Skip to content

Commit

Permalink
clean-up the messed-up'd imgs
Browse files Browse the repository at this point in the history
  • Loading branch information
j3ffyang committed Jun 19, 2023
1 parent 0abe9f9 commit ab21dae
Show file tree
Hide file tree
Showing 23 changed files with 330 additions and 26 deletions.
Binary file added build/doctrees/20220222_fedora_cleanup.doctree
Binary file not shown.
Binary file modified build/doctrees/20230617_sphinx.doctree
Binary file not shown.
Binary file modified build/doctrees/environment.pickle
Binary file not shown.
Binary file modified build/doctrees/index.doctree
Binary file not shown.
175 changes: 175 additions & 0 deletions build/html/20220222_fedora_cleanup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@

<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<title>Cleanly Manage Packages in Fedora on MacBookPro &#8212; Container and GPT2 1.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="Install ChatGLM-6B on Single GPU-Linux" href="20230422_chatGLM_6b_onGPU.html" />

<link rel="stylesheet" href="_static/custom.css" type="text/css" />


<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

</head><body>


<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">


<div class="body" role="main">

<section id="cleanly-manage-packages-in-fedora-on-macbookpro">
<h1>Cleanly Manage Packages in Fedora on MacBookPro<a class="headerlink" href="#cleanly-manage-packages-in-fedora-on-macbookpro" title="Permalink to this heading"></a></h1>
<section id="background">
<h2>Background<a class="headerlink" href="#background" title="Permalink to this heading"></a></h2>
<p>Recently I installed Fedora 35 on a MacBookPro 16,2 and want to specifically manage the update and installed packages with this customized kernel</p>
<p><img alt="20220224_neofetch_mbp-fedora" src="../imgs/20220224_neofetch_mbp-fedora.png" /></p>
</section>
<section id="commands">
<h2>Commands<a class="headerlink" href="#commands" title="Permalink to this heading"></a></h2>
<section id="installed">
<h3>Installed<a class="headerlink" href="#installed" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>Installed packages</p></li>
</ul>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>dnf<span class="w"> </span>list<span class="w"> </span>installed<span class="w"> </span><span class="p">|</span><span class="w"> </span>wc
</pre></div>
</div>
<ul class="simple">
<li><p>Check if <code class="docutils literal notranslate"><span class="pre">iwl*</span></code> installed</p></li>
</ul>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># All iwl* firmware is unnecessary on MacBookPro</span>
sudo<span class="w"> </span>dnf<span class="w"> </span>list<span class="w"> </span>installed<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>iwl
</pre></div>
</div>
</section>
<section id="upgrade-and-update">
<h3>Upgrade and Update<a class="headerlink" href="#upgrade-and-update" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>List available upgrade</p></li>
</ul>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>dnf<span class="w"> </span>list<span class="w"> </span>upgrades
</pre></div>
</div>
<ul class="simple">
<li><p>Update a particular package</p></li>
</ul>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>dnf<span class="w"> </span>update<span class="w"> </span><span class="sb">`</span>sudo<span class="w"> </span>dnf<span class="w"> </span>list<span class="w"> </span>upgrades<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>shadow-utils<span class="w"> </span><span class="p">|</span><span class="w"> </span>awk<span class="w"> </span><span class="s1">&#39;{print $1}&#39;</span><span class="sb">`</span>
</pre></div>
</div>
</section>
<section id="remove">
<h3>Remove<a class="headerlink" href="#remove" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>Remove the unwanted package</p></li>
</ul>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>dnf<span class="w"> </span>remove<span class="w"> </span><span class="sb">`</span>sudo<span class="w"> </span>dnf<span class="w"> </span>list<span class="w"> </span>installed<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>iwl<span class="w"> </span><span class="p">|</span><span class="w"> </span>awk<span class="w"> </span><span class="s1">&#39;{print $1}&#39;</span><span class="sb">`</span>
</pre></div>
</div>
</section>
<section id="troubleshooting">
<h3>Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>Check whether the firmware is loaded properly</p></li>
</ul>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="o">[</span>jeff@mbp<span class="w"> </span>~<span class="o">]</span>$<span class="w"> </span>sudo<span class="w"> </span>dmesg<span class="w"> </span><span class="p">|</span><span class="w"> </span>egrep<span class="w"> </span>-i<span class="w"> </span><span class="s1">&#39;error|critical|warn|failed&#39;</span>
<span class="o">[</span><span class="m">20892</span>.988681<span class="o">]</span><span class="w"> </span>apple-ib-touchbar<span class="w"> </span><span class="m">0003</span>:05AC:8302.000C:<span class="w"> </span>tb:<span class="w"> </span>Failed<span class="w"> </span>to<span class="w"> </span><span class="nb">set</span><span class="w"> </span>touch<span class="w"> </span>bar<span class="w"> </span>mode<span class="w"> </span>to<span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">(</span>-110<span class="o">)</span>
<span class="o">[</span><span class="m">20895</span>.036798<span class="o">]</span><span class="w"> </span>apple-ib-touchbar<span class="w"> </span><span class="m">0003</span>:05AC:8302.000C:<span class="w"> </span>tb:<span class="w"> </span>Failed<span class="w"> </span>to<span class="w"> </span><span class="nb">set</span><span class="w"> </span>touch<span class="w"> </span>bar<span class="w"> </span>mode<span class="w"> </span>to<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="o">(</span>-110<span class="o">)</span>
<span class="o">[</span><span class="m">20897</span>.085721<span class="o">]</span><span class="w"> </span>apple-ib-touchbar<span class="w"> </span><span class="m">0003</span>:05AC:8302.000C:<span class="w"> </span>tb:<span class="w"> </span>Failed<span class="w"> </span>to<span class="w"> </span><span class="nb">set</span><span class="w"> </span>touch<span class="w"> </span>bar<span class="w"> </span>mode<span class="w"> </span>to<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="o">(</span>-110<span class="o">)</span>
<span class="o">[</span><span class="m">20899</span>.132977<span class="o">]</span><span class="w"> </span>apple-ib-touchbar<span class="w"> </span><span class="m">0003</span>:05AC:8302.000C:<span class="w"> </span>tb:<span class="w"> </span>Failed<span class="w"> </span>to<span class="w"> </span><span class="nb">set</span><span class="w"> </span>touch<span class="w"> </span>bar<span class="w"> </span>mode<span class="w"> </span>to<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="o">(</span>-110<span class="o">)</span>
</pre></div>
</div>
</section>
</section>
</section>


</div>

</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">Container and GPT2</a></h1>








<h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="20230510_v2ray_vmess.html">V2Ray + vmess + CloudFlare</a></li>
<li class="toctree-l1"><a class="reference internal" href="20230422_gpt4all_on_laptop.html">Install GPT LLaMa Model on Laptop</a></li>
<li class="toctree-l1"><a class="reference internal" href="20230617_sphinx.html">Sphinx with Markdown</a></li>
<li class="toctree-l1"><a class="reference internal" href="20230422_chatGLM_6b_onGPU.html">Install ChatGLM-6B on Single GPU-Linux</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Cleanly Manage Packages in Fedora on MacBookPro</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#background">Background</a></li>
<li class="toctree-l2"><a class="reference internal" href="#commands">Commands</a></li>
</ul>
</li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="20230422_chatGLM_6b_onGPU.html" title="previous chapter">Install ChatGLM-6B on Single GPU-Linux</a></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>








</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2023, @j3ffyang.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 6.2.1</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

|
<a href="_sources/20220222_fedora_cleanup.md.txt"
rel="nofollow">Page source</a>
</div>




</body>
</html>
3 changes: 3 additions & 0 deletions build/html/20230422_chatGLM_6b_onGPU.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Cleanly Manage Packages in Fedora on MacBookPro" href="20220222_fedora_cleanup.html" />
<link rel="prev" title="Sphinx with Markdown" href="20230617_sphinx.html" />

<link rel="stylesheet" href="_static/custom.css" type="text/css" />
Expand Down Expand Up @@ -157,13 +158,15 @@ <h3>Navigation</h3>
<li class="toctree-l2"><a class="reference internal" href="#troubleshooting">Troubleshooting</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="20220222_fedora_cleanup.html">Cleanly Manage Packages in Fedora on MacBookPro</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="20230617_sphinx.html" title="previous chapter">Sphinx with Markdown</a></li>
<li>Next: <a href="20220222_fedora_cleanup.html" title="next chapter">Cleanly Manage Packages in Fedora on MacBookPro</a></li>
</ul></li>
</ul>
</div>
Expand Down
18 changes: 9 additions & 9 deletions build/html/20230617_sphinx.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<section id="sphinx-with-markdown">
<h1>Sphinx with Markdown<a class="headerlink" href="#sphinx-with-markdown" title="Permalink to this heading"></a></h1>
<p>TL;DR</p>
<p>Convert markdown <code class="docutils literal notranslate"><span class="pre">.md</span></code> files with Sphinx, like <code class="docutils literal notranslate"><span class="pre">readthedocs.io</span></code>. Generally there are 2 simple steps</p>
<p>Convert markdown <code class="docutils literal notranslate"><span class="pre">.md</span></code> files into <code class="docutils literal notranslate"><span class="pre">html</span></code> with Sphinx, like <a class="reference external" href="https://readthedocs.org">https://readthedocs.org</a>. Generally there are 2 simple steps</p>
<ol class="arabic simple">
<li><p>Build a project with Sphinx</p></li>
<li><p>Move markdown files into <code class="docutils literal notranslate"><span class="pre">source</span></code> dir and render <code class="docutils literal notranslate"><span class="pre">html</span></code></p></li>
Expand All @@ -48,9 +48,9 @@ <h2>Pre-requisite<a class="headerlink" href="#pre-requisite" title="Permalink to
</section>
<section id="create-the-doc-layout">
<h2>Create the doc layout<a class="headerlink" href="#create-the-doc-layout" title="Permalink to this heading"></a></h2>
<p><code class="docutils literal notranslate"><span class="pre">docs</span></code> is commonly used to store <em>all</em> <code class="docutils literal notranslate"><span class="pre">*.md</span></code> files</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sphinx-quickstart<span class="w"> </span>docs
sphinx-build<span class="w"> </span>-b<span class="w"> </span>html<span class="w"> </span>docs/source/<span class="w"> </span>docs/build/html
<p>I choose document <code class="docutils literal notranslate"><span class="pre">root</span></code> as project <code class="docutils literal notranslate"><span class="pre">root</span></code></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sphinx-quickstart<span class="w"> </span>./
sphinx-build<span class="w"> </span>-b<span class="w"> </span>html<span class="w"> </span>source/<span class="w"> </span>build/html
</pre></div>
</div>
</section>
Expand All @@ -67,8 +67,8 @@ <h2>Edit <code class="docutils literal notranslate"><span class="pre">source/con
</pre></div>
</div>
</section>
<section id="add-your-own-md-in-source-index-rst">
<h2>Add your own <code class="docutils literal notranslate"><span class="pre">*.md</span></code> in <code class="docutils literal notranslate"><span class="pre">source/index.rst</span></code><a class="headerlink" href="#add-your-own-md-in-source-index-rst" title="Permalink to this heading"></a></h2>
<section id="copy-your-own-md-in-source-and-edit-source-index-rst">
<h2>Copy your own <code class="docutils literal notranslate"><span class="pre">*.md</span></code> in <code class="docutils literal notranslate"><span class="pre">source/</span></code> and edit <code class="docutils literal notranslate"><span class="pre">source/index.rst</span></code><a class="headerlink" href="#copy-your-own-md-in-source-and-edit-source-index-rst" title="Permalink to this heading"></a></h2>
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="o">..</span> <span class="n">toctree</span><span class="p">::</span>
<span class="p">:</span><span class="n">maxdepth</span><span class="p">:</span> <span class="mi">2</span>
<span class="p">:</span><span class="n">caption</span><span class="p">:</span> <span class="n">Contents</span><span class="p">:</span>
Expand All @@ -88,8 +88,8 @@ <h2>Render your beautiful doc<a class="headerlink" href="#render-your-beautiful-
<section id="reference">
<h2>Reference<a class="headerlink" href="#reference" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>https://www.sphinx-doc.org/en/master/tutorial/getting-started.html</p></li>
<li><p>https://www.sphinx-doc.org/en/master/usage/markdown.html</p></li>
<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/tutorial/getting-started.html">https://www.sphinx-doc.org/en/master/tutorial/getting-started.html</a></p></li>
<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/markdown.html">https://www.sphinx-doc.org/en/master/usage/markdown.html</a></p></li>
</ul>
</section>
</section>
Expand Down Expand Up @@ -119,7 +119,7 @@ <h3>Navigation</h3>
<li class="toctree-l2"><a class="reference internal" href="#pre-requisite">Pre-requisite</a></li>
<li class="toctree-l2"><a class="reference internal" href="#create-the-doc-layout">Create the doc layout</a></li>
<li class="toctree-l2"><a class="reference internal" href="#edit-source-conf-py">Edit <code class="docutils literal notranslate"><span class="pre">source/conf.py</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#add-your-own-md-in-source-index-rst">Add your own <code class="docutils literal notranslate"><span class="pre">*.md</span></code> in <code class="docutils literal notranslate"><span class="pre">source/index.rst</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#copy-your-own-md-in-source-and-edit-source-index-rst">Copy your own <code class="docutils literal notranslate"><span class="pre">*.md</span></code> in <code class="docutils literal notranslate"><span class="pre">source/</span></code> and edit <code class="docutils literal notranslate"><span class="pre">source/index.rst</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#render-your-beautiful-doc">Render your beautiful doc</a></li>
<li class="toctree-l2"><a class="reference internal" href="#reference">Reference</a></li>
</ul>
Expand Down
58 changes: 58 additions & 0 deletions build/html/_sources/20220222_fedora_cleanup.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Cleanly Manage Packages in Fedora on MacBookPro

#### Background

Recently I installed Fedora 35 on a MacBookPro 16,2 and want to specifically manage the update and installed packages with this customized kernel

![20220224_neofetch_mbp-fedora](../imgs/20220224_neofetch_mbp-fedora.png)

## Commands

#### Installed

- Installed packages

```sh
sudo dnf list installed | wc
```

- Check if `iwl*` installed

```sh
# All iwl* firmware is unnecessary on MacBookPro
sudo dnf list installed | grep iwl
```

#### Upgrade and Update

- List available upgrade

```sh
sudo dnf list upgrades
```

- Update a particular package

```sh
sudo dnf update `sudo dnf list upgrades | grep shadow-utils | awk '{print $1}'`
```

#### Remove

- Remove the unwanted package

```sh
sudo dnf remove `sudo dnf list installed | grep iwl | awk '{print $1}'`
```

#### Troubleshooting

- Check whether the firmware is loaded properly

```sh
[jeff@mbp ~]$ sudo dmesg | egrep -i 'error|critical|warn|failed'
[20892.988681] apple-ib-touchbar 0003:05AC:8302.000C: tb: Failed to set touch bar mode to 1 (-110)
[20895.036798] apple-ib-touchbar 0003:05AC:8302.000C: tb: Failed to set touch bar mode to 2 (-110)
[20897.085721] apple-ib-touchbar 0003:05AC:8302.000C: tb: Failed to set touch bar mode to 2 (-110)
[20899.132977] apple-ib-touchbar 0003:05AC:8302.000C: tb: Failed to set touch bar mode to 2 (-110)
```
14 changes: 7 additions & 7 deletions build/html/_sources/20230617_sphinx.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

TL;DR

Convert markdown `.md` files with Sphinx, like `readthedocs.io`. Generally there are 2 simple steps
Convert markdown `.md` files into `html` with Sphinx, like [https://readthedocs.org](https://readthedocs.org). Generally there are 2 simple steps

1. Build a project with Sphinx
2. Move markdown files into `source` dir and render `html`
Expand All @@ -15,11 +15,11 @@ python -m pip install sphinx myst-parser

#### Create the doc layout

`docs` is commonly used to store _all_ `*.md` files
I choose document `root` as project `root`

```sh
sphinx-quickstart docs
sphinx-build -b html docs/source/ docs/build/html
sphinx-quickstart ./
sphinx-build -b html source/ build/html
```

#### Edit `source/conf.py`
Expand All @@ -35,7 +35,7 @@ source_suffix = {
}
```

#### Add your own `*.md` in `source/index.rst`
#### Copy your own `*.md` in `source/` and edit `source/index.rst`

```py
.. toctree::
Expand All @@ -54,5 +54,5 @@ make html
```

#### Reference
- https://www.sphinx-doc.org/en/master/tutorial/getting-started.html
- https://www.sphinx-doc.org/en/master/usage/markdown.html
- [https://www.sphinx-doc.org/en/master/tutorial/getting-started.html](https://www.sphinx-doc.org/en/master/tutorial/getting-started.html)
- [https://www.sphinx-doc.org/en/master/usage/markdown.html](https://www.sphinx-doc.org/en/master/usage/markdown.html)
Loading

0 comments on commit ab21dae

Please sign in to comment.