<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/feed/styles.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Mohammad Abu Mattar | Cheatsheets</title><description>The latest Cheatsheets from Mohammad Abu Mattar.</description><link>https://cheatsheets.mkabumattar.com/</link><item><title>Python Virtual Environments Cheatsheet</title><link>https://cheatsheets.mkabumattar.com/python-venv/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/python-venv/</guid><description>A practical reference for venv, pip, requirements files, pyenv version switching, and pipx for isolated global tools.</description><pubDate>Mon, 17 Aug 2026 13:43:57 GMT</pubDate><content:encoded>&lt;p&gt;A fast reference for keeping Python projects isolated and reproducible. It covers creating and activating environments with venv, installing packages with pip, locking dependencies with requirements files and pip-tools, switching interpreter versions with pyenv, and installing global CLI tools cleanly with pipx.&lt;/p&gt;
</content:encoded><category>Python</category><category>Development Tools</category><category>Dependency Management</category><author>Mohammad Abu Mattar</author></item><item><title>GitHub Actions</title><link>https://cheatsheets.mkabumattar.com/github-actions/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/github-actions/</guid><description>The workflow YAML you write over and over. Triggers, jobs and steps, secrets, matrix builds, caching, artifacts, and reusable workflows in one reference.</description><pubDate>Tue, 04 Aug 2026 15:27:06 GMT</pubDate><content:encoded>&lt;p&gt;GitHub Actions runs your CI/CD directly from YAML files in &lt;code&gt;.github/workflows/&lt;/code&gt;, and most of the job is knowing which key does what. A workflow reacts to events, splits into jobs that run on runners, and each job is an ordered list of steps that either call a reusable action or run a shell command.&lt;/p&gt;
&lt;p&gt;This cheatsheet walks the parts you touch on every pipeline: triggers that decide when things run, the job and step structure, &lt;code&gt;env&lt;/code&gt; and secrets across their three scopes, matrix builds for testing many versions at once, caching and artifacts to stay fast, and reusable workflows and composite actions to stop copy-pasting the same YAML into every repo.&lt;/p&gt;
&lt;h2&gt;Key features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Trigger precisely&lt;/strong&gt;: filter &lt;code&gt;push&lt;/code&gt; and &lt;code&gt;pull_request&lt;/code&gt; by branch and path, plus &lt;code&gt;schedule&lt;/code&gt; and &lt;code&gt;workflow_dispatch&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structure jobs&lt;/strong&gt;: &lt;code&gt;needs&lt;/code&gt; for ordering, &lt;code&gt;if&lt;/code&gt; for conditions, &lt;code&gt;runs-on&lt;/code&gt; for the machine.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Handle secrets safely&lt;/strong&gt;: three &lt;code&gt;env&lt;/code&gt; scopes, masked &lt;code&gt;secrets&lt;/code&gt;, and a least-privilege &lt;code&gt;GITHUB_TOKEN&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scale and reuse&lt;/strong&gt;: matrix builds, dependency caching, artifacts, reusable workflows, and composite actions.&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>CI/CD</category><category>DevOps</category><category>GitHub</category><category>Automation</category><category>YAML</category><author>Mohammad Abu Mattar</author></item><item><title>Linux Networking</title><link>https://cheatsheets.mkabumattar.com/linux-networking/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/linux-networking/</guid><description>The commands you reach for to diagnose and manage Linux networks. ip for interfaces and routes, ss for sockets, dig for DNS, traceroute for paths, and tcpdump for packets.</description><pubDate>Tue, 21 Jul 2026 15:07:31 GMT</pubDate><content:encoded>&lt;p&gt;Every Linux box speaks the network through a small set of tools, and knowing them turns &amp;quot;the network is broken&amp;quot; into a specific, fixable answer. This cheatsheet covers the modern stack: &lt;code&gt;ip&lt;/code&gt; for interfaces and routes, &lt;code&gt;ss&lt;/code&gt; for sockets, &lt;code&gt;dig&lt;/code&gt; for DNS, &lt;code&gt;traceroute&lt;/code&gt; for the path, &lt;code&gt;tcpdump&lt;/code&gt; for the raw packets, and &lt;code&gt;curl&lt;/code&gt; for the application layer.&lt;/p&gt;
&lt;p&gt;When something won&amp;#39;t connect, work up the layers. Confirm the interface has an address and a route (&lt;code&gt;ip&lt;/code&gt;), check the port is listening (&lt;code&gt;ss&lt;/code&gt;), make sure the name resolves (&lt;code&gt;dig&lt;/code&gt;), trace where packets die (&lt;code&gt;traceroute&lt;/code&gt;), and only then capture the wire (&lt;code&gt;tcpdump&lt;/code&gt;) or test the app (&lt;code&gt;curl&lt;/code&gt;).&lt;/p&gt;
&lt;h2&gt;Key features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;One tool per layer&lt;/strong&gt;: &lt;code&gt;ip&lt;/code&gt; for L2/L3, &lt;code&gt;ss&lt;/code&gt; for sockets, &lt;code&gt;dig&lt;/code&gt; for DNS, &lt;code&gt;tcpdump&lt;/code&gt; for packets, &lt;code&gt;curl&lt;/code&gt; for HTTP.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modern replacements&lt;/strong&gt;: &lt;code&gt;ip&lt;/code&gt; supersedes &lt;code&gt;ifconfig&lt;/code&gt;/&lt;code&gt;route&lt;/code&gt;, and &lt;code&gt;ss&lt;/code&gt; supersedes &lt;code&gt;netstat&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ground truth on demand&lt;/strong&gt;: &lt;code&gt;tcpdump&lt;/code&gt; shows the actual bytes when higher-level tools disagree.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scriptable diagnostics&lt;/strong&gt;: &lt;code&gt;dig +short&lt;/code&gt; and &lt;code&gt;curl -w&lt;/code&gt; give clean, parseable output for automation.&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>Linux</category><category>Networking</category><category>DevOps</category><category>CLI</category><category>SysAdmin</category><author>Mohammad Abu Mattar</author></item><item><title>kubectl</title><link>https://cheatsheets.mkabumattar.com/kubectl/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/kubectl/</guid><description>kubectl is the command-line tool for talking to a Kubernetes cluster. Use it to deploy apps, inspect and manage resources, stream logs, and debug running pods.</description><pubDate>Wed, 27 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;kubectl is the command-line tool you use to talk to a Kubernetes cluster. Whatever you can do through a dashboard, you can do faster here: deploy apps, inspect resources, stream logs, run commands inside containers, and take nodes in and out of service.&lt;/p&gt;
&lt;p&gt;The mental model is simple. You tell kubectl a verb and a resource (&lt;code&gt;get pods&lt;/code&gt;, &lt;code&gt;delete deployment&lt;/code&gt;, &lt;code&gt;apply -f file.yaml&lt;/code&gt;), it talks to the cluster&amp;#39;s API server, and the cluster does the work. Get comfortable with &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;describe&lt;/code&gt;, &lt;code&gt;logs&lt;/code&gt;, and &lt;code&gt;apply&lt;/code&gt; and you&amp;#39;re already most of the way there.&lt;/p&gt;
&lt;h2&gt;Key features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;One tool for everything&lt;/strong&gt;: deploy, inspect, update, scale, and debug from a single CLI.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Declarative or imperative&lt;/strong&gt;: apply YAML you keep in Git, or fire off quick one-off commands.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flexible output&lt;/strong&gt;: reshape any command into wide tables, JSON, YAML, JSONPath, or custom columns for scripting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Built-in debugging&lt;/strong&gt;: stream logs, exec into containers, attach ephemeral debug containers, and forward ports to your laptop.&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>DevOps</category><category>Kubernetes</category><category>CLI</category><category>Container Orchestration</category><category>Cloud Native</category><author>Mohammad Abu Mattar</author></item><item><title>Terraform Cheatsheet</title><link>https://cheatsheets.mkabumattar.com/terraform/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/terraform/</guid><description>Practical Terraform cheatsheet covering the core CLI commands, state management, import, workspaces, and key HCL patterns for variables, locals, outputs, dynamic blocks, and more. Useful for daily IaC workflows.</description><pubDate>Sat, 28 Mar 2026 20:02:59 GMT</pubDate><content:encoded>&lt;p&gt;A practical cheatsheet covering the Terraform CLI commands engineers reach for constantly: init, plan, apply, import, taint, and state operations. It also covers the key HCL patterns for variables, locals, outputs, and dynamic blocks.&lt;/p&gt;
&lt;p&gt;The sections below cover Terraform commands, syntax, and examples.&lt;/p&gt;
</content:encoded><category>Infrastructure as Code</category><category>DevOps</category><author>Mohammad Abu Mattar</author></item><item><title>AWS CLI</title><link>https://cheatsheets.mkabumattar.com/aws-cli/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/aws-cli/</guid><description>An expert reference for the AWS CLI covering configuration precedence, EC2 lifecycle control, recursive S3 operations, JMESPath querying, output formatting, and secure SSM sessions.</description><pubDate>Wed, 25 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The AWS Command Line Interface (CLI) lets you orchestrate infrastructure, move cloud data, and configure security entirely from the terminal. This reference covers configuring identity profiles, managing EC2 instances, synchronizing S3 buckets, creating IAM roles, querying nested JSON with JMESPath, formatting output, and securing access with Systems Manager.&lt;/p&gt;
&lt;p&gt;Later sections add pagination and waiters, STS cross-account access, CloudWatch Logs, Lambda, Secrets Manager and Parameter Store, and ECR with ECS deployments.&lt;/p&gt;
</content:encoded><category>Cloud Computing</category><category>AWS</category><category>DevOps</category><category>CLI</category><category>Automation</category><author>Mohammad Abu Mattar</author></item><item><title>Docker Swarm</title><link>https://cheatsheets.mkabumattar.com/docker-swarm/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/docker-swarm/</guid><description>Docker Swarm reference guide covering swarm initialization, node management, services, stacks, overlay networking, secrets, configs, rolling updates, and cluster monitoring.</description><pubDate>Sat, 07 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This cheatsheet is a reference for managing Docker Swarm clusters, services, and stacks. It covers the commands and best practices for scaling, updating, and monitoring your swarm applications.&lt;/p&gt;
</content:encoded><category>DevOps</category><category>Docker</category><category>Containers</category><category>Orchestration</category><category>Deployment</category><author>Mohammad Abu Mattar</author></item><item><title>Ansible</title><link>https://cheatsheets.mkabumattar.com/ansible/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/ansible/</guid><description>Ansible cheatsheet covering playbooks, inventories, roles, tasks, variables, handlers, ad-hoc commands, modules, and configuration options.</description><pubDate>Sat, 28 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Ansible is an automation tool for configuration management, application deployment, and orchestration. This cheatsheet is a quick reference for common Ansible tasks, modules, and best practices.&lt;/p&gt;
</content:encoded><category>Reference</category><author>Mohammad Abu Mattar</author></item><item><title>Chef</title><link>https://cheatsheets.mkabumattar.com/chef/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/chef/</guid><description>Chef reference guide covering installation, cookbooks, recipes, resources, knife commands, server management, and automation workflows for infrastructure configuration management.</description><pubDate>Sat, 28 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Chef is an Infrastructure as Code platform for automating infrastructure configuration, deployment, and management. This cheatsheet covers Chef concepts, commands, patterns, and best practices for managing infrastructure with Chef Infra, Chef Server, and related tools.&lt;/p&gt;
</content:encoded><category>Reference</category><author>Mohammad Abu Mattar</author></item><item><title>Docker Compose</title><link>https://cheatsheets.mkabumattar.com/docker-compose/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/docker-compose/</guid><description>Docker Compose reference guide covering services, volumes, networks, ports, environment variables, commands, configurations, and container orchestration best practices.</description><pubDate>Sat, 28 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Docker Compose is a tool for defining and running multi-container Docker applications. It uses a YAML file to configure application services, networks, and volumes. This cheatsheet provides a quick reference for common Docker Compose commands, configuration options, best practices, and troubleshooting tips.&lt;/p&gt;
</content:encoded><category>Reference</category><author>Mohammad Abu Mattar</author></item><item><title>Dockerfile</title><link>https://cheatsheets.mkabumattar.com/dockerfile/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/dockerfile/</guid><description>Dockerfile reference guide covering FROM, RUN, COPY, EXPOSE, CMD, ENTRYPOINT, environment variables, build optimization, best practices, and container image construction.</description><pubDate>Sat, 28 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This cheat sheet covers the core Dockerfile instructions, best practices, and common pitfalls for building small, secure Docker images. Each section pairs a Dockerfile snippet with the build output it produces, plus notes on how the instruction behaves.&lt;/p&gt;
</content:encoded><category>Reference</category><author>Mohammad Abu Mattar</author></item><item><title>PostgreSQL</title><link>https://cheatsheets.mkabumattar.com/postgresql/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/postgresql/</guid><description>PostgreSQL reference guide covering psql commands, database creation, tables, queries, functions, joins, transactions, indexes, and advanced SQL operations.</description><pubDate>Sat, 28 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;PostgreSQL reference guide covering psql commands, database creation, tables, queries, functions, joins, transactions, indexes, and advanced SQL operations.&lt;/p&gt;
</content:encoded><category>Reference</category><author>Mohammad Abu Mattar</author></item><item><title>Redis</title><link>https://cheatsheets.mkabumattar.com/redis/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/redis/</guid><description>Redis reference guide covering commands, data types, keys, strings, lists, sets, hashes, sorted sets, transactions, pub/sub, and caching strategies.</description><pubDate>Sat, 28 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Redis reference guide covering commands, data types, keys, strings, lists, sets, hashes, sorted sets, transactions, pub/sub, and caching strategies.&lt;/p&gt;
</content:encoded><category>Reference</category><author>Mohammad Abu Mattar</author></item><item><title>SSH</title><link>https://cheatsheets.mkabumattar.com/ssh/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/ssh/</guid><description>SSH cheatsheet covering OpenSSH client usage, authentication methods, port forwarding, key management, X11 forwarding, and configuration options. Includes real-world examples and security best practices.</description><pubDate>Sat, 28 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;export const components = {
  h1: &amp;#39;h1&amp;#39;,
  h2: &amp;#39;h2&amp;#39;,
  h3: &amp;#39;h3&amp;#39;,
  h4: &amp;#39;h4&amp;#39;,
  h5: &amp;#39;h5&amp;#39;,
  h6: &amp;#39;h6&amp;#39;,
  p: &amp;#39;p&amp;#39;,
  a: &amp;#39;a&amp;#39;,
  ul: &amp;#39;ul&amp;#39;,
  ol: &amp;#39;ol&amp;#39;,
  li: &amp;#39;li&amp;#39;,
  code: &amp;#39;code&amp;#39;,
  pre: &amp;#39;pre&amp;#39;,
  strong: &amp;#39;strong&amp;#39;,
  em: &amp;#39;em&amp;#39;,
  blockquote: &amp;#39;blockquote&amp;#39;,
  table: &amp;#39;table&amp;#39;,
  th: &amp;#39;th&amp;#39;,
  tr: &amp;#39;tr&amp;#39;,
  td: &amp;#39;td&amp;#39;,
};&lt;/p&gt;
</content:encoded><category>Reference</category><author>Mohammad Abu Mattar</author></item><item><title>VS Code</title><link>https://cheatsheets.mkabumattar.com/vscode/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/vscode/</guid><description>Complete VS Code keyboard shortcuts reference including command palette, navigation, editing, debugging, multicursor operations, and advanced features for macOS and Windows/Linux</description><pubDate>Sat, 28 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A quick reference for Visual Studio Code: keyboard shortcuts, editor features, and working habits for editing and navigation.&lt;/p&gt;
</content:encoded><category>Editor</category><category>Text Editor</category><category>Developer Tools</category><category>Productivity</category><category>Programming</category><category>Shortcuts</category><author>Mohammad Abu Mattar</author></item><item><title>AWK</title><link>https://cheatsheets.mkabumattar.com/awk/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/awk/</guid><description>AWK is a text processing language for pattern scanning and data extraction. Used to process text files, extract columns, and perform calculations on text data.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;AWK complete reference guide&lt;/h2&gt;
&lt;h3&gt;Quick start&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Print entire file
awk &amp;#39;{ print }&amp;#39; file.txt

# Print specific column
awk &amp;#39;{ print $1 }&amp;#39; file.txt

# Print lines matching pattern
awk &amp;#39;/pattern/ { print }&amp;#39; file.txt

# Sum all numbers in first column
awk &amp;#39;{ sum += $1 } END { print sum }&amp;#39; numbers.txt

# Replace text pattern
awk &amp;#39;{ gsub(/old/, &amp;quot;new&amp;quot;); print }&amp;#39; file.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;AWK program structure&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;awk &amp;#39;[BEGIN block] [pattern { action }] [END block]&amp;#39; [options] [file]
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Essential built-in variables&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variable&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;NR&lt;/td&gt;
&lt;td&gt;Total record number (line)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FNR&lt;/td&gt;
&lt;td&gt;File record number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NF&lt;/td&gt;
&lt;td&gt;Number of fields&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FS&lt;/td&gt;
&lt;td&gt;Field separator (input)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OFS&lt;/td&gt;
&lt;td&gt;Output field separator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RS&lt;/td&gt;
&lt;td&gt;Record separator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ORS&lt;/td&gt;
&lt;td&gt;Output record separator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FILENAME&lt;/td&gt;
&lt;td&gt;Current filename&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ARGC&lt;/td&gt;
&lt;td&gt;Argument count&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ARGV&lt;/td&gt;
&lt;td&gt;Argument array&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ENVIRON&lt;/td&gt;
&lt;td&gt;Environment variables&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RSTART&lt;/td&gt;
&lt;td&gt;Start of match (from match())&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RLENGTH&lt;/td&gt;
&lt;td&gt;Length of match&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;Field variables&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;$0     # Entire line
$1     # First field
$2     # Second field
$NF    # Last field
$(NF-1) # Second-to-last field
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;String functions reference&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;length(str)           # String length
substr(str, s, l)     # Substring (start, length)
index(str, substr)    # Find substring position
split(str, arr, sep)  # Split string into array
sub(regex, repl)      # Replace first match
gsub(regex, repl)     # Replace all matches
match(str, regex)     # Test match, set RSTART/RLENGTH
tolower(str)          # Convert to lowercase
toupper(str)          # Convert to uppercase
sprintf(fmt, ...)     # Format string
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Math functions reference&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;int(x)        # Integer part
sqrt(x)       # Square root
sin(x)        # Sine (radians)
cos(x)        # Cosine (radians)
atan2(y,x)    # Arctangent
exp(x)        # e^x
log(x)        # Natural logarithm
rand()        # Random 0-1
srand(seed)   # Seed random
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Operators quick reference&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Arithmetic: +, -, *, /, %, ^
# Comparison: &amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=, ==, !=
# Logical: &amp;amp;&amp;amp;, ||, !
# String: ~ (match), !~ (not match)
# Assignment: =, +=, -=, *=, /=, %=, ^=, ++, --
# Ternary: condition ? true_val : false_val
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Command-line options&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;-F sep         # Set field separator
-v var=val     # Set variable
-f script.awk  # Read program from file
-W version     # Show version
--posix        # POSIX mode
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Common one-liners&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Print line numbers
awk &amp;#39;{ print NR, $0 }&amp;#39; file

# Print lines longer than 80 characters
awk &amp;#39;length($0) &amp;gt; 80 { print }&amp;#39; file

# Print every nth line
awk &amp;#39;NR % n == 0 { print }&amp;#39; file

# Reverse lines
awk &amp;#39;{ arr[NR] = $0 } END { for (i=NR; i&amp;gt;0; i--) print arr[i] }&amp;#39; file

# Print lines where column 2 &amp;gt; 100
awk &amp;#39;$2 &amp;gt; 100 { print }&amp;#39; file

# Transpose CSV
awk -F&amp;#39;,&amp;#39; &amp;#39;{ for(i=1;i&amp;lt;=NF;i++) a[i,NR]=$i } END { for(i=1;i&amp;lt;=NF;i++) { for(j=1;j&amp;lt;=NR;j++) printf &amp;quot;%s%s&amp;quot;, a[i,j], (j==NR?&amp;quot;\n&amp;quot;:&amp;quot;,&amp;quot;); print &amp;quot;&amp;quot; } }&amp;#39; file
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Tips and best practices&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use single quotes to prevent shell interpretation&lt;/li&gt;
&lt;li&gt;Use -F flag to set different field separators&lt;/li&gt;
&lt;li&gt;Combine awk with pipes and other tools (grep, sort, uniq)&lt;/li&gt;
&lt;li&gt;Save complex programs in .awk files with -f flag&lt;/li&gt;
&lt;li&gt;Use printf for formatted output&lt;/li&gt;
&lt;li&gt;Initialize variables in BEGIN block&lt;/li&gt;
&lt;li&gt;Test on small files before processing large datasets&lt;/li&gt;
&lt;li&gt;Use comments (#) to document complex logic&lt;/li&gt;
&lt;li&gt;Consider performance with large files (avoid unnecessary loops)&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>Terminal</category><category>Text Processing</category><category>Linux</category><category>Command Line</category><category>Development Tools</category><category>Scripting</category><author>Mohammad Abu Mattar</author></item><item><title>Chmod</title><link>https://cheatsheets.mkabumattar.com/chmod/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/chmod/</guid><description>Complete chmod reference with numeric and symbolic permissions, special bits, directory permissions, and practical examples for managing file access</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Complete chmod reference covering file permissions, recursive changes with -v and -c, reference mode, logical operators, batch operations, practical examples, and security best practices for Linux file management.&lt;/p&gt;
</content:encoded><category>Terminal</category><category>Programming</category><category>Linux</category><category>File Management</category><category>Tools</category><author>Mohammad Abu Mattar</author></item><item><title>Cron</title><link>https://cheatsheets.mkabumattar.com/cron/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/cron/</guid><description>Cron is a time-based job scheduler in Unix/Linux for running scripts or commands periodically. Covers crontab syntax, scheduling patterns, and management commands.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Quick reference&lt;/h2&gt;
&lt;h3&gt;Field layout&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;Min  Hour Day  Month Weekday  Command
 *    *    *    *     *       /path/to/command

 ┬    ┬    ┬    ┬     ┬
 │    │    │    │     └─────  Weekday (0=Sunday, 6=Saturday)
 │    │    │    └──────────  Month (1-12)
 │    │    └───────────────  Day (1-31)
 │    └────────────────────  Hour (0-23)
 └─────────────────────────  Minute (0-59)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Operators&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operator&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Any&lt;/td&gt;
&lt;td&gt;&lt;code&gt;* * * * *&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Every minute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;,&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0,30 * * * *&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Minutes 0 and 30&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Range&lt;/td&gt;
&lt;td&gt;&lt;code&gt;9-17 * * * *&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;9 AM to 5 PM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Step&lt;/td&gt;
&lt;td&gt;&lt;code&gt;*/15 * * * *&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Every 15 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;Special strings&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;String&lt;/th&gt;
&lt;th&gt;Frequency&lt;/th&gt;
&lt;th&gt;Equivalent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;code&gt;@reboot&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Run at startup&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;@hourly&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Every hour&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0 * * * *&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;@daily&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Every day&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0 0 * * *&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;@weekly&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Every week&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0 0 * * 0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;@monthly&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Every month&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0 0 1 * *&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;@yearly&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Every year&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0 0 1 1 *&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;Common patterns&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pattern&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;code&gt;0 * * * *&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Every hour&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*/15 * * * *&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Every 15 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;0 0 * * *&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Daily at midnight&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;0 9 * * 1-5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;9 AM on weekdays&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;0 0 * * 0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sunday at midnight&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;0 0 1 * *&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1st of month at midnight&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;Essential commands&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;crontab -e              # Edit current user&amp;#39;s crontab
crontab -l              # List crontab jobs
crontab -r              # Delete current user&amp;#39;s crontab
crontab -u username -e  # Edit user&amp;#39;s crontab (root)
crontab -u username -l  # List user&amp;#39;s crontab (root)

# System-wide scheduling
ls /etc/cron.{hourly,daily,weekly,monthly}/
cat /etc/crontab
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;Crontab management&lt;/h2&gt;
&lt;h3&gt;Install from file&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;crontab /path/to/crontab.txt      # Replace entire crontab
crontab -l &amp;gt; backup.txt           # Backup before changes
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;System logs&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Debian/Ubuntu
journalctl -u cron -f             # Follow cron logs
grep CRON /var/log/syslog         # Historical logs

# CentOS/RHEL
tail -f /var/log/cron             # Follow cron logs
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;Environment setup&lt;/h2&gt;
&lt;p&gt;Always add at top of crontab file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOME=/home/username
LOGNAME=username
MAILTO=admin@example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;Resources&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://man7.org/linux/man-pages/man5/crontab.5.html&quot;&gt;Official Crontab Manual&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://crontab.guru/&quot;&gt;Crontab Guru&lt;/a&gt;, a visual cron expression explainer&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://linux.die.net/man/5/crontab&quot;&gt;Linux Cron Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>Terminal</category><category>System Administration</category><category>Linux</category><category>Scheduling</category><category>Automation</category><category>Tools</category><author>Mohammad Abu Mattar</author></item><item><title>Curl</title><link>https://cheatsheets.mkabumattar.com/curl/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/curl/</guid><description>cURL is a command-line tool for making HTTP requests, transferring data using URLs, and testing APIs. Essential commands for web development and API testing.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Getting started with Curl&lt;/h2&gt;
&lt;p&gt;cURL (client URL) is a command-line tool for transferring data using URLs. It speaks HTTP, HTTPS, FTP, SFTP, and many other protocols, which makes it the usual choice for web development, API testing, and scripting. The common jobs are testing a REST API, downloading a file, and debugging an HTTP connection.&lt;/p&gt;
&lt;h2&gt;What makes cURL essential&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Protocols: HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TELNET, LDAP, LDAPS, and more&lt;/li&gt;
&lt;li&gt;Works with any web service or API over those protocols&lt;/li&gt;
&lt;li&gt;Scriptable, which makes requests repeatable in automation&lt;/li&gt;
&lt;li&gt;Verbose output for diagnosing connection and API issues&lt;/li&gt;
&lt;li&gt;No GUI required, and it runs on minimal resources&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Common use cases&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Test if an API endpoint is responding
curl https://api.github.com/users/github

# Download files
curl -O https://example.com/file.tar.gz

# POST data to a form
curl -X POST -d &amp;quot;username=user&amp;amp;password=pass&amp;quot; https://example.com/login

# Check API response status
curl -I https://api.example.com/health

# Debug API connections
curl -v https://api.example.com/endpoint
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Installation quick reference&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;macOS&lt;/strong&gt;: &lt;code&gt;brew install curl&lt;/code&gt;
&lt;strong&gt;Ubuntu/Debian&lt;/strong&gt;: &lt;code&gt;sudo apt-get install curl&lt;/code&gt;
&lt;strong&gt;CentOS/RHEL&lt;/strong&gt;: &lt;code&gt;sudo yum install curl&lt;/code&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: Download from &lt;a href=&quot;https://curl.se/download.html&quot;&gt;curl.se&lt;/a&gt; or &lt;code&gt;choco install curl&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Essential options reference&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-X GET/POST/PUT/DELETE/PATCH&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Specify HTTP method&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-H &amp;quot;Header: value&amp;quot;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Add custom header&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-d &amp;#39;data&amp;#39;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Send POST data (URL encoded)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-F &amp;quot;file=@path&amp;quot;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Upload file (multipart form)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-u user:pass&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;HTTP Basic authentication&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-b &amp;quot;cookie=value&amp;quot;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Send cookie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-c cookies.txt&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Save response cookies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-i&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Include response headers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-I&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Headers only (HEAD request)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-L&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Follow redirects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-v&lt;/code&gt; / &lt;code&gt;-vv&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Verbose output (debug)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Silent mode (no progress)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-o file.txt&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Save to file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-O&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Save with original filename&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-w &amp;quot;%{http_code}&amp;quot;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Custom output format&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-k&lt;/code&gt; / &lt;code&gt;--insecure&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Skip SSL verification (unsafe)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--cacert ca.pem&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Use custom CA certificate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--max-time 10&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Timeout after 10 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--compressed&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Request compression&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;HTTP methods quick start&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# GET - Retrieve data (default)
curl https://api.example.com/users

# POST - Create resource
curl -X POST -H &amp;quot;Content-Type: application/json&amp;quot; \
  -d &amp;#39;{&amp;quot;name&amp;quot;:&amp;quot;John&amp;quot;}&amp;#39; https://api.example.com/users

# PUT - Replace entire resource
curl -X PUT -H &amp;quot;Content-Type: application/json&amp;quot; \
  -d &amp;#39;{&amp;quot;name&amp;quot;:&amp;quot;Jane&amp;quot;,&amp;quot;age&amp;quot;:30}&amp;#39; https://api.example.com/users/1

# PATCH - Update specific fields
curl -X PATCH -H &amp;quot;Content-Type: application/json&amp;quot; \
  -d &amp;#39;{&amp;quot;age&amp;quot;:31}&amp;#39; https://api.example.com/users/1

# DELETE - Remove resource
curl -X DELETE https://api.example.com/users/1
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Workflow examples&lt;/h2&gt;
&lt;h3&gt;Testing a REST API&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# 1. Test get all users
curl https://api.example.com/users

# 2. Create a new user
curl -X POST -H &amp;quot;Content-Type: application/json&amp;quot; \
  -d &amp;#39;{&amp;quot;name&amp;quot;:&amp;quot;Alice&amp;quot;,&amp;quot;email&amp;quot;:&amp;quot;alice@example.com&amp;quot;}&amp;#39; \
  https://api.example.com/users

# 3. Get specific user
curl https://api.example.com/users/1

# 4. Update user
curl -X PATCH -H &amp;quot;Content-Type: application/json&amp;quot; \
  -d &amp;#39;{&amp;quot;email&amp;quot;:&amp;quot;alice.new@example.com&amp;quot;}&amp;#39; \
  https://api.example.com/users/1

# 5. Delete user
curl -X DELETE https://api.example.com/users/1
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Authenticated API requests&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Using bearer token
TOKEN=&amp;quot;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...&amp;quot;
curl -H &amp;quot;Authorization: Bearer $TOKEN&amp;quot; https://api.example.com/protected

# Using API key
API_KEY=&amp;quot;sk_live_abc123xyz789&amp;quot;
curl -H &amp;quot;X-API-Key: $API_KEY&amp;quot; https://api.example.com/data

# Using Basic auth
curl -u username:password https://api.example.com/protected

# OAuth2 flow
TOKEN=$(curl -X POST -d &amp;quot;client_id=xxx&amp;amp;client_secret=yyy&amp;amp;grant_type=client_credentials&amp;quot; https://auth.example.com/token | jq -r &amp;#39;.access_token&amp;#39;)
curl -H &amp;quot;Authorization: Bearer $TOKEN&amp;quot; https://api.example.com/data
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;File handling&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Download file
curl -o myfile.txt https://example.com/file.txt

# Upload file
curl -F &amp;quot;file=@myfile.txt&amp;quot; https://api.example.com/upload

# Download and extract
curl -s https://example.com/archive.tar.gz | tar xz

# Resume interrupted download
curl -C - -o largefile.iso https://example.com/largefile.iso

# Upload multiple files
curl -F &amp;quot;files=@file1.txt&amp;quot; -F &amp;quot;files=@file2.txt&amp;quot; https://api.example.com/upload-multiple
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Debugging and troubleshooting&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Verbose output (see all request/response details)
curl -v https://api.example.com/data

# More verbose (shows all low-level details)
curl -vv https://api.example.com/data

# Show headers only
curl -i https://api.example.com/data

# Check response time
curl -w &amp;quot;Total time: %{time_total}s\n&amp;quot; https://api.example.com/data

# Save full debug output
curl -v https://api.example.com/data &amp;gt; response.html 2&amp;gt; debug.txt

# Test with custom headers
curl -H &amp;quot;X-Custom: value&amp;quot; -v https://api.example.com/data
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Batch processing&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Check multiple endpoints
for url in api1.com api2.com api3.com; do
  echo -n &amp;quot;$url: &amp;quot;
  curl -s -o /dev/null -w &amp;quot;%{http_code}\n&amp;quot; &amp;quot;https://$url&amp;quot;
done

# Process JSON array response
curl -s https://api.example.com/users | jq -r &amp;#39;.[] | .email&amp;#39; | \
  while read email; do
    echo &amp;quot;Processing: $email&amp;quot;
    curl -X POST -H &amp;quot;Content-Type: application/json&amp;quot; \
      -d &amp;quot;{\&amp;quot;email\&amp;quot;:\&amp;quot;$email\&amp;quot;,\&amp;quot;status\&amp;quot;:\&amp;quot;active\&amp;quot;}&amp;quot; \
      https://api.example.com/notify
  done

# Parallel requests
for i in {1..10}; do
  curl -s &amp;quot;https://api.example.com/data/$i&amp;quot; &amp;amp;
done
wait
echo &amp;quot;All requests completed&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Performance tips&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;--compressed&lt;/code&gt; for APIs that support gzip/deflate compression&lt;/li&gt;
&lt;li&gt;Add timeouts with &lt;code&gt;--max-time&lt;/code&gt; and &lt;code&gt;--connect-timeout&lt;/code&gt; to prevent hanging&lt;/li&gt;
&lt;li&gt;Batch requests with &lt;code&gt;&amp;amp;&lt;/code&gt; and &lt;code&gt;wait&lt;/code&gt; for parallel execution&lt;/li&gt;
&lt;li&gt;Filter responses with &lt;code&gt;jq&lt;/code&gt; or &lt;code&gt;grep&lt;/code&gt; to reduce processing time&lt;/li&gt;
&lt;li&gt;Use HEAD requests (&lt;code&gt;-I&lt;/code&gt;) to check whether a resource exists without downloading it&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Common patterns&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Check if service is up&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;curl -f -s -o /dev/null -w &amp;quot;%{http_code}\n&amp;quot; https://api.example.com/health
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Loop with retry&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;for attempt in {1..3}; do
  curl -f https://api.example.com/data &amp;amp;&amp;amp; break
  [ $attempt -lt 3 ] &amp;amp;&amp;amp; sleep 2
done
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Extract and transform&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;curl -s https://api.example.com/users | jq &amp;#39;[.[] | select(.active) | {name, email}]&amp;#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Save with authentication&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;curl -u user:pass -H &amp;quot;Accept: application/json&amp;quot; https://api.example.com/data &amp;gt; data.json
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Best practices&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Use HTTPS for authenticated requests&lt;/li&gt;
&lt;li&gt;Check exit codes and HTTP status codes&lt;/li&gt;
&lt;li&gt;Store tokens and credentials in environment variables, not in scripts&lt;/li&gt;
&lt;li&gt;Check JSON syntax and validate responses before processing&lt;/li&gt;
&lt;li&gt;Prevent hanging requests with &lt;code&gt;--max-time&lt;/code&gt; and &lt;code&gt;--connect-timeout&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Redact sensitive data from logs&lt;/li&gt;
&lt;li&gt;Test API calls against staging before production use&lt;/li&gt;
&lt;li&gt;Comment curl commands to explain what they do and why&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;curl vs other tools&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;curl&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Command-line, scripts, quick testing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;wget&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Large file downloads, mirroring sites&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Postman&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Interactive API testing with GUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;HTTPie&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;More intuitive syntax, pretty output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Python requests&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Complex automation and data processing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Getting help&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Manual&lt;/strong&gt;: &lt;code&gt;man curl&lt;/code&gt; or &lt;code&gt;curl --help&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Online&lt;/strong&gt;: &lt;a href=&quot;https://curl.se/docs/&quot;&gt;curl.se docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Examples&lt;/strong&gt;: &lt;a href=&quot;https://ec.haxx.se/everything-curl.pdf&quot;&gt;Everything curl book&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Common Issues&lt;/strong&gt;: Check &lt;a href=&quot;https://curl.se/docs/faq.html&quot;&gt;curl troubleshooting guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Pro Tip&lt;/strong&gt;: Create a &lt;code&gt;.curlrc&lt;/code&gt; file in your home directory to store default options and headers for commonly used APIs. This keeps your commands clean and consistent across multiple requests.&lt;/p&gt;
</content:encoded><category>Terminal</category><category>Web Development</category><category>APIs</category><category>HTTP</category><category>Command Line</category><category>Tools</category><author>Mohammad Abu Mattar</author></item><item><title>Dart</title><link>https://cheatsheets.mkabumattar.com/dart/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/dart/</guid><description>Dart is a statically-typed, strongly null-safe programming language optimized for building fast, multi-platform applications, with async/await and object-oriented features.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Dart is a statically-typed, strongly null-safe programming language designed for building fast, multi-platform applications. Created by Google, Dart ships with its own compiler, formatter, and package manager for web, server, and mobile development.&lt;/p&gt;
&lt;p&gt;Language features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Strong Null Safety&lt;/strong&gt;: The type system separates nullable from non-nullable types, so null reference errors are caught at compile time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Async/Await&lt;/strong&gt;: First-class support for asynchronous programming with futures, streams, and async/await syntax.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Object-Oriented&lt;/strong&gt;: Full OOP support with classes, inheritance, mixins, and abstract classes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Generics&lt;/strong&gt;: A generic type system for reusable, type-safe code.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extensions&lt;/strong&gt;: Extend existing types with new methods without inheritance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Type Inference&lt;/strong&gt;: Automatic type inference while maintaining strict type safety.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hot Reload&lt;/strong&gt;: Rapid development cycle with instant code changes during debugging.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The categories below cover Dart syntax, advanced features, and best practices.&lt;/p&gt;
</content:encoded><category>Programming Language</category><category>Dart</category><category>Application Development</category><category>Type Safety</category><category>Null Safety</category><author>Mohammad Abu Mattar</author></item><item><title>Docker</title><link>https://cheatsheets.mkabumattar.com/docker/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/docker/</guid><description>Docker is a containerization platform for building, shipping, and running applications in isolated environments. This cheatsheet covers the core Docker CLI commands.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Docker is a containerization platform that packages applications with their dependencies into isolated, portable environments called containers. It enables developers to build, ship, and run applications consistently across different systems.&lt;/p&gt;
&lt;h2&gt;Benefits&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run the same environment in development, test, and production.&lt;/li&gt;
&lt;li&gt;Applications are isolated from each other and from the host system.&lt;/li&gt;
&lt;li&gt;A containerized application deploys to any system running Docker.&lt;/li&gt;
&lt;li&gt;Containers are lighter than virtual machines and start faster.&lt;/li&gt;
&lt;li&gt;Scale horizontally by running more containers.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Install Docker&lt;/strong&gt;: Follow the installation guide in the Getting Started section.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Run your first container&lt;/strong&gt;: &lt;code&gt;docker run -d -p 8080:80 nginx:latest&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Access the service&lt;/strong&gt;: Open &lt;a href=&quot;http://localhost:8080&quot;&gt;http://localhost:8080&lt;/a&gt; in your browser.&lt;/p&gt;
&lt;h2&gt;Common workflows&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Development&lt;/strong&gt;: Use containers to match production environment locally&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Building Images&lt;/strong&gt;: Create Dockerfiles and build images for your applications&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Running Services&lt;/strong&gt;: Run containers with proper networking and storage configuration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scaling&lt;/strong&gt;: Use container orchestration (Docker Swarm or Kubernetes) for production deployments&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The sections above cover Docker commands, networking, storage, and best practices for containerized applications.&lt;/p&gt;
</content:encoded><category>DevOps</category><category>Docker</category><category>Containers</category><category>Deployment</category><author>Mohammad Abu Mattar</author></item><item><title>Find</title><link>https://cheatsheets.mkabumattar.com/find/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/find/</guid><description>Complete find reference with file searching, filtering by type/size/time, permissions, advanced operations, and practical examples for locating files</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Best practices for find command usage&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Always quote patterns&lt;/strong&gt; to prevent shell expansion of special characters&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use -type f first&lt;/strong&gt; in find expressions for optimal performance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prune heavy directories early&lt;/strong&gt; like node_modules, .git, .venv&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use -maxdepth&lt;/strong&gt; to limit search depth and improve performance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test commands first&lt;/strong&gt; with -ls or -printf before using -delete&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use + instead of ;&lt;/strong&gt; with exec for better performance on many files&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Suppress permission errors&lt;/strong&gt; with 2&amp;gt;/dev/null for cleaner output&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Combine multiple criteria&lt;/strong&gt; to create efficient targeted searches&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use -xdev&lt;/strong&gt; to skip other filesystems when needed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Consider locate command&lt;/strong&gt; for quick name-only searches (faster than find)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Common errors and solutions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;Permission denied&amp;quot;&lt;/strong&gt; → Use 2&amp;gt;/dev/null to suppress or run with sudo&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;No such file or directory&amp;quot;&lt;/strong&gt; → Verify path exists and is readable&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;Unexpected operator or missing operand&amp;quot;&lt;/strong&gt; → Check parentheses are escaped: \( \)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;Syntax error near token&amp;quot;&lt;/strong&gt; → Verify \; or + is present after -exec&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;Find is too slow&amp;quot;&lt;/strong&gt; → Use -maxdepth, -prune, and -type filters&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;Deleted wrong files accidentally&amp;quot;&lt;/strong&gt; → Always preview with find first!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;Pattern not matching expected files&amp;quot;&lt;/strong&gt; → Test pattern with -ls before -delete&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;xtype/executable not recognized&amp;quot;&lt;/strong&gt; → Use newer GNU find; some options are GNU-specific&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;ref: &lt;a href=&quot;https://man7.org/linux/man-pages/man1/find.1.html&quot;&gt;https://man7.org/linux/man-pages/man1/find.1.html&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>Terminal</category><category>Programming</category><category>Linux</category><category>File Operations</category><category>Tools</category><author>Mohammad Abu Mattar</author></item><item><title>Git</title><link>https://cheatsheets.mkabumattar.com/git/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/git/</guid><description>Git is a distributed version control system for tracking code changes, collaborating with teams, and managing project history.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Git is a distributed version control system. Developers use it to track code changes, collaborate with teams, and manage project history. Most software teams build their workflow around it.&lt;/p&gt;
&lt;h2&gt;Key concepts&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Distributed&lt;/strong&gt;: Every developer has a complete copy of the repository history&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Branching&lt;/strong&gt;: Create isolated lines of development for features and fixes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Commits&lt;/strong&gt;: Snapshots of changes with descriptive messages&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Merging&lt;/strong&gt;: Combine changes from different branches&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tracking&lt;/strong&gt;: Monitor changes across files and identify who changed what&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Common use cases&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Collaborative Development&lt;/strong&gt;: Multiple developers working on same project&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Version Control&lt;/strong&gt;: Track all changes with full history&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Branching Strategy&lt;/strong&gt;: Feature branches, release branches, hotfix branches&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Code Review&lt;/strong&gt;: Pull requests and merge reviews before integration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rollback Capability&lt;/strong&gt;: Revert to previous states if needed&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Quick reference&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Initial Setup&lt;/strong&gt;: Configure your identity with &lt;code&gt;git config --global user.name&lt;/code&gt; and &lt;code&gt;user.email&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Start Project&lt;/strong&gt;: Use &lt;code&gt;git init&lt;/code&gt; for new repos or &lt;code&gt;git clone&lt;/code&gt; to download existing&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Save Work&lt;/strong&gt;: &lt;code&gt;git add&lt;/code&gt; files, then &lt;code&gt;git commit -m &amp;quot;message&amp;quot;&lt;/code&gt; to create snapshots&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Share Changes&lt;/strong&gt;: &lt;code&gt;git push&lt;/code&gt; to upload, &lt;code&gt;git pull&lt;/code&gt; to download updates&lt;/p&gt;
&lt;p&gt;The sections above cover Git workflows, starting with everyday commands and ending with rebase, bisect, and repository maintenance.&lt;/p&gt;
</content:encoded><category>Version Control</category><category>Git</category><category>SCM</category><category>Collaboration</category><category>Development Tools</category><author>Mohammad Abu Mattar</author></item><item><title>Go</title><link>https://cheatsheets.mkabumattar.com/go/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/go/</guid><description>Go is a statically typed, compiled programming language designed for simplicity, efficiency, and concurrent programming. It&apos;s ideal for building fast, scalable server applications and system tools.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Go is a statically typed, compiled programming language designed with simplicity and efficiency in mind. It excels at concurrent programming, which makes it a good fit for fast, scalable server applications and system tools.&lt;/p&gt;
&lt;p&gt;The sections below cover Go syntax, functions, concurrency patterns, and best practices.&lt;/p&gt;
</content:encoded><category>Programming Language</category><category>Go</category><category>Systems Programming</category><category>Web Development</category><category>Backend</category><category>Concurrency</category><author>Mohammad Abu Mattar</author></item><item><title>Grep</title><link>https://cheatsheets.mkabumattar.com/grep/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/grep/</guid><description>Complete grep reference with pattern matching, regular expressions, flags, context options, and practical examples for searching text files</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Best practices for grep usage&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Always quote patterns&lt;/strong&gt; to prevent shell interpretation of special characters&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use -E flag for complex patterns&lt;/strong&gt; to avoid escaping issues with basic regex&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test patterns on sample data&lt;/strong&gt; before running on production systems&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use -n with debugging&lt;/strong&gt; to quickly navigate to errors in code&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Combine with pipes&lt;/strong&gt; to build data processing pipelines&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use -F for literal strings&lt;/strong&gt; when you don&amp;#39;t need regex (much faster)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use -w for word boundaries&lt;/strong&gt; to avoid partial word matches in code&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use anchors&lt;/strong&gt; (^ for start, $ for end) to match precise patterns&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Exclude directories early&lt;/strong&gt; with grep -r to improve performance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use --color=always in pipes&lt;/strong&gt; to highlight matches in complex pipelines&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Common errors and solutions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;No such file or directory&amp;quot;&lt;/strong&gt; → Check file path exists and permissions are correct&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;grep: (standard input): No such device&amp;quot;&lt;/strong&gt; → Check input method; the piped input may not be valid&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;Invalid regular expression&amp;quot;&lt;/strong&gt; → Check regex syntax; escape special characters or use -F for literals&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;Binary file matches&amp;quot;&lt;/strong&gt; → Use -a flag or --binary-files=text to treat as text&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;Nothing found when expecting matches&amp;quot;&lt;/strong&gt; → Verify pattern is correct; test pattern syntax with sample data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;error: &amp;quot;Searching too slowly&amp;quot;&lt;/strong&gt; → Use -F for literals, limit results with -m, exclude directories with --exclude-dir&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;ref: &lt;a href=&quot;https://man7.org/linux/man-pages/man1/grep.1.html&quot;&gt;https://man7.org/linux/man-pages/man1/grep.1.html&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>Terminal</category><category>Programming</category><category>Linux</category><category>Text Processing</category><category>Tools</category><author>Mohammad Abu Mattar</author></item><item><title>Helm</title><link>https://cheatsheets.mkabumattar.com/helm/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/helm/</guid><description>Helm is the package manager for Kubernetes that simplifies deploying, managing, and upgrading applications through reusable charts. This cheatsheet covers the core Helm CLI commands and workflows.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Helm is the package manager for Kubernetes that simplifies the deployment, management, and upgrade of applications. It uses charts, which are templated Kubernetes manifests, to build reusable, configurable application packages.&lt;/p&gt;
&lt;h2&gt;Benefits&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Deploy an entire application stack with a single command.&lt;/li&gt;
&lt;li&gt;Share and reuse charts across projects and teams.&lt;/li&gt;
&lt;li&gt;Override values without editing templates.&lt;/li&gt;
&lt;li&gt;Track revisions and roll back to a previous release.&lt;/li&gt;
&lt;li&gt;Include and manage chart dependencies automatically.&lt;/li&gt;
&lt;li&gt;Deploy several instances with different configurations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Install Helm&lt;/strong&gt;: Follow the Installation Setup section.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Add a repository&lt;/strong&gt;: &lt;code&gt;helm repo add bitnami https://charts.bitnami.com/bitnami&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Search for charts&lt;/strong&gt;: &lt;code&gt;helm search repo nginx&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Install a chart&lt;/strong&gt;: &lt;code&gt;helm install my-web bitnami/nginx --create-namespace&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Check status&lt;/strong&gt;: &lt;code&gt;helm status my-web&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Common workflows&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;First Deploy&lt;/strong&gt;: Add repository, search chart, install with values&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configuration&lt;/strong&gt;: Customize with values files and flag overrides&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Upgrades&lt;/strong&gt;: Update releases with new chart versions and configuration changes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rollback&lt;/strong&gt;: Revert to previous versions if issues occur&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Chart Development&lt;/strong&gt;: Create custom charts for your applications&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Production&lt;/strong&gt;: Manage multiple environments with versioned, auditable deployments&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The sections above cover Helm from basic commands through production deployment practices.&lt;/p&gt;
</content:encoded><category>DevOps</category><category>Kubernetes</category><category>Helm</category><category>Package Management</category><category>Cloud Native</category><author>Mohammad Abu Mattar</author></item><item><title>JSON</title><link>https://cheatsheets.mkabumattar.com/json/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/json/</guid><description>JSON (JavaScript Object Notation) is a lightweight, text-based data format used for data exchange. It supports objects, arrays, strings, numbers, booleans, and null values, and every mainstream programming language can read it.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;JSON (JavaScript Object Notation) is a lightweight, text-based data exchange format. It&amp;#39;s universally supported across programming languages and provides a simple, readable way to structure and transmit data.&lt;/p&gt;
&lt;p&gt;Browse the sections below to explore JSON syntax, data types, and practical examples.&lt;/p&gt;
</content:encoded><category>Data Format</category><category>JSON</category><category>Data Serialization</category><category>Web API</category><category>Configuration</category><author>Mohammad Abu Mattar</author></item><item><title>Kubernetes</title><link>https://cheatsheets.mkabumattar.com/kubernetes/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/kubernetes/</guid><description>Kubernetes is an open-source container orchestration platform for automating deployment, scaling, and management of containerized applications.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Kubernetes is the de facto standard for container orchestration. It automates deployment, scaling, and management of containerized applications across clusters of machines. Configuration is declarative, and the control plane restarts failed containers on its own.&lt;/p&gt;
&lt;h2&gt;Key features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Deploys containers to nodes automatically&lt;/li&gt;
&lt;li&gt;Restarts failed containers and replaces unhealthy pods&lt;/li&gt;
&lt;li&gt;Distributes traffic across pod replicas&lt;/li&gt;
&lt;li&gt;Rolling updates that change application versions without downtime&lt;/li&gt;
&lt;li&gt;Quotas and limits to control cluster resource use&lt;/li&gt;
&lt;li&gt;Network policies, RBAC, and secret management&lt;/li&gt;
&lt;li&gt;DNS-based service discovery with load balancing&lt;/li&gt;
&lt;li&gt;Persistent and ephemeral storage orchestration&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Install kubectl&lt;/strong&gt;: Follow the Install and Configure kubectl section.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Access cluster&lt;/strong&gt;: &lt;code&gt;kubectl cluster-info&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Create deployment&lt;/strong&gt;: &lt;code&gt;kubectl create deployment web --image=nginx&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;List resources&lt;/strong&gt;: &lt;code&gt;kubectl get pods,svc,deployments&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Check application status&lt;/strong&gt;: &lt;code&gt;kubectl describe deployment web&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Common workflows&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Deploy Application&lt;/strong&gt;: Create Deployment with image, replicas, and resources&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Expose Service&lt;/strong&gt;: Create Service to access pods internally or externally&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configure Access&lt;/strong&gt;: Set up Ingress or LoadBalancer for external traffic&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor Health&lt;/strong&gt;: Check pod status, logs, and events regularly&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Update Application&lt;/strong&gt;: Use rolling updates or blue-green deployments&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scale Load&lt;/strong&gt;: Adjust replicas manually or enable HPA for automatic scaling&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Debug Issues&lt;/strong&gt;: Examine logs, describe resources, execute debugging containers&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The sections above cover pod management, deployments, services, storage, RBAC, and cluster operations.&lt;/p&gt;
</content:encoded><category>DevOps</category><category>Kubernetes</category><category>Container Orchestration</category><category>Cloud Native</category><category>Cluster Management</category><author>Mohammad Abu Mattar</author></item><item><title>Markdown</title><link>https://cheatsheets.mkabumattar.com/markdown/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/markdown/</guid><description>Markdown is a lightweight markup language designed for creating formatted text using a simple, readable syntax. It&apos;s widely used for documentation, READMEs, blogs, and content creation across the web.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Markdown is a lightweight markup language for writing formatted content with a simple, readable syntax. It was created for writing on the web, and is now used in documentation, blogs, and note-taking apps.&lt;/p&gt;
&lt;p&gt;The sections below cover Markdown syntax, formatting options, and practical examples.&lt;/p&gt;
</content:encoded><category>Markup Language</category><category>Markdown</category><category>Documentation</category><category>Formatting</category><category>Content Creation</category><category>Writing</category><author>Mohammad Abu Mattar</author></item><item><title>Netcat</title><link>https://cheatsheets.mkabumattar.com/nc/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/nc/</guid><description>Complete netcat reference covering TCP/UDP connections, file transfers, server testing, port scanning, banner grabbing, and network troubleshooting with practical examples</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This netcat cheatsheet covers TCP/UDP connections, file transfers, port scanning, banner grabbing, and advanced network operations.&lt;/p&gt;
</content:encoded><category>Terminal</category><category>Networking</category><category>Tools</category><category>System Administration</category><category>Port Scanning</category><author>Mohammad Abu Mattar</author></item><item><title>Netstat</title><link>https://cheatsheets.mkabumattar.com/netstat/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/netstat/</guid><description>Complete netstat reference covering network connections, listening ports, routing tables, and network statistics with practical examples</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This netstat cheatsheet covers six categories, with worked examples and troubleshooting steps in each.&lt;/p&gt;
</content:encoded><category>Terminal</category><category>System Administration</category><category>Linux</category><category>Networking</category><category>Tools</category><author>Mohammad Abu Mattar</author></item><item><title>Screen</title><link>https://cheatsheets.mkabumattar.com/screen/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/screen/</guid><description>GNU Screen is a terminal multiplexer for managing multiple terminal sessions, windows, and panes within a single screen. It covers commands for session and window management, and for splitting.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Getting started&lt;/h2&gt;
&lt;p&gt;GNU Screen is a terminal multiplexer that gives you:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Sessions&lt;/strong&gt;: Full terminal environments that persist even if you disconnect&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Windows&lt;/strong&gt;: Multiple terminals (tabs) within a single session&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Splits&lt;/strong&gt;: Horizontal and vertical screen divisions for side-by-side work&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Copy/Paste&lt;/strong&gt;: Built-in text selection and clipboard management&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automation&lt;/strong&gt;: Scripts to auto-setup complex terminal layouts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Start your first screen session:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;screen -S development
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then detach with &lt;code&gt;Ctrl+A d&lt;/code&gt; and reattach from anywhere:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;screen -r development
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Key concepts&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Sessions&lt;/strong&gt;: Independent workspaces that continue running even if you disconnect. Useful for long-running server processes and preserving work state.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Windows&lt;/strong&gt;: Tabs within a session. Each window is a full terminal shell with independent directory and command history.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Splits&lt;/strong&gt;: Horizontal regions within a window. Allows side-by-side terminals without creating new windows (though for complex panes, tmux may be better).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Copy Mode&lt;/strong&gt;: Special mode for selecting and copying text from the scrollback buffer for pasting later.&lt;/p&gt;
&lt;h2&gt;Essential keybindings&lt;/h2&gt;
&lt;p&gt;All keybindings use the prefix key &lt;code&gt;Ctrl+A&lt;/code&gt; (abbreviated as &lt;code&gt;C-a&lt;/code&gt;):&lt;/p&gt;
&lt;h3&gt;Session management&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-a d&lt;/code&gt; - Detach from session (background)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a D D&lt;/code&gt; - Detach and logout&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a q&lt;/code&gt; - Exit screen&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Windows&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-a c&lt;/code&gt; - Create new window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a n&lt;/code&gt; / &lt;code&gt;C-a p&lt;/code&gt; - Next/previous window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a [0-9]&lt;/code&gt; - Jump to window number&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a w&lt;/code&gt; - List all windows&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a k&lt;/code&gt; - Kill current window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a A&lt;/code&gt; - Rename window&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Splits and regions&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-a S&lt;/code&gt; - Split horizontally (regions)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a |&lt;/code&gt; - Split vertically (newer versions)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a Tab&lt;/code&gt; - Switch to next region&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a X&lt;/code&gt; - Remove current region&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a Q&lt;/code&gt; - Remove all regions&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Copy and paste&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-a [&lt;/code&gt; - Enter copy/scroll mode&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Space&lt;/code&gt; - Start selection (in copy mode)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Enter&lt;/code&gt; - Copy selection (in copy mode)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a ]&lt;/code&gt; - Paste copied text&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a =&lt;/code&gt; - Show paste buffers&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Common Screen setup&lt;/h2&gt;
&lt;p&gt;Install and create your configuration file &lt;code&gt;~/.screenrc&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# ~/.screenrc - Essential configuration
# Increase scrollback history
defscrollback 10000

# Enable 256-color terminal
term screen-256color

# Don&amp;#39;t show startup message
startup_message off

# Enable visual bell for notifications
vbell on

# Automatically detach on connection loss
autodetach on

# Useful custom bindings
bind h select -1
bind l select +1
bind - split -h
bind _ split -v
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Load the config:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;screen -c ~/.screenrc
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Building a development session&lt;/h2&gt;
&lt;p&gt;Create a complete development environment automatically:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;#!/bin/bash
# dev-session.sh - Create development environment

SESSION=&amp;quot;dev&amp;quot;
screen -S &amp;quot;$SESSION&amp;quot; -d -m

# Create editor window
screen -S &amp;quot;$SESSION&amp;quot; -X new-window -t &amp;quot;editor&amp;quot;
screen -S &amp;quot;$SESSION&amp;quot; -p &amp;quot;editor&amp;quot; -X send-keys &amp;quot;cd ~/myproject &amp;amp;&amp;amp; vim&amp;quot; Enter

# Create server window
screen -S &amp;quot;$SESSION&amp;quot; -X new-window -t &amp;quot;server&amp;quot;
screen -S &amp;quot;$SESSION&amp;quot; -p &amp;quot;server&amp;quot; -X send-keys &amp;quot;cd ~/myproject &amp;amp;&amp;amp; npm start&amp;quot; Enter

# Create test window
screen -S &amp;quot;$SESSION&amp;quot; -X new-window -t &amp;quot;test&amp;quot;
screen -S &amp;quot;$SESSION&amp;quot; -p &amp;quot;test&amp;quot; -X send-keys &amp;quot;cd ~/myproject &amp;amp;&amp;amp; npm test&amp;quot; Enter

# Attach and start
screen -r &amp;quot;$SESSION&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Run it anytime: &lt;code&gt;bash dev-session.sh&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Tips for productivity&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Use Named Sessions&lt;/strong&gt;: &lt;code&gt;screen -S projectname&lt;/code&gt; is easier to remember than numbered sessions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Name Your Windows&lt;/strong&gt;: Use &lt;code&gt;C-a A&lt;/code&gt; to name windows (editor, server, monitor)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Detach Don&amp;#39;t Exit&lt;/strong&gt;: Always use &lt;code&gt;C-a d&lt;/code&gt; to detach, not &lt;code&gt;exit&lt;/code&gt;, so session persists&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create Session Templates&lt;/strong&gt;: Save setup scripts for recurring project types&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Organize by Project&lt;/strong&gt;: One session per project with windows for different tasks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use Splits for Monitoring&lt;/strong&gt;: Split regions work well for watching logs while you work&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enable Scrollback&lt;/strong&gt;: Set &lt;code&gt;defscrollback 10000&lt;/code&gt; in ~/.screenrc for adequate history&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Combine with SSH&lt;/strong&gt;: Screen keeps long-running remote tasks alive over SSH&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Quick reference: session lifecycle&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Create session
screen -S mywork

# Inside screen - work normally, then detach
Ctrl+A d

# Check sessions
screen -ls

# Reattach to session
screen -r mywork

# Kill session when done
screen -S mywork -X quit
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Screen vs Tmux&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Screen is better for:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simplicity and a smaller learning curve&lt;/li&gt;
&lt;li&gt;Systems where tmux isn&amp;#39;t available&lt;/li&gt;
&lt;li&gt;Simple split layouts (left/right only)&lt;/li&gt;
&lt;li&gt;Older servers that predate tmux&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Tmux is better for:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Complex pane management&lt;/li&gt;
&lt;li&gt;Modern development workflows&lt;/li&gt;
&lt;li&gt;Extensive plugin ecosystem&lt;/li&gt;
&lt;li&gt;Latest terminal features&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Resources&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Official GNU Screen Manual: &lt;a href=&quot;https://www.gnu.org/software/screen/&quot;&gt;https://www.gnu.org/software/screen/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Linux Manual Page: &lt;a href=&quot;https://linux.die.net/man/1/screen&quot;&gt;https://linux.die.net/man/1/screen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Practical Screen Tutorial: &lt;a href=&quot;https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/&quot;&gt;https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>Terminal</category><category>Screen</category><category>Tools</category><category>Development</category><category>System Administration</category><author>Mohammad Abu Mattar</author></item><item><title>Sed</title><link>https://cheatsheets.mkabumattar.com/sed/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/sed/</guid><description>Complete sed reference with substitution, addressing, deletion, insertion, transformations, in-place editing, and real-world examples for text manipulation</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This sed reference covers basic text substitution through advanced scripting techniques, with practical examples for text processing, file editing, and automation.&lt;/p&gt;
</content:encoded><category>Terminal</category><category>Programming</category><category>Linux</category><category>Text Processing</category><category>Tools</category><author>Mohammad Abu Mattar</author></item><item><title>Tmux</title><link>https://cheatsheets.mkabumattar.com/tmux/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/tmux/</guid><description>Tmux is a terminal multiplexer for managing multiple terminal sessions, windows, and panes within a single screen. Commands for session, window, and pane management.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Tmux is a terminal multiplexer for managing multiple terminal sessions, windows, and panes within a single screen. This cheatsheet covers the commands, keybindings, and configuration options for everyday tmux usage.&lt;/p&gt;
&lt;h2&gt;Quick start&lt;/h2&gt;
&lt;p&gt;Start your first tmux session with a single command:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;tmux new -s development
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then detach with &lt;code&gt;C-b d&lt;/code&gt; and reattach from anywhere with:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;tmux attach -t development
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Key concepts&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Sessions&lt;/strong&gt;: Independent workspaces that continue running even if you disconnect. Useful for keeping servers and processes running.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Windows&lt;/strong&gt;: Tabs within a session. Each window is a full terminal with its own working directory and history.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Panes&lt;/strong&gt;: Splits within a window. Allows multiple shells side-by-side without opening new windows.&lt;/p&gt;
&lt;h2&gt;Essential keybindings&lt;/h2&gt;
&lt;p&gt;All keybindings use the prefix key &lt;code&gt;C-b&lt;/code&gt; (Ctrl+B) unless configured otherwise:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-b c&lt;/code&gt; - Create new window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-b n&lt;/code&gt; / &lt;code&gt;C-b p&lt;/code&gt; - Next/previous window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-b %&lt;/code&gt; / &lt;code&gt;C-b &amp;quot;&lt;/code&gt; - Split vertical/horizontal&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-b h/j/k/l&lt;/code&gt; - Navigate panes (requires vim-style config)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-b [&lt;/code&gt; - Enter scroll/copy mode&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-b d&lt;/code&gt; - Detach from session&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-b ?&lt;/code&gt; - List all keybindings&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-b :&lt;/code&gt; - Enter command mode&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Popular configuration&lt;/h2&gt;
&lt;p&gt;For vim-style navigation and mouse support, add to &lt;code&gt;~/.tmux.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Enable 256 color support
set -g default-terminal &amp;quot;screen-256color&amp;quot;
set -ga terminal-overrides &amp;quot;,xterm-256color:RGB&amp;quot;

# Enable mouse
set -g mouse on

# Use vim keys for navigation
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# Resize panes with vim keys
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5

# Increase history limit
set -g history-limit 50000

# Reload config
bind r source-file ~/.tmux.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then reload with &lt;code&gt;C-b :&lt;/code&gt; and type &lt;code&gt;source-file ~/.tmux.conf&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Tips for productivity&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Use Named Sessions&lt;/strong&gt;: &lt;code&gt;tmux new -s work&lt;/code&gt; is easier to remember than session numbers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create Window Groups&lt;/strong&gt;: Organize windows logically within sessions (editor, server, testing)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pair Programming&lt;/strong&gt;: Multiple users can attach to the same session at once&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automation&lt;/strong&gt;: Use &lt;code&gt;tmux send-keys&lt;/code&gt; in scripts to automate setup and testing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mouse Support&lt;/strong&gt;: Enable &lt;code&gt;set -g mouse on&lt;/code&gt; to scroll and select panes with the mouse&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Resources&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Official Tmux Manual: &lt;a href=&quot;https://linux.die.net/man/1/tmux&quot;&gt;https://linux.die.net/man/1/tmux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;GitHub Repository: &lt;a href=&quot;https://github.com/tmux/tmux&quot;&gt;https://github.com/tmux/tmux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Community Wiki: &lt;a href=&quot;https://github.com/tmux/tmux/wiki&quot;&gt;https://github.com/tmux/tmux/wiki&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>Terminal</category><category>Tmux</category><category>Tools</category><category>Development</category><category>System Administration</category><author>Mohammad Abu Mattar</author></item><item><title>TOML</title><link>https://cheatsheets.mkabumattar.com/toml/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/toml/</guid><description>TOML (Tom&apos;s Obvious, Minimal Language) is a configuration file format designed to be minimal, readable, and unambiguous. It&apos;s commonly used for application configuration, package manifests, and data serialization.</description><pubDate>Fri, 28 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;TOML (Tom&amp;#39;s Obvious, Minimal Language) is a human-friendly configuration file format. Designed to be minimal, readable, and unambiguous, it&amp;#39;s used extensively in package manifests (like Cargo.toml and pyproject.toml) and application configuration files.&lt;/p&gt;
&lt;p&gt;Browse the sections below to explore TOML syntax, data types, and practical configuration examples.&lt;/p&gt;
</content:encoded><category>Data Format</category><category>TOML</category><category>Configuration</category><category>Data Serialization</category><category>Settings</category><author>Mohammad Abu Mattar</author></item><item><title>JavaScript</title><link>https://cheatsheets.mkabumattar.com/javascript/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/javascript/</guid><description>JavaScript is a high-level programming language that powers the web. It supports object-oriented, functional, and event-driven programming styles.</description><pubDate>Thu, 27 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;JavaScript is a high-level programming language that powers the web. It supports object-oriented, functional, and event-driven programming styles.&lt;/p&gt;
&lt;p&gt;The sections below cover JavaScript syntax and methods, including ES6+ features, async patterns, classes, and modules.&lt;/p&gt;
</content:encoded><category>Programming Language</category><category>Web Development</category><category>Frontend</category><category>Backend</category><category>Scripting</category><author>Mohammad Abu Mattar</author></item><item><title>Python</title><link>https://cheatsheets.mkabumattar.com/python/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/python/</guid><description>Python is an interpreted, high-level programming language known for its readability and simplicity. It supports multiple programming paradigms including procedural, object-oriented, and functional programming.</description><pubDate>Thu, 27 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Python is an interpreted, high-level programming language known for its readability and simplicity. It supports multiple programming paradigms including procedural, object-oriented, and functional programming.&lt;/p&gt;
&lt;p&gt;The sections below cover Python syntax, functions, classes, and common patterns.&lt;/p&gt;
</content:encoded><category>Programming Language</category><category>Python</category><category>Scripting</category><category>Object-Oriented</category><category>Web Development</category><category>Data Science</category><author>Mohammad Abu Mattar</author></item><item><title>RegEx</title><link>https://cheatsheets.mkabumattar.com/regex/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/regex/</guid><description>Regular expressions (regex or regexp) are patterns used to match character combinations in strings. They handle pattern matching, validation, and text processing across many programming languages.</description><pubDate>Thu, 27 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Regular expressions (regex or regexp) are patterns used to match character combinations in strings. They handle pattern matching, validation, and text processing across nearly all programming languages.&lt;/p&gt;
&lt;p&gt;Browse the sections below to explore regex syntax, patterns, and practical examples.&lt;/p&gt;
</content:encoded><category>Tools</category><category>Regular Expressions</category><category>Text Processing</category><category>Pattern Matching</category><category>Development</category><author>Mohammad Abu Mattar</author></item><item><title>Vim</title><link>https://cheatsheets.mkabumattar.com/vim/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/vim/</guid><description>Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as &quot;vi&quot; with most UNIX systems.</description><pubDate>Thu, 27 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as &amp;quot;vi&amp;quot; with most UNIX systems.&lt;/p&gt;
&lt;p&gt;The sections below cover Vim commands, shortcuts, and examples.&lt;/p&gt;
</content:encoded><category>Editor</category><category>Text Editor</category><category>Terminal</category><category>Command Line</category><category>Productivity</category><author>Mohammad Abu Mattar</author></item><item><title>YAML</title><link>https://cheatsheets.mkabumattar.com/yaml/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/yaml/</guid><description>YAML (YAML Ain&apos;t Markup Language) is a human-friendly data serialization language commonly used for configuration files, data exchange, and infrastructure-as-code. It emphasizes readability and uses indentation to structure data.</description><pubDate>Thu, 27 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;YAML (YAML Ain&amp;#39;t Markup Language) is a human-friendly data serialization language widely used for configuration files, data exchange, and infrastructure-as-code. It emphasizes readability and uses indentation to structure data.&lt;/p&gt;
&lt;p&gt;The sections below cover YAML syntax, data structures, and practical examples.&lt;/p&gt;
</content:encoded><category>Data Format</category><category>YAML</category><category>Configuration</category><category>Data Serialization</category><category>DevOps</category><category>Infrastructure</category><author>Mohammad Abu Mattar</author></item><item><title>Bash</title><link>https://cheatsheets.mkabumattar.com/bash/</link><guid isPermaLink="true">https://cheatsheets.mkabumattar.com/bash/</guid><description>Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell.</description><pubDate>Sun, 01 Jan 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell.&lt;/p&gt;
&lt;p&gt;The sections below cover Bash commands, syntax, and examples.&lt;/p&gt;
</content:encoded><category>Scripting</category><category>Shell</category><category>Linux</category><category>Unix</category><category>Command Line</category><category>Automation</category><author>Mohammad Abu Mattar</author></item></channel></rss>