<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://hassanrasoo98.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://hassanrasoo98.github.io/" rel="alternate" type="text/html" /><updated>2026-02-03T12:42:24+00:00</updated><id>https://hassanrasoo98.github.io/feed.xml</id><title type="html">Hassan Rasool</title><subtitle>GitHub Blogs</subtitle><entry><title type="html">Automate Server Startup</title><link href="https://hassanrasoo98.github.io/2026/02/03/automate-server-startup.html" rel="alternate" type="text/html" title="Automate Server Startup" /><published>2026-02-03T00:00:00+00:00</published><updated>2026-02-03T00:00:00+00:00</updated><id>https://hassanrasoo98.github.io/2026/02/03/automate-server-startup</id><content type="html" xml:base="https://hassanrasoo98.github.io/2026/02/03/automate-server-startup.html"><![CDATA[<h1 id="automate-server-startup-in-vscode">Automate Server Startup in VSCode</h1>
<p>One of the most frustrating things to do is to use the terminal to run the same commands again and again to start and close your frontend and the backend servers. In small projects it is easy to manage and redo but as the projects grow large and there are multiple services to mangage, this becomes redundant.</p>

<h2 id="solution-vscodetasksjson">Solution: .vscode/tasks.json</h2>
<p>A simple trick to solve this problem is to use a tasks.json file to manage your services inside of vscode. Just create a .vscode (hidden) folder inside your project and create a tasks.json file inside it. Paste the following code inside the json file:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Run Frontend",
            "type": "shell",
            "command": "cd frontend &amp;&amp; npm run dev",
            "group": "build",
            "problemMatcher": []
        },              
        {
            "label": "Run Backend",
            "type": "shell",
            "command": "cd backend &amp;&amp; source .venv/bin/activate &amp;&amp; uvicorn main:app --reload",
            "group": "build",
            "problemMatcher": []
        },
        {
            "label": "Run Full Stack",
            "dependsOn": ["Run Backend", "Run Frontend"],
            "dependsOrder": "parallel",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}
</code></pre></div></div>
<p>Note: The script assumes that you have a python fastapi backend and a react or next js frontend. It activates the virtual environment in the backend and then starts the server. You must preinstall teh frontend and the backend requirements.</p>

<h2 id="how-to-use">How to use</h2>
<p>After the script has been created, you can use it in one of the following ways:</p>
<ol>
  <li>From the terminal options on the top -&gt; run build task. OR</li>
  <li>Enter combination ‘ctrl+shit+p’ then run build task.
Using this the terminals and the servers start automatically. No need to manually type in the commands again and again.</li>
</ol>

<p>This simple script can be extended to run and manage other services as well like celery, flower etc. Feel free to use or extend it. Suggestions are welcome. Feel free to reach out to my email in case of any queries or issues: ‘hassanrasool1057@gmail.com’</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Automate Server Startup in VSCode One of the most frustrating things to do is to use the terminal to run the same commands again and again to start and close your frontend and the backend servers. In small projects it is easy to manage and redo but as the projects grow large and there are multiple services to mangage, this becomes redundant.]]></summary></entry><entry><title type="html">Common Docker Container Commands Reference</title><link href="https://hassanrasoo98.github.io/docker/containers/devops/2025/07/15/common-docker-container-commands.html" rel="alternate" type="text/html" title="Common Docker Container Commands Reference" /><published>2025-07-15T00:00:00+00:00</published><updated>2025-07-15T00:00:00+00:00</updated><id>https://hassanrasoo98.github.io/docker/containers/devops/2025/07/15/common-docker-container-commands</id><content type="html" xml:base="https://hassanrasoo98.github.io/docker/containers/devops/2025/07/15/common-docker-container-commands.html"><![CDATA[<h1 id="common-docker-container-commands-reference">Common Docker Container Commands Reference</h1>

<p>This post serves as a quick reference for common Docker container commands. The commands are organized in a table format for easy copying and use.</p>

<h2 id="container-commands">Container Commands</h2>

<h3 id="n8n-workflow-automation-tool">n8n (Workflow Automation Tool)</h3>

<p><strong>Create persistent volume:</strong></p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker volume create n8n_data
</code></pre></div></div>

<p><strong>Run container:</strong></p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker run <span class="nt">-it</span> <span class="nt">--rm</span> <span class="se">\</span>
  <span class="nt">--name</span> n8n <span class="se">\</span>
  <span class="nt">-p</span> 5678:5678 <span class="se">\</span>
  <span class="nt">-v</span> n8n_data:/home/node/.n8n <span class="se">\</span>
  docker.n8n.io/n8nio/n8n
</code></pre></div></div>

<h2 id="notes">Notes</h2>

<ul>
  <li>The commands above use common best practices for running containers</li>
  <li>Volume mounts (<code class="language-plaintext highlighter-rouge">-v</code>) are used to persist data</li>
  <li>Port mappings (<code class="language-plaintext highlighter-rouge">-p</code>) expose container ports to the host</li>
  <li>Container names are set using <code class="language-plaintext highlighter-rouge">--name</code> for easy reference</li>
  <li>Remove the <code class="language-plaintext highlighter-rouge">--rm</code> flag if you want the container to persist after stopping</li>
</ul>

<h2 id="tips">Tips</h2>

<ol>
  <li>Always use meaningful container names for easier management</li>
  <li>Consider using Docker Compose for more complex setups</li>
  <li>Check container logs using <code class="language-plaintext highlighter-rouge">docker logs &lt;container_name&gt;</code></li>
  <li>Use <code class="language-plaintext highlighter-rouge">docker ps</code> to list running containers</li>
  <li>Use <code class="language-plaintext highlighter-rouge">docker volume ls</code> to list all volumes</li>
</ol>

<p>Feel free to suggest more container commands to add to this reference!</p>]]></content><author><name></name></author><category term="docker" /><category term="containers" /><category term="devops" /><summary type="html"><![CDATA[Common Docker Container Commands Reference]]></summary></entry><entry><title type="html">✨ Easiest Way to Run Cursor on Linux (2025)</title><link href="https://hassanrasoo98.github.io/linux/appimage/cursor/2025/06/15/install-cursor-appimage-linux.html" rel="alternate" type="text/html" title="✨ Easiest Way to Run Cursor on Linux (2025)" /><published>2025-06-15T00:00:00+00:00</published><updated>2025-06-15T00:00:00+00:00</updated><id>https://hassanrasoo98.github.io/linux/appimage/cursor/2025/06/15/install-cursor-appimage-linux</id><content type="html" xml:base="https://hassanrasoo98.github.io/linux/appimage/cursor/2025/06/15/install-cursor-appimage-linux.html"><![CDATA[<blockquote>
  <p>📅 Last updated: June 2025<br />
✍️ Author: Hassan Rasool<br />
🧑‍💻 TL;DR: Download the AppImage, copy-paste this script, and you’re done!</p>
</blockquote>

<hr />

<h3 id="-yes-you-can-use-cursor-on-linux">🚀 Yes, You Can Use Cursor on Linux!</h3>

<p><a href="https://www.cursor.so/">Cursor</a> is an amazing AI-first code editor built on VS Code — but sadly, there’s no official Linux version yet.</p>

<p>The good news? <strong>It takes less than 2 minutes to make it work perfectly on Linux.</strong> Just:</p>

<ol>
  <li>Download the latest <code class="language-plaintext highlighter-rouge">.AppImage</code> from <a href="https://www.cursor.so/download">cursor.so/download</a></li>
  <li>Run the script below</li>
  <li>Boom — Cursor launches like a native app 🎉</li>
</ol>

<hr />

<h3 id="-what-this-script-does">✅ What This Script Does</h3>

<ul>
  <li>Extracts the AppImage (so you don’t need FUSE)</li>
  <li>Fixes sandbox permissions (so it doesn’t crash)</li>
  <li>Adds Cursor to your launcher (so you can search &amp; open it easily)</li>
  <li>
    <h2 id="automatically-adds-the-app-icon-so-you-dont-have-to">Automatically adds the app icon (so you don’t have to)</h2>
  </li>
</ul>

<h3 id="-one-command-setup-script">📜 One-Command Setup Script</h3>

<p>Just copy and paste this into your terminal:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/bash</span>

<span class="c"># 🚀 Super simple Cursor setup for Linux</span>
<span class="nb">set</span> <span class="nt">-e</span>

<span class="nv">APP_NAME</span><span class="o">=</span><span class="s2">"cursor"</span>
<span class="nv">INSTALL_DIR</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/.local/bin/</span><span class="nv">$APP_NAME</span><span class="s2">"</span>
<span class="nv">DESKTOP_FILE</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/.local/share/applications/</span><span class="nv">$APP_NAME</span><span class="s2">.desktop"</span>
<span class="nv">APPIMAGE_PATH</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/Downloads/Cursor-*.AppImage"</span>

<span class="nb">echo</span> <span class="s2">"✨ Installing Cursor..."</span>

<span class="c"># Make sure the AppImage exists</span>
<span class="nv">APPIMAGE_FILE</span><span class="o">=</span><span class="si">$(</span><span class="nb">ls</span> <span class="nv">$APPIMAGE_PATH</span> 2&gt;/dev/null | <span class="nb">head</span> <span class="nt">-n</span> 1<span class="si">)</span>
<span class="k">if</span> <span class="o">[</span> <span class="o">!</span> <span class="nt">-f</span> <span class="s2">"</span><span class="nv">$APPIMAGE_FILE</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then
  </span><span class="nb">echo</span> <span class="s2">"❌ Could not find Cursor AppImage at </span><span class="nv">$APPIMAGE_PATH</span><span class="s2">"</span>
  <span class="nb">echo</span> <span class="s2">"📦 Download it from: https://www.cursor.so/download"</span>
  <span class="nb">exit </span>1
<span class="k">fi</span>

<span class="c"># Extract AppImage</span>
<span class="nb">chmod</span> +x <span class="s2">"</span><span class="nv">$APPIMAGE_FILE</span><span class="s2">"</span>
<span class="nb">mkdir</span> <span class="nt">-p</span> <span class="s2">"</span><span class="nv">$INSTALL_DIR</span><span class="s2">"</span>
<span class="s2">"</span><span class="nv">$APPIMAGE_FILE</span><span class="s2">"</span> <span class="nt">--appimage-extract</span>
<span class="nb">mv </span>squashfs-root/<span class="k">*</span> <span class="s2">"</span><span class="nv">$INSTALL_DIR</span><span class="s2">"</span>

<span class="c"># Fix chrome-sandbox permissions</span>
<span class="k">if</span> <span class="o">[</span> <span class="nt">-f</span> <span class="s2">"</span><span class="nv">$INSTALL_DIR</span><span class="s2">/chrome-sandbox"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then
  </span><span class="nb">echo</span> <span class="s2">"🔐 Fixing sandbox..."</span>
  <span class="nb">sudo chown </span>root:root <span class="s2">"</span><span class="nv">$INSTALL_DIR</span><span class="s2">/chrome-sandbox"</span>
  <span class="nb">sudo chmod </span>4755 <span class="s2">"</span><span class="nv">$INSTALL_DIR</span><span class="s2">/chrome-sandbox"</span>
<span class="k">fi</span>

<span class="c"># Find a good icon</span>
<span class="nv">ICON_PATH</span><span class="o">=</span><span class="s2">"</span><span class="nv">$INSTALL_DIR</span><span class="s2">/cursor.png"</span>
<span class="nv">ICON_CANDIDATES</span><span class="o">=(</span>
  <span class="s2">"</span><span class="nv">$INSTALL_DIR</span><span class="s2">/usr/share/icons/hicolor/512x512/apps/cursor.png"</span>
  <span class="s2">"</span><span class="nv">$INSTALL_DIR</span><span class="s2">/resources/app/assets/icon.png"</span>
<span class="o">)</span>
<span class="k">for </span>icon <span class="k">in</span> <span class="s2">"</span><span class="k">${</span><span class="nv">ICON_CANDIDATES</span><span class="p">[@]</span><span class="k">}</span><span class="s2">"</span><span class="p">;</span> <span class="k">do
  if</span> <span class="o">[</span> <span class="nt">-f</span> <span class="s2">"</span><span class="nv">$icon</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then
    </span><span class="nb">cp</span> <span class="s2">"</span><span class="nv">$icon</span><span class="s2">"</span> <span class="s2">"</span><span class="nv">$ICON_PATH</span><span class="s2">"</span>
    <span class="nb">break
  </span><span class="k">fi
done</span>

<span class="c"># Create .desktop launcher</span>
<span class="nb">mkdir</span> <span class="nt">-p</span> <span class="s2">"</span><span class="si">$(</span><span class="nb">dirname</span> <span class="s2">"</span><span class="nv">$DESKTOP_FILE</span><span class="s2">"</span><span class="si">)</span><span class="s2">"</span>
<span class="nb">cat</span> <span class="o">&gt;</span> <span class="s2">"</span><span class="nv">$DESKTOP_FILE</span><span class="s2">"</span> <span class="o">&lt;&lt;</span><span class="no">EOF</span><span class="sh">
[Desktop Entry]
Name=Cursor
Exec=</span><span class="nv">$INSTALL_DIR</span><span class="sh">/AppRun
Icon=</span><span class="nv">$ICON_PATH</span><span class="sh">
Type=Application
Categories=Development;IDE;
StartupNotify=true
</span><span class="no">EOF

</span>update-desktop-database ~/.local/share/applications

<span class="nb">echo</span> <span class="s2">"✅ Done! You can now launch Cursor from your app menu or by running:"</span>
<span class="nb">echo</span> <span class="s2">"</span><span class="nv">$INSTALL_DIR</span><span class="s2">/AppRun"</span>
</code></pre></div></div>

<hr />

<h3 id="-or-download-it-directly">📎 Or Download It Directly</h3>

<p>Right-click &amp; save this:
👉 <a href="https://HassanRasoo98.github.io/downloads/install-cursor.sh">install-cursor.sh</a></p>

<p>Then just run:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">chmod</span> +x install-cursor.sh
./install-cursor.sh
</code></pre></div></div>

<hr />

<h3 id="-notes--tips">🧠 Notes &amp; Tips</h3>

<ul>
  <li><strong>No root needed</strong>, except for fixing the sandbox once</li>
  <li>If you update Cursor, just re-run this script with the new <code class="language-plaintext highlighter-rouge">.AppImage</code></li>
  <li>This script works with almost any modern Linux distro</li>
</ul>

<hr />

<h3 id="-questions-feedback">💬 Questions? Feedback?</h3>

<p>Feel free to comment or share this link! You can also tweak the script for advanced setups or create a pull request to improve it 💡</p>]]></content><author><name></name></author><category term="Linux" /><category term="AppImage" /><category term="Cursor" /><summary type="html"><![CDATA[📅 Last updated: June 2025 ✍️ Author: Hassan Rasool 🧑‍💻 TL;DR: Download the AppImage, copy-paste this script, and you’re done!]]></summary></entry></feed>