<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Bash on Cesar Gimenes</title><link>https://crg.eti.br/tags/bash/</link><description>Recent content in Bash on Cesar Gimenes</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>crg@crg.eti.br (Cesar Gimenes)</managingEditor><webMaster>crg@crg.eti.br (Cesar Gimenes)</webMaster><lastBuildDate>Sat, 04 Jan 2025 11:48:47 -0300</lastBuildDate><atom:link href="https://crg.eti.br/tags/bash/index.xml" rel="self" type="application/rss+xml"/><item><title>Fork Bomb: From Code to Defense</title><link>https://crg.eti.br/pub/forkbomb-do-codigo-a-defesa/</link><pubDate>Sat, 04 Jan 2025 11:48:47 -0300</pubDate><author>crg@crg.eti.br (Cesar Gimenes)</author><guid>https://crg.eti.br/pub/forkbomb-do-codigo-a-defesa/</guid><description>&lt;p>The first time I heard about fork bombs was a long time ago. Although I found it fascinating that a piece of code could spawn two more processes of itself, causing exponential process growth and eventually freezing the system, I didn&amp;rsquo;t believe it was a viable attack until I discovered how many systems are vulnerable to code injection.&lt;/p>
&lt;h2 id="what-is-a-fork-bomb">What is a fork bomb?&lt;/h2>
&lt;p>In general terms, a fork bomb is code that spawns processes recursively. The first process spawns copies of itself, those copies spawn more copies, and so on, until the system runs out of resources and freezes. The result is a DoS (Denial of Service) attack.&lt;/p></description></item><item><title>Rewriting the Old TSR Using Bash</title><link>https://crg.eti.br/pub/reescrevendo-velho-tsr-usando-bash/</link><pubDate>Sat, 21 Dec 2024 17:26:25 -0300</pubDate><author>crg@crg.eti.br (Cesar Gimenes)</author><guid>https://crg.eti.br/pub/reescrevendo-velho-tsr-usando-bash/</guid><description>&lt;p>When I started programming, computing was different from today. The operating system was single-tasking; only one program could run at a time. There were no modern features like protected and mapped memory. Even so, it was possible to create concurrent behavior in programs, but you had to be careful to keep any part from blocking execution. For example, there could be no loops waiting for keyboard input or very long processes. Writing a non-blocking program was tricky in languages like Clipper.&lt;/p></description></item><item><title>A Script for Fast Directory Navigation Using fzf</title><link>https://crg.eti.br/pub/script-rapido-navegacao-diretorios-fzf/</link><pubDate>Sun, 24 Nov 2024 15:43:50 -0300</pubDate><author>crg@crg.eti.br (Cesar Gimenes)</author><guid>https://crg.eti.br/pub/script-rapido-navegacao-diretorios-fzf/</guid><description>&lt;p>This article presents a script to make directory navigation faster, continuing the series on reducing cognitive complexity.&lt;/p>
&lt;p>You often need to move between several directories in one or many projects. Remembering paths and locating files becomes an unnecessary effort.&lt;/p>
&lt;p>One solution is to keep a list of the most recently visited directories so you can switch between them quickly. Dave Eddy implemented this idea in his &lt;a href="https://github.com/bahamas10/bash-cdstack">cdstack&lt;/a>.&lt;/p>
&lt;p>Inspired by that approach, I built my own version, better suited to the way I work.&lt;/p></description></item><item><title>Reducing Cognitive Complexity in Programming</title><link>https://crg.eti.br/pub/diminuindo-a-complexidade-cognitiva-na-programacao/</link><pubDate>Sat, 23 Nov 2024 21:28:27 -0300</pubDate><author>crg@crg.eti.br (Cesar Gimenes)</author><guid>https://crg.eti.br/pub/diminuindo-a-complexidade-cognitiva-na-programacao/</guid><description>&lt;p>I spend a lot of time and effort reducing cognitive complexity when I program.&lt;/p>
&lt;p>Cognitive complexity is how much you have to think to get a task done. Small details can make a task unnecessarily complex.&lt;/p>
&lt;p>For example, finding a snippet of code hidden among many files inside a large directory structure takes effort. Even if the structure is familiar and well designed, the goal is not to navigate through it opening files until you find the code to edit; the goal is simply to edit the code. Anything beyond that is wasted cognitive effort.&lt;/p></description></item><item><title>Deploying Applications Using curl</title><link>https://crg.eti.br/pub/deploy_de_aplicacoes_usando_curl/</link><pubDate>Sat, 09 Mar 2024 11:45:51 -0300</pubDate><author>crg@crg.eti.br (Cesar Gimenes)</author><guid>https://crg.eti.br/pub/deploy_de_aplicacoes_usando_curl/</guid><description>&lt;p>Small teams face several challenges when distributing binaries these days. If you simply put an application up for download on a website, search tools will immediately flag your site as suspicious content. Browsers show the user a scary warning, and there is no way to remove it, even with a signed binary. The warning only goes away once enough users have downloaded your binary without reporting problems.&lt;/p>
&lt;p>Letting the user download the binary from some already well-known site, even GitHub, isn&amp;rsquo;t ideal, especially for closed-source applications.&lt;/p></description></item></channel></rss>