<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Terminal Root</title>
    <description>A little much about C++, Game Development, Programming and Web
</description>
    <link>https://terminalroot.com/</link>
    <atom:link href="https://terminalroot.com/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Thu, 16 Apr 2026 01:10:42 +0000</pubDate>
    <lastBuildDate>Thu, 16 Apr 2026 01:10:42 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Route application traffic via command line</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/go/tori-cli.jpg&quot; alt=&quot;Route application traffic via command line&quot; title=&quot;A tool designed for use with the Tor network.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;toricli.sh&lt;/strong&gt; is a tool written in &lt;a href=&quot;https://terminalroot.com/tags#go&quot;&gt;Go&lt;/a&gt;, focused on making it easy to route application traffic via the command line. The goal is to simplify the use of anonymization on Linux without relying on complex configurations.&lt;/p&gt;

&lt;p&gt;It falls into the same category as tools like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;torsocks&lt;/code&gt;, but with a more direct and automated approach.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;
&lt;blockquote&gt;
  &lt;p&gt;For &lt;a href=&quot;https://terminalroot.com/tags#windows&quot;&gt;Windows&lt;/a&gt;, use &lt;a href=&quot;https://learn.microsoft.com/en-us/windows/wsl/install&quot;&gt;WSL&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# systemd&lt;/span&gt;
curl &lt;span class=&quot;nt&quot;&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/thobiasn/tori-cli/main/deploy/install.sh | &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;sh

&lt;span class=&quot;c&quot;&gt;# Arch&lt;/span&gt;
yay &lt;span class=&quot;nt&quot;&gt;-S&lt;/span&gt; tori-cli-bin

&lt;span class=&quot;c&quot;&gt;# macOS&lt;/span&gt;
curl &lt;span class=&quot;nt&quot;&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/thobiasn/tori-cli/main/deploy/install.sh | sh &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--client&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Docker:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;docker run &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--name&lt;/span&gt; tori &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;--restart&lt;/span&gt; unless-stopped &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;--pid&lt;/span&gt; host &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; /var/run/docker.sock:/var/run/docker.sock:ro &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; /proc:/host/proc:ro &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; /sys:/host/sys:ro &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; /run/tori:/run/tori &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; tori-data:/var/lib/tori &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; ./config.toml:/etc/tori/config.toml:ro &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  ghcr.io/thobiasn/tori-cli:latest&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;usage-example&quot;&gt;Usage example&lt;/h2&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;toricli curl example.com&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And the traffic is anonymized.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit: &lt;a href=&quot;https://toricli.sh/&quot;&gt;https://toricli.sh/&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Wed, 15 Apr 2026 22:03:23 +0000</pubDate>
        <link>https://terminalroot.com/route-application-traffic-via-command-line/</link>
        <guid isPermaLink="true">https://terminalroot.com/route-application-traffic-via-command-line/</guid>
        
        <category>network</category>
        
        <category>go</category>
        
        <category>terminal</category>
        
        
      </item>
    
      <item>
        <title>Pyrite64, a Modern Engine for Nintendo 64</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/gamedev/pyrite64.jpg&quot; alt=&quot;Pyrite64, a Modern Engine for Nintendo 64&quot; title=&quot;Despite having &apos;Py&apos; in its name, this engine uses C++ or C for development (scripting).&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Pyrite64&lt;/strong&gt; is an open-source engine + visual editor for creating &lt;strong&gt;native 3D Nintendo 64 games&lt;/strong&gt; — not “N64-style”, but games that actually run on original hardware or accurate emulators. For development (scripting) with &lt;a href=&quot;https://terminalroot.com/tags#cpp&quot;&gt;C++&lt;/a&gt; or &lt;a href=&quot;https://terminalroot.com/tags#clanguage&quot;&gt;C&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What’s the idea?&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Replace the old workflow (confusing SDKs + broken toolchains)&lt;/li&gt;
  &lt;li&gt;Bring something closer to Unity/Godot, but focused on the N64&lt;/li&gt;
  &lt;li&gt;Generate real ROMs compatible with the console&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Features:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Visual editor with scene management&lt;/li&gt;
  &lt;li&gt;Model import (GLTF / Blender + Fast64)&lt;/li&gt;
  &lt;li&gt;Node graph (basic visual scripting)&lt;/li&gt;
  &lt;li&gt;Runtime engine (rendering, collision, audio, etc.)&lt;/li&gt;
  &lt;li&gt;HDR + bloom adapted for N64&lt;/li&gt;
  &lt;li&gt;Asset manager with automatic cleanup ([AlternativeTo][2])&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;h3 id=&quot;windows&quot;&gt;&lt;a href=&quot;https://terminalroot.com/tags#windows&quot;&gt;Windows&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The project itself automates almost everything.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Download the release (or clone the repo)&lt;/li&gt;
  &lt;li&gt;Run the editor&lt;/li&gt;
  &lt;li&gt;It automatically installs everything:&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;gnulinux&quot;&gt;&lt;a href=&quot;https://terminalroot.com/tags#gnulinux&quot;&gt;GNU/Linux&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Dependencies:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://terminalroot.com/tags#gcc&quot;&gt;GCC&lt;/a&gt;/&lt;a href=&quot;https://terminalroot.com/tags#llvm&quot;&gt;Clang&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://terminalroot.com/tags#cmake&quot;&gt;CMake&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Basic &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;build&lt;/code&gt; libs&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libdragon&lt;/code&gt; toolchain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then just clone, compile, and install&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/HailToDodongo/pyrite64
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;pyrite64
&lt;span class=&quot;nb&quot;&gt;mkdir &lt;/span&gt;build &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;build
cmake ..
make
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;make &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;getting-started&quot;&gt;Getting Started&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Create a project&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Inside the editor:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;New Project&lt;/li&gt;
  &lt;li&gt;Set name + folder&lt;/li&gt;
  &lt;li&gt;It creates the structure with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;project.p64proj&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;ol&gt;
  &lt;li&gt;Configure toolchain + emulator&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;File:&lt;/p&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;err&quot;&gt;project.p&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;proj&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Important fields:&lt;/p&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nl&quot;&gt;&quot;pathEmu&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;ares&quot;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;pathN64Inst&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/path/to/toolchain&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pathEmu&lt;/code&gt; → emulator command&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pathN64Inst&lt;/code&gt; → toolchain root ([Instagit][3])&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;ol&gt;
  &lt;li&gt;Import assets&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Typical workflow:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Model in Blender&lt;/li&gt;
  &lt;li&gt;Export GLTF&lt;/li&gt;
  &lt;li&gt;Import into the editor&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
  &lt;li&gt;Build the scene&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
  &lt;li&gt;Add objects&lt;/li&gt;
  &lt;li&gt;Adjust transforms&lt;/li&gt;
  &lt;li&gt;Define materials&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;ol&gt;
  &lt;li&gt;Game logic&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two options:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Node graph (visual)&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://terminalroot.com/tags#cpp&quot;&gt;C++&lt;/a&gt; (more control)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
  &lt;li&gt;Build and run&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
  &lt;li&gt;“Run” button&lt;/li&gt;
  &lt;li&gt;Generates ROM&lt;/li&gt;
  &lt;li&gt;Opens automatically in the emulator&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit the &lt;a href=&quot;https://hailtododongo.github.io/pyrite64/docs/faq.html#do-i-need-to-know-programming&quot;&gt;official website with FAQ&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Sun, 12 Apr 2026 22:11:56 +0000</pubDate>
        <link>https://terminalroot.com/pyrite64-a-modern-engine-for-nintendo-64/</link>
        <guid isPermaLink="true">https://terminalroot.com/pyrite64-a-modern-engine-for-nintendo-64/</guid>
        
        <category>gamedev</category>
        
        <category>cpp</category>
        
        <category>clanguage</category>
        
        
      </item>
    
      <item>
        <title>Install This Modern Network Scanner with TUI Mode</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/go/nibble.jpg&quot; alt=&quot;Install This Modern Network Scanner with TUI Mode&quot; title=&quot;Built in Go, incredibly fast, and hassle-free.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you’ve used tools like &lt;a href=&quot;https://terminalroot.com.br/2018/07/escaneado-redes-com-nmap.html&quot;&gt;nmap&lt;/a&gt; and found them heavy, verbose, or too slow for simple tasks, &lt;strong&gt;Nibble&lt;/strong&gt; solves exactly that problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nibble&lt;/strong&gt; is an open-source network scanner focused on simplicity, speed, and usability. It allows you to discover devices and services on your local network without needing to memorize complex commands or configure anything manually. It works on &lt;a href=&quot;https://terminalroot.com/tags#gnulinux&quot;&gt;GNU/Linux&lt;/a&gt;, &lt;a href=&quot;https://terminalroot.com/tags#macos&quot;&gt;macOS&lt;/a&gt;, and &lt;a href=&quot;https://terminalroot.com/tags#windows&quot;&gt;Windows&lt;/a&gt; (x86 and ARM).&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew install backendsystems/tap/nibble&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pipx install nibble-cli&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;npm install -g @backendsystems/nibble&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;go install github.com/backendsystems/nibble@latest&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Or run it directly with:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;npx @backendsystems/nibble&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/backendsystems/nibble&quot;&gt;Nibble repository&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Wed, 25 Mar 2026 10:43:42 +0000</pubDate>
        <link>https://terminalroot.com/install-this-modern-network-scanner-with-tui-mode/</link>
        <guid isPermaLink="true">https://terminalroot.com/install-this-modern-network-scanner-with-tui-mode/</guid>
        
        <category>go</category>
        
        <category>tui</category>
        
        <category>terminal</category>
        
        <category>network</category>
        
        
      </item>
    
      <item>
        <title>Manage APT packages with a modern terminal interface</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/go/aptui.jpg&quot; alt=&quot;Manage APT packages with a modern terminal interface&quot; title=&quot;Built with Go, works as a frontend for APT.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;APTUI is a &lt;a href=&quot;https://terminalroot.com/tags#tui&quot;&gt;TUI (Terminal User Interface)&lt;/a&gt; written in &lt;a href=&quot;https://terminalroot.com/tags#go&quot;&gt;Go&lt;/a&gt; that acts as a frontend for APT.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The concept is simple: &lt;strong&gt;do everything you already do with APT, but without leaving the screen and without typing repetitive commands&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Main features&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Real-time filtering as you type&lt;/li&gt;
  &lt;li&gt;Fuzzy search (no need for exact name)&lt;/li&gt;
  &lt;li&gt;Fallback to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apt-cache search&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;h3 id=&quot;via-go&quot;&gt;Via Go&lt;/h3&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;go &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;github.com/mexirica/aptui@latest&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h3 id=&quot;or-via-apt-debianubuntu&quot;&gt;Or via APT (Debian/Ubuntu)&lt;/h3&gt;
&lt;blockquote&gt;
  &lt;p&gt;(custom repository available in the project)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then just run:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;aptui&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit the &lt;a href=&quot;https://github.com/mexirica/aptui&quot;&gt;repository&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Mon, 23 Mar 2026 11:13:08 +0000</pubDate>
        <link>https://terminalroot.com/manage-apt-packages-with-a-modern-terminal-interface/</link>
        <guid isPermaLink="true">https://terminalroot.com/manage-apt-packages-with-a-modern-terminal-interface/</guid>
        
        <category>go</category>
        
        <category>terminal</category>
        
        <category>tui</category>
        
        <category>gnulinux</category>
        
        
      </item>
    
      <item>
        <title>Manage Your SQL Databases via Terminal with This App</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/go/pam.jpg&quot; alt=&quot;Manage Your SQL Databases via Terminal with This App&quot; title=&quot;For developers, DBAs, and analysts who need a lightweight, fast, and powerful tool for working with multiple databases in the terminal.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Pam is a minimalist command-line interface (CLI) tool written in &lt;a href=&quot;https://terminalroot.com/tags#go&quot;&gt;Go&lt;/a&gt;, designed to simplify managing and executing &lt;a href=&quot;https://terminalroot.com/tags#sql&quot;&gt;SQL&lt;/a&gt; queries across multiple databases. Inspired by “The Office,” Pam pays homage to the character who organizes everything efficiently.&lt;/p&gt;

&lt;h3 id=&quot;key-features&quot;&gt;Key Features&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Query Library:&lt;/strong&gt; Save and organize your most-used SQL queries for easy access and reuse.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Multi-database Support:&lt;/strong&gt; Compatible with PostgreSQL, MySQL, SQLite, Oracle, SQL Server, ClickHouse, and Firebird.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://terminalroot.com/tags#tui&quot;&gt;TUI (Terminal User Interface)&lt;/a&gt;:&lt;/strong&gt; Keyboard-focused navigation with Vim-inspired shortcuts for efficient manipulation of query results.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Direct Editing:&lt;/strong&gt; Update cells, delete rows, and edit SQL directly in the results table.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Data Export:&lt;/strong&gt; Export results in formats such as &lt;a href=&quot;https://terminalroot.com/how-to-parse-csv-with-modern-cpp/&quot;&gt;CSV&lt;/a&gt;, &lt;a href=&quot;https://terminalroot.com/how-to-consume-apis-with-curl-and-cpp-in-the-terminal/&quot;&gt;JSON&lt;/a&gt;, SQL, &lt;a href=&quot;https://terminalroot.com/tags#markdown&quot;&gt;Markdown&lt;/a&gt;, or &lt;a href=&quot;https://terminalroot.com/tags#html&quot;&gt;HTML&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Parameterized Queries:&lt;/strong&gt; Support for parameterized queries, enabling dynamic searches without rewriting SQL.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;p&gt;You can install Pam via Go, by downloading the binary directly from the releases repository, or using &lt;a href=&quot;https://terminalroot.com/tags#gnu&quot;&gt;Nix/NixOS&lt;/a&gt;.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;go &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;github.com/eduardofuncao/pam/cmd/pam@latest&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;basic-usage&quot;&gt;Basic Usage&lt;/h2&gt;

&lt;p&gt;After installation, initialize a connection to your desired database:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;pam init mydb postgres &lt;span class=&quot;s2&quot;&gt;&quot;postgresql://user:pass@localhost:5432/mydb&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Add queries to your library:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;pam add list_users &lt;span class=&quot;s2&quot;&gt;&quot;SELECT * FROM users&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And run them interactively:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;pam run list_users&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The TUI interface supports Vim-like shortcuts (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;j&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;k&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;h&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;l&lt;/code&gt;), copy cell (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt;), export data (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt;), edit cell (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;u&lt;/code&gt;), delete row (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;D&lt;/code&gt;), and more quick commands.&lt;/p&gt;

&lt;p&gt;Pam stores its configuration in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/pam/config.yaml&lt;/code&gt;, allowing you to adjust row limits, column widths, and color schemes for the interface.&lt;/p&gt;

&lt;p&gt;The app provides example commands for easily connecting to various database types, including PostgreSQL, &lt;a href=&quot;https://terminalroot.com/tags#mysql&quot;&gt;MySQL&lt;/a&gt;, SQL Server, Oracle, SQLite, ClickHouse, and Firebird.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit the &lt;a href=&quot;https://github.com/eduardofuncao/pam&quot;&gt;repository&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Wed, 04 Mar 2026 08:49:08 +0000</pubDate>
        <link>https://terminalroot.com/manage-your-sql-databases-via-terminal-with-this-app/</link>
        <guid isPermaLink="true">https://terminalroot.com/manage-your-sql-databases-via-terminal-with-this-app/</guid>
        
        <category>go</category>
        
        <category>sql</category>
        
        <category>cli</category>
        
        
      </item>
    
      <item>
        <title>How to optimize the cd command to go back multiple folders at once</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/bash/cd-menos.jpg&quot; alt=&quot;How to optimize the cd command to go back multiple folders at once&quot; title=&quot;Spend less time counting how many folders you need to go back with this hack. 😃&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Everyone in the &lt;a href=&quot;https://terminalroot.com/tags#gnu&quot;&gt;UNIX/GNU world&lt;/a&gt; constantly uses the &lt;a href=&quot;https://terminalroot.com/50-gnu-commands-x-50-powershell-commands/&quot;&gt;cd command&lt;/a&gt; to navigate into folders through the terminal.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt; command, also known as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chdir&lt;/code&gt;, is a command implemented in command-line interfaces of various operating systems (&lt;a href=&quot;https://terminalroot.com/tags#unix&quot;&gt;Unix&lt;/a&gt; or any &lt;a href=&quot;https://terminalroot.com/tags#bsd&quot;&gt;Unix-like&lt;/a&gt; system, DOS, &lt;a href=&quot;https://terminalroot.com/tags#windows&quot;&gt;Windows&lt;/a&gt;, OS/2 and AmigaOS).&lt;/p&gt;

&lt;p&gt;On &lt;a href=&quot;https://terminalroot.com/tags#gnu&quot;&gt;GNU&lt;/a&gt; systems (used by most Linux distros) it is a &lt;em&gt;shell builtin&lt;/em&gt;, meaning it’s a bit more complicated to create a &lt;a href=&quot;https://terminalroot.com/how-to-create-apply-and-use-the-patch-command/&quot;&gt;patch&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt; command is very useful, however, one of the most &lt;em&gt;annoying&lt;/em&gt; things is when you navigate into many folders and want to go back an exact number of steps, requiring commands like:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ../../../../../../
&lt;span class=&quot;c&quot;&gt;# Or&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In both cases above, you need to go back &lt;em&gt;6 times&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;But we can create a &lt;a href=&quot;https://terminalroot.com/tags#bash&quot;&gt;Bash function&lt;/a&gt; that reduces the amount of typing, making it faster and &lt;em&gt;like a boss&lt;/em&gt; to go back to the 6th folder without much difficulty, like this: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd -6&lt;/code&gt;. Just add this function below to the end of your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.bashrc&lt;/code&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[[&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;~ ^-[0-9]+&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
        &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;#-&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;0&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; i&amp;lt;n&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; i++&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do
            &lt;/span&gt;path+&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;../&quot;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;done
        &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;builtin cd&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$path&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else
        &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;builtin cd&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$@&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Then reload your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.bashrc&lt;/code&gt; with the command: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exec $SHELL&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source ~/.bashrc&lt;/code&gt; and then just test it:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-6&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In other words, use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-&lt;/code&gt;(dash/minus) followed by the number of folders you want to go back, examples: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd -8&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd -7&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd -11&lt;/code&gt;,…&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Remember that to go to your home folder, simply run: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt;(without arguments) and to return to where you were, use: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd -&lt;/code&gt; without specifying any number!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Simple and practical, isn’t it?!&lt;/p&gt;
</description>
        <pubDate>Fri, 20 Feb 2026 13:26:03 +0000</pubDate>
        <link>https://terminalroot.com/how-to-optimize-the-cd-command-to-go-back-multiple-folders-at-once/</link>
        <guid isPermaLink="true">https://terminalroot.com/how-to-optimize-the-cd-command-to-go-back-multiple-folders-at-once/</guid>
        
        <category>gnu</category>
        
        <category>bash</category>
        
        <category>shell</category>
        
        <category>commands</category>
        
        <category>terminal</category>
        
        
      </item>
    
      <item>
        <title>Vix: The &apos;Node.js&apos; of C++, Without a Garbage Collector</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/cpp/vix-cpp.jpg&quot; alt=&quot;Vix: The &apos;Node.js&apos; of C++, Without a Garbage Collector&quot; title=&quot;🌐 A C++20 runtime focused on building modern web servers and APIs, combining asynchronous I/O, modular architecture, and an extreme focus on performance.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vix&lt;/code&gt; is &lt;strong&gt;a modern runtime/framework in &lt;a href=&quot;https://terminalroot.com/tags#cpp&quot;&gt;C++20&lt;/a&gt;&lt;/strong&gt; for building high-performance and distributed backend applications (offline-first, peer-to-peer, etc.) — a native alternative to Node/Deno, featuring async HTTP, routing, ORM, and modules.&lt;/p&gt;

&lt;p&gt;It’s used to create &lt;strong&gt;web servers, APIs, and distributed applications in C++&lt;/strong&gt; with contemporary ergonomics (no garbage collector, no overhead from “old” frameworks). It features:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Async HTTP server (Asio)&lt;/li&gt;
  &lt;li&gt;Routing, middleware, native JSON&lt;/li&gt;
  &lt;li&gt;CLI for scaffold/build/run&lt;/li&gt;
  &lt;li&gt;Optional modules (ORM, WebSockets, utilities)
Everything is designed for performance and offline/P2P applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;p&gt;Clone the repository and compile with &lt;a href=&quot;https://terminalroot.com/tags#cmake&quot;&gt;CMake&lt;/a&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;git clone https://github.com/vixcpp/vix.git
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;vix
cmake &lt;span class=&quot;nt&quot;&gt;-S&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-B&lt;/span&gt; build &lt;span class=&quot;nt&quot;&gt;-DCMAKE_BUILD_TYPE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;Release
cmake &lt;span class=&quot;nt&quot;&gt;--build&lt;/span&gt; build &lt;span class=&quot;nt&quot;&gt;-j&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;blockquote&gt;
  &lt;p&gt;Optional: install headers/artifacts system-wide (according to the project docs).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To use it as a dependency in your project, include the compiled headers/libs and configure CMake to link with “vix”.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;basic-example-http-hello-world&quot;&gt;Basic Example (HTTP Hello world)&lt;/h2&gt;
&lt;p&gt;Create a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main.cpp&lt;/code&gt; file:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-cpp&quot; data-lang=&quot;cpp&quot;&gt;&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;vix.hpp&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;using&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;namespace&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;App&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[](&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Request&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Response&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;res&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;res&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;send&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hello world from Vix!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;8080&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Compile with your &lt;em&gt;CMakeLists&lt;/em&gt; that links the Vix runtime. When running, access &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;localhost:8080&lt;/code&gt;.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit: &lt;a href=&quot;https://github.com/vixcpp/vix&quot;&gt;https://github.com/vixcpp/vix&lt;/a&gt;&lt;/p&gt;

</description>
        <pubDate>Fri, 30 Jan 2026 12:52:19 +0000</pubDate>
        <link>https://terminalroot.com/vix-the-nodejs-of-cpp-without-a-garbage-collector/</link>
        <guid isPermaLink="true">https://terminalroot.com/vix-the-nodejs-of-cpp-without-a-garbage-collector/</guid>
        
        <category>cpp</category>
        
        <category>cppdaily</category>
        
        <category>web</category>
        
        <category>nodejs</category>
        
        
      </item>
    
      <item>
        <title>Copy Files via Command Line with C++</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/cpp/xclip.jpg&quot; alt=&quot;Copy Files via Command Line with C++&quot; title=&quot;🕸️ Your custom command, simple and fast!&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;How about the convenience of copying files via the command line? You can quickly create your own command with &lt;a href=&quot;https://terminalroot.com/tags#cpp&quot;&gt;C++&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;See the step-by-step guide below!&lt;/p&gt;

&lt;!-- SQUARE - GAMES ROOT --&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:inline-block;width:336px;height:280px&quot; data-ad-client=&quot;ca-pub-2838251107855362&quot; data-ad-slot=&quot;5351066970&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;dependencies&quot;&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;Example for distros that use APT as the package manager&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Look for corresponding names for your distro.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;build-essential libx11-dev libxcb1-dev libpng-dev&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Also compile and install &lt;a href=&quot;https://github.com/dacap/clip&quot;&gt;clip&lt;/a&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git clone https://github.com/dacap/clip
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;clip
cmake &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-B&lt;/span&gt; build
cmake &lt;span class=&quot;nt&quot;&gt;--build&lt;/span&gt; build
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;cmake &lt;span class=&quot;nt&quot;&gt;--install&lt;/span&gt; build&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;create-the-code&quot;&gt;Create the Code&lt;/h2&gt;
&lt;p&gt;Example: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main.cpp&lt;/code&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-cpp&quot; data-lang=&quot;cpp&quot;&gt;&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;clip.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;fstream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;sstream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;memory&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;auto&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[](){&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cerr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Use: xclip++ &amp;lt;file&amp;gt; [file...]&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Xclip&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;public:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ostringstream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

      &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ifstream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ios&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;binary&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cerr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Error opening: &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rdbuf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;&apos;\n&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

      &lt;span class=&quot;n&quot;&gt;clip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;auto&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xclip&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;make_unique&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;compile-and-install&quot;&gt;Compile and Install&lt;/h2&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;g++ main.cpp &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; xclip++ &lt;span class=&quot;nt&quot;&gt;-lclip&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lxcb&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lX11&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lpng&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-pthread&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; xclip++ /usr/local/bin/&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;use-easily&quot;&gt;Use Easily&lt;/h2&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;xclip++ file.txt
&lt;span class=&quot;c&quot;&gt;# Or multiple files&lt;/span&gt;
xclip++ file1.txt file2.md file3.cpp &lt;span class=&quot;c&quot;&gt;# ...&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;update-and-fix&quot;&gt;Update and Fix&lt;/h2&gt;

&lt;p&gt;If you notice, when trying to use the &lt;em&gt;pipe&lt;/em&gt; (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;|&lt;/code&gt;) it doesn’t work, for example:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cat &lt;/span&gt;file.txt | xclip++
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;Lorem Ipsum&apos;&lt;/span&gt; | xclip++
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To fix this, I added:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;unistd.h&amp;gt;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Overloaded the constructor: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Xclip(const std::string&amp;amp; content)&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clip::set_text(content);&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;And finally added &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setvbuf(stdout, NULL, _IONBF, 0);&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Code ready to use with pipe:&lt;/p&gt;

&lt;div class=&quot;language-cpp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;clip.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;fstream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;sstream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;memory&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;unistd.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;auto&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[](){&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cerr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Use: xclip++ &amp;lt;file&amp;gt; [file...]&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Xclip&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;public:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ostringstream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

      &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ifstream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ios&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;binary&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cerr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Error opening: &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rdbuf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;&apos;\n&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

      &lt;span class=&quot;n&quot;&gt;clip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;clip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;setvbuf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stdout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_IONBF&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

  &lt;span class=&quot;kt&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;has_pipe&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isatty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;STDIN_FILENO&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;has_pipe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ostringstream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ss&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;ss&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rdbuf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ss&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xclip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xclip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Compile and install:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;g++ main.cpp &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; xclip++ &lt;span class=&quot;nt&quot;&gt;-lclip&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lxcb&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lX11&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lpng&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-pthread&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; xclip++ /usr/local/bin/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you want a shorter command name, also run:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;mv &lt;/span&gt;xclip++ xclip
&lt;span class=&quot;nb&quot;&gt;sudo install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; xclip /usr/local/bin/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now just use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;xclip&lt;/code&gt; command, examples:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Single file:&lt;/span&gt;
xclip++ file.txt

&lt;span class=&quot;c&quot;&gt;# Multiple files:&lt;/span&gt;
xclip++ file1.txt file2.md file3.cpp &lt;span class=&quot;c&quot;&gt;# ...&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Via pipe:&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;My test&apos;&lt;/span&gt; | xclip
&lt;span class=&quot;nb&quot;&gt;cat &lt;/span&gt;file.txt | xclip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;p&gt;See also: &lt;a href=&quot;https://terminalroot.com.br/2020/10/copie-e-cole-via-linha-de-comando-do-linux-com-xclip.html&quot;&gt;Copy and Paste via Linux Command Line with xclip&lt;/a&gt;&lt;/p&gt;

</description>
        <pubDate>Fri, 02 Jan 2026 23:05:48 +0000</pubDate>
        <link>https://terminalroot.com/copy-files-via-command-line-with-cpp/</link>
        <guid isPermaLink="true">https://terminalroot.com/copy-files-via-command-line-with-cpp/</guid>
        
        <category>cpp</category>
        
        <category>cppdaily</category>
        
        <category>cli</category>
        
        <category>commands</category>
        
        <category>terminal</category>
        
        
      </item>
    
      <item>
        <title>Get to Know GNU Guix: A System for Programmers</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/gnu/gnu-guix/gnu-guix.jpg&quot; alt=&quot;Get to Know GNU Guix: A System for Programmers&quot; title=&quot;🦬 An operating system from the GNU project that proposes an interesting and different approach.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;GNU Guix&lt;/strong&gt; is a &lt;a href=&quot;https://terminalroot.com/tags#distros&quot;&gt;distro&lt;/a&gt;, package manager, and operating system from the &lt;a href=&quot;https://terminalroot.com/tags#gnu&quot;&gt;GNU&lt;/a&gt; project that proposes a radically different approach from most &lt;a href=&quot;https://terminalroot.com/tags#gnulinux&quot;&gt;GNU/Linux&lt;/a&gt; distributions. It is based on &lt;strong&gt;functional management&lt;/strong&gt; (Guix System), focusing on &lt;strong&gt;reproducibility&lt;/strong&gt;, &lt;strong&gt;isolation&lt;/strong&gt;, and &lt;strong&gt;total system control&lt;/strong&gt; by the user.&lt;/p&gt;

&lt;p&gt;Similar to &lt;a href=&quot;https://terminalroot.com.br/2021/12/nixos-um-sistema-operacional-para-programadores.html&quot;&gt;NixOS&lt;/a&gt;, it uses the &lt;a href=&quot;https://www.gnu.org/software/guile/&quot;&gt;GNU Guile (Scheme)&lt;/a&gt; language to define packages, services, and the entire system configuration.&lt;/p&gt;

&lt;p&gt;Features:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;The output depends only on the inputs.&lt;/li&gt;
  &lt;li&gt;There are no side effects on the system.&lt;/li&gt;
  &lt;li&gt;Each package is installed in a unique directory in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/gnu/store&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Nothing overwrites anything.&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;Different versions of the same software coexist without conflict.&lt;/li&gt;
  &lt;li&gt;Instant rollback.&lt;/li&gt;
  &lt;li&gt;Independent profiles.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GNU Guix is widely used for: &lt;b&gt;Scientific Research&lt;/b&gt;, &lt;b&gt;DevOps&lt;/b&gt;, and &lt;b&gt;Security Auditing&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;Guix strictly adheres to the &lt;strong&gt;Free Software Foundation&lt;/strong&gt; guidelines, solidifying: Free Software Freedom.&lt;/p&gt;

&lt;p&gt;GNU Guix is not for those who want to “&lt;em&gt;just install and use&lt;/em&gt;”; it’s for those who want &lt;strong&gt;control&lt;/strong&gt;, &lt;strong&gt;predictability&lt;/strong&gt;, and &lt;strong&gt;truly declarative systems&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you see the operating system as code, Guix makes more sense than any traditional distro.&lt;/p&gt;

&lt;!-- SQUARE - GAMES ROOT --&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:inline-block;width:336px;height:280px&quot; data-ad-client=&quot;ca-pub-2838251107855362&quot; data-ad-slot=&quot;5351066970&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;download-and-installation&quot;&gt;Download and Installation&lt;/h2&gt;
&lt;p&gt;You can download the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.iso&lt;/code&gt; from the &lt;a href=&quot;https://guix.gnu.org/en/download/&quot;&gt;GNU Guix Downloads page&lt;/a&gt;. Choose the alternative that suits your interest. If you are installing on your physical machine, choose the first option: &lt;strong&gt;GNU Guix System (version)&lt;/strong&gt; 64-bit (&lt;em&gt;x86_64&lt;/em&gt;) or 32-bit (&lt;em&gt;i686&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;After booting from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.iso&lt;/code&gt; file, just follow the steps to install, which, by the way, is quite intuitive. The first screen will be this one. If you want ease, just choose the option using &lt;strong&gt;graphical mode&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/gnu/gnu-guix/01.png&quot; alt=&quot;GNU Guix install 01&quot; /&gt;&lt;/p&gt;

&lt;p&gt;GNU Guix does not use the commercial &lt;em&gt;Linux Kernel&lt;/em&gt; but offers you two types of &lt;em&gt;Kernels&lt;/em&gt;:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://pt.wikipedia.org/wiki/GNU_Hurd&quot;&gt;GNU Hurd&lt;/a&gt;, a kernel that is not yet finished but functional, which &lt;em&gt;separates tasks&lt;/em&gt;. Since Linux is considered a &lt;em&gt;systemd&lt;/em&gt; (like a multifunction printer) of kernels—it performs many tasks, which is considered a bad idea by many (including Tanenbaum, the creator of Minix, which inspired Linux);&lt;/li&gt;
  &lt;li&gt;and also &lt;a href=&quot;https://pt.wikipedia.org/wiki/GNU_Linux-libre&quot;&gt;GNU Linux-libre&lt;/a&gt;, an operating system kernel cleaned of all &lt;em&gt;binary blobs&lt;/em&gt; containing private firmware, some of them even created by the NSA.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The selection screen is this one:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/gnu/gnu-guix/02.png&quot; alt=&quot;GNU Guix&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;choosing-the-graphical-environment&quot;&gt;Choosing the Graphical Environment&lt;/h3&gt;
&lt;p&gt;During installation, you can also define your &lt;a href=&quot;https://terminalroot.com.br/2021/09/os-7-melhores-frameworks-cpp-para-criar-interface-grafica.html&quot;&gt;Desktop Environment&lt;/a&gt; or &lt;a href=&quot;https://terminalroot.com.br/2022/05/instale-esse-gerenciador-de-janelas-escrito-em-cpp.html&quot;&gt;Window Manager&lt;/a&gt;, or even install your own (e.g., KDE Plasma), which is not in the list later, but already on this screen there are options: &lt;a href=&quot;https://terminalroot.com/tags/#gnome&quot;&gt;GNOME&lt;/a&gt;, &lt;a href=&quot;https://terminalroot.com.br/2021/12/nixos-um-sistema-operacional-para-programadores.html&quot;&gt;XFCE&lt;/a&gt;, &lt;a href=&quot;https://terminalroot.com.br/2016/05/como-alterar-o-icone-do-painel.html&quot;&gt;MATE&lt;/a&gt;, Icewm, &lt;a href=&quot;https://terminalroot.com.br/2021/11/os-17-melhores-temas-para-seu-openbox.html&quot;&gt;Openbox&lt;/a&gt;, &lt;a href=&quot;https://awesomewm.org/&quot;&gt;AwesomeWM&lt;/a&gt;, &lt;a href=&quot;https://github.com/terroo/i3-radius&quot;&gt;i3&lt;/a&gt;, &lt;a href=&quot;https://www.nongnu.org/ratpoison/&quot;&gt;Ratpoison&lt;/a&gt;, and &lt;a href=&quot;https://github.com/emacs-exwm/exwm&quot;&gt;Emacs EXWM&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/gnu/gnu-guix/03.png&quot; alt=&quot;GNU Guix graphical&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After these basic choices, just partition your disk as desired and start the installation process… and then, after the reboot, just choose the system automatically in GRUB:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/gnu/gnu-guix/04.png&quot; alt=&quot;GNU Guix multiple screens&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;/h2&gt;
&lt;p&gt;To install anything, just use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;guix&lt;/code&gt; command without &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo&lt;/code&gt;. Example, installing &lt;a href=&quot;https://terminalroot.com.br/vim&quot;&gt;Vim&lt;/a&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;guix &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;vim&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Remember that GNU Guix offers independent profiles, so &lt;a href=&quot;https://terminalroot.com/tags#vim&quot;&gt;Vim&lt;/a&gt; will only be available for your user.&lt;/p&gt;

&lt;p&gt;If you want to install globally, add the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vim&lt;/code&gt; package to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;packages&lt;/code&gt; section of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;operating-system&lt;/code&gt; in the path: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/config.scm&lt;/code&gt;, example of inclusion on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;append&lt;/code&gt; line:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-scheme&quot; data-lang=&quot;scheme&quot;&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;use-modules&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;gnu&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;operating-system&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;;; ...&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;packages&lt;/span&gt;
   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;append&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;vim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;nv&quot;&gt;%base-packages&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;blockquote&gt;
  &lt;p&gt;If you need to reconfigure to see it: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo guix system reconfigure /etc/config.scm&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then just install with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo&lt;/code&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;guix &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;vim&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The package list has everything: &lt;a href=&quot;https://terminalroot.com/tags#gcc&quot;&gt;GNU GCC&lt;/a&gt;, &lt;a href=&quot;https://terminalroot.com/tags#make&quot;&gt;GNU Make&lt;/a&gt;, &lt;a href=&quot;https://terminalroot.com/tags#clang&quot;&gt;Clang/LLVM&lt;/a&gt;, &lt;a href=&quot;https://terminalroot.com/tags#cmake&quot;&gt;CMake&lt;/a&gt;, … For all packages, see:&lt;/p&gt;

&lt;h3 id=&quot;httpspackagesguixgnuorg&quot;&gt;&lt;a href=&quot;https://packages.guix.gnu.org/&quot;&gt;https://packages.guix.gnu.org/&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Or here: &lt;a href=&quot;https://hpc.guix.info/browse&quot;&gt;https://hpc.guix.info/browse&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/gnu/gnu-guix/05.png&quot; alt=&quot;GNU Guix Terminal Root&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit: &lt;a href=&quot;https://guix.gnu.org/&quot;&gt;https://guix.gnu.org/&lt;/a&gt;&lt;/p&gt;

</description>
        <pubDate>Thu, 01 Jan 2026 18:54:50 +0000</pubDate>
        <link>https://terminalroot.com/get-to-know-gnu-guix-a-system-for-programmers/</link>
        <guid isPermaLink="true">https://terminalroot.com/get-to-know-gnu-guix-a-system-for-programmers/</guid>
        
        
      </item>
    
      <item>
        <title>20 Alternatives for Sharing Code as Images</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/tips/code-img/code-img.jpg&quot; alt=&quot;20 Alternatives for Sharing Code as Images&quot; title=&quot;💻 Share your code snippets in a modern way.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;A few years ago, I published &lt;a href=&quot;https://terminalroot.com/best-alternatives-for-sharing-code-snippets/&quot;&gt;a list of good options for sharing code snippets&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now, with new tools emerging and others evolving, I’ve prepared an updated version: &lt;strong&gt;20 Alternatives for Sharing Code as Images&lt;/strong&gt;. If you’ve seen the old list, this is a continuation, but with IMAGES. If you haven’t, this new selection already includes what’s worth using today.&lt;/p&gt;

&lt;!-- SQUARE - GAMES ROOT --&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:inline-block;width:336px;height:280px&quot; data-ad-client=&quot;ca-pub-2838251107855362&quot; data-ad-slot=&quot;5351066970&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;01-rayso&quot;&gt;01. &lt;a href=&quot;https://ray.so/&quot;&gt;Ray.so&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Very clean and simple interface. Has light, dark, and gradient backgrounds. Allows adjusting padding, font size, and exporting as PNG.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/01.jpg&quot; alt=&quot;01&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;02-codeimage-appcodeimagedev&quot;&gt;02. &lt;a href=&quot;https://app.codeimage.dev/&quot;&gt;CodeImage (app.codeimage.dev)&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Highly configurable: themes, borders, windows, fonts. Great for those who want to “build” the image, not just copy and paste.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/02.jpg&quot; alt=&quot;02&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;03-snappify&quot;&gt;03. &lt;a href=&quot;https://snappify.com/&quot;&gt;Snappify&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Allows for more complex layouts: multiple code blocks, annotations, diagrams. Exports in PNG or SVG.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/03.jpg&quot; alt=&quot;03&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;04-codetoimg&quot;&gt;04. &lt;a href=&quot;https://codeimg.io/&quot;&gt;CodetoImg&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Simple (“no-frills”) interface for quickly turning code into an image. Allows for different themes and languages.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/04.jpg&quot; alt=&quot;04&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;05-chalkist&quot;&gt;05. &lt;a href=&quot;https://chalk.ist/&quot;&gt;Chalk.ist&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Has interesting modes like “diff mode” (showing differences between code versions). Allows customization of background, line numbers, reflection, etc.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/05.jpg&quot; alt=&quot;05&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;06-codepng&quot;&gt;06. &lt;a href=&quot;https://www.codepng.app/&quot;&gt;CodePNG&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Minimalist tool for generating simple and elegant images. Support for different languages, customizable font, and simple settings.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/06.jpg&quot; alt=&quot;06&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;07-polacode-vs-code&quot;&gt;07. &lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=pnp.polacode&quot;&gt;Polacode (VS Code)&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Extension for VS Code: generates a screenshot directly from the editor, preserving your theme. Very useful if you want to capture code snippets while you’re already programming.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/07.jpg&quot; alt=&quot;07&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;08-germanium&quot;&gt;08. &lt;a href=&quot;https://github.com/matsuyoshi30/germanium&quot;&gt;Germanium&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A CLI tool for generating code images.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/08.jpg&quot; alt=&quot;08&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;09-codekeep&quot;&gt;09. &lt;a href=&quot;https://codekeep.io/screenshot&quot;&gt;CodeKeep&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Generates organized images of snippets with a professional appearance.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/09.jpg&quot; alt=&quot;09&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;10-codesnap&quot;&gt;10. &lt;a href=&quot;https://codesnap.dev/&quot;&gt;CodeSnap&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Captures code snippets with highlighting and styled borders.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/10.jpg&quot; alt=&quot;10&quot; /&gt;&lt;/p&gt;

&lt;!-- RECTANGLE LARGE --&gt;
&lt;script async=&quot;&quot; src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;

&lt;!-- Informat --&gt;
&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-2838251107855362&quot; data-ad-slot=&quot;2327980059&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;11-showcode&quot;&gt;11. &lt;a href=&quot;https://showcode.app/&quot;&gt;ShowCode&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Transforms code into customized images for sharing.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/11.jpg&quot; alt=&quot;11&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;12-pika-code&quot;&gt;12. &lt;a href=&quot;https://pika.style/templates/code-image&quot;&gt;Pika Code&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Offers modern templates for generating code images.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/12.jpg&quot; alt=&quot;12&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;13-code-to-image-converter&quot;&gt;13. &lt;a href=&quot;https://10015.io/tools/code-to-image-converter&quot;&gt;Code to Image Converter&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Quick tool for converting code into adjustable images.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/13.jpg&quot; alt=&quot;13&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;14-hackreels&quot;&gt;14. &lt;a href=&quot;https://www.hackreels.com/&quot;&gt;HackReels&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Creates short, dynamic code videos for social media.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/14.jpg&quot; alt=&quot;14&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;15-codebit&quot;&gt;15. &lt;a href=&quot;https://codebit.xyz/&quot;&gt;Codebit&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Allows saving and sharing snippets in a clean visual style.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/15.jpg&quot; alt=&quot;15&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;16-snippetslab&quot;&gt;16. &lt;a href=&quot;https://www.renfei.org/snippets-lab/&quot;&gt;SnippetsLab&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Complete snippet manager for macOS.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/16.jpg&quot; alt=&quot;16&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;17-marmoset&quot;&gt;17. &lt;a href=&quot;https://chromewebstore.google.com/detail/marmoset/npkfpddkpefnmkflhhligbkofhnafieb?pli=1&quot;&gt;Marmoset&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Extension that generates styled screenshots directly in the browser.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/17.jpg&quot; alt=&quot;17&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;18-snippetshare&quot;&gt;18. &lt;a href=&quot;https://snippetshare.dev/&quot;&gt;SnippetShare&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Simple and fast sharing of code snippets.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/18.jpg&quot; alt=&quot;18&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;19-petrify&quot;&gt;19. &lt;a href=&quot;https://www.dangercove.com/petrify/&quot;&gt;Petrify&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Generates elegant code images with configurable themes.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/19.jpg&quot; alt=&quot;19&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;20-source-code-shots&quot;&gt;20. &lt;a href=&quot;https://sourcecodeshots.com/&quot;&gt;Source Code Shots&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Creates professional snippet images for posts and portfolios.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/dicas/code-img/20.jpg&quot; alt=&quot;20&quot; /&gt;&lt;/p&gt;

</description>
        <pubDate>Sat, 29 Nov 2025 17:10:36 +0000</pubDate>
        <link>https://terminalroot.com/20-alternatives-for-sharing-code-as-images/</link>
        <guid isPermaLink="true">https://terminalroot.com/20-alternatives-for-sharing-code-as-images/</guid>
        
        <category>tips</category>
        
        <category>programming</category>
        
        <category>cpp</category>
        
        
      </item>
    
  </channel>
</rss>
