<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Untitled Publication]]></title><description><![CDATA[Untitled Publication]]></description><link>https://samm.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 13:47:14 GMT</lastBuildDate><atom:link href="https://samm.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Rust and Difinity Installation process for Canister Development in ICP.]]></title><description><![CDATA[1.2.1 Installing Rust
Before diving into creating ICP Canisters with Rust, let's set up your Rust development environment to ensure a smooth workflow. Rust offers a powerful toolset for system-level programming and web development alike. We'll instal...]]></description><link>https://samm.dev/rust-difinity-installation-process</link><guid isPermaLink="true">https://samm.dev/rust-difinity-installation-process</guid><category><![CDATA[#samdev015]]></category><dc:creator><![CDATA[Sammy Mulandi]]></dc:creator><pubDate>Wed, 08 Nov 2023 12:40:30 GMT</pubDate><content:encoded><![CDATA[<h4 id="heading-121-installing-rust"><strong>1.2.1 Installing Rust</strong></h4>
<p>Before diving into creating ICP Canisters with Rust, let's set up your Rust development environment to ensure a smooth workflow. Rust offers a powerful toolset for system-level programming and web development alike. We'll install Rust and configure it for the project.</p>
<p>Rust comes with a dedicated package manager called "Cargo" that makes managing dependencies and building projects a breeze. If you already have Rust set up, you can skip this step.</p>
<p>To install Rust, we'll use rustup, the official Rust toolchain installer. Run the following command in your terminal to install Rust:</p>
<pre><code class="lang-bash">curl --proto <span class="hljs-string">'=https'</span> --tlsv1.2 https://sh.rustup.rs -sSf | sh
</code></pre>
<p>After running the command, you should see a welcome message, that will ask you how to proceed with the installation:</p>
<pre><code class="lang-bash">1...
2
3Current installation options:
4
5   default host triple: x86_64-unknown-linux-gnu
6     default toolchain: stable (default)
7               profile: default
8  modify PATH variable: yes
9
101) Proceed with installation (default)
112) Customize installation
123) Cancel installation
13&gt;
</code></pre>
<p>Press 1 and hit enter or just directly press enter to proceed with the installation since 1 is selected as default.</p>
<p>After the installation is complete, you should see a similar output in your terminal:</p>
<pre><code class="lang-bash">1
2Rust is installed now. Great!
3
4To get started you may need to restart your current shell.
5This would reload your PATH environment variable to include
6Cargo<span class="hljs-string">'s bin directory ($HOME/.cargo/bin).
7
8To configure your current shell, run:
9source "$HOME/.cargo/env"</span>
</code></pre>
<p>Next run the source command to ensure that the necessary environment variables are loaded:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">source</span> <span class="hljs-string">"<span class="hljs-variable">$HOME</span>/.cargo/env"</span>
</code></pre>
<p>This completes the installation of Rust. In the next section, we'll install the necessary dependencies for our project.</p>
<h4 id="heading-122-installing-wasm32-unknown-unknown-target"><strong>1.2.2 Installing wasm32-unknown-unknown target</strong></h4>
<p>Next, we need to install the wasm32-unknown-unknown target, which is a WebAssembly target for the Rust programming language. So that we can compile Rust code to WebAssembly and run it on the Internet Computer.</p>
<p>Run the following command to install the wasm32-unknown-unknown target:</p>
<pre><code class="lang-bash">rustup target add wasm32-unknown-unknown
</code></pre>
<h4 id="heading-123-installing-candid-extractor"><strong>1.2.3 Installing Candid Extractor</strong></h4>
<p>Next, we need to install Candid Extractor, a tool which allows you to extract Candid interface definitions from WebAssembly modules. This enables us to generate Candid interface definitions for our canister to interact with it.</p>
<p>Run the following command to install Candid Extractor:</p>
<pre><code class="lang-bash">cargo install candid-extractor
</code></pre>
<h4 id="heading-124-installing-dfx"><strong>1.2.4 Installing DFX</strong></h4>
<p>We'll also need DFX, a command-line interface for the Internet Computer. DFX allows you to create, build, deploy, and manage canisters on the platform. It also offers a local development environment for testing.</p>
<p>Install DFX by running:</p>
<pre><code class="lang-bash">DFX_VERSION=0.15.0 sh -ci <span class="hljs-string">"<span class="hljs-subst">$(curl -fsSL https://sdk.dfinity.org/install.sh)</span>"</span>
</code></pre>
<p>Now that we have DFX installed, you need to add it to your path. Run the following command:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">'export PATH="$PATH:$HOME/bin"'</span> &gt;&gt; <span class="hljs-string">"<span class="hljs-variable">$HOME</span>/.bashrc"</span>
</code></pre>
<h4 id="heading-126-ensuring-everything-is-installed-correctly"><strong>1.2.6 Ensuring Everything is Installed Correctly</strong></h4>
<ol>
<li><p><strong>Close and Reopen Your Terminal:</strong> Close and reopen your terminal to ensure the new environment variables are loaded.</p>
</li>
<li><p><strong>Check the Installed Rust Version:</strong> Run the following command to check the installed Rust version:</p>
<pre><code class="lang-bash"> cargo --version
</code></pre>
<p> You should see something like this:</p>
<pre><code class="lang-bash"> cargo 1.72.0 (103a7ff2e 2023-08-15)
</code></pre>
</li>
<li><p><strong>Check the Installed DFX Version:</strong> Run the following command to check the installed DFX version:</p>
<pre><code class="lang-bash"> dfx --version
</code></pre>
<p> You should see something like this:</p>
<pre><code class="lang-bash"> dfx 0.15.0
</code></pre>
</li>
</ol>
<p>With all the dependencies installed, we're ready to start building our canister.</p>
]]></content:encoded></item><item><title><![CDATA[Enabling UFW and Setting Up Firewall Rules]]></title><description><![CDATA[Enable UFW:
 To enable UFW, use the following command:
 sudo ufw enable

 After running this command, UFW will be active, and the default policy will be to deny all incoming connections.

Allow Specific Services or Ports:
 You can allow specific serv...]]></description><link>https://samm.dev/enabling-ufw-and-setting-up-firewall-rules</link><guid isPermaLink="true">https://samm.dev/enabling-ufw-and-setting-up-firewall-rules</guid><category><![CDATA[#samdev015]]></category><dc:creator><![CDATA[Sammy Mulandi]]></dc:creator><pubDate>Fri, 27 Oct 2023 05:07:12 GMT</pubDate><content:encoded><![CDATA[<ol>
<li><p><strong>Enable UFW:</strong></p>
<p> To enable UFW, use the following command:</p>
<pre><code class="lang-apache"> <span class="hljs-attribute">sudo</span> ufw enable
</code></pre>
<p> After running this command, UFW will be active, and the default policy will be to deny all incoming connections.</p>
</li>
<li><p><strong>Allow Specific Services or Ports:</strong></p>
<p> You can allow specific services or ports by using UFW. For example, to allow incoming SSH connections (port 22), you can use the following command:</p>
<pre><code class="lang-apache"> <span class="hljs-attribute">sudo</span> ufw <span class="hljs-literal">allow</span> ssh
</code></pre>
<p> If you want to allow other services, replace <code>ssh</code> with the service name (e.g., <code>http</code>, <code>https</code>, <code>ftp</code>, etc.) or the port number you want to allow.</p>
</li>
<li><p><strong>Check UFW Status:</strong></p>
<p> After setting up your rules, you can check the status to ensure everything is configured correctly:</p>
<pre><code class="lang-apache"> <span class="hljs-attribute">sudo</span> ufw status
</code></pre>
<p> It should display your active rules.</p>
</li>
<li><p><strong>Configure Outbound Connections (Optional):</strong></p>
<p> UFW by default allows all outbound connections. If you want to restrict outbound connections, you can set specific rules for outbound traffic. For example, to deny outgoing connections on port 80 (HTTP), you can use:</p>
<pre><code class="lang-apache"> <span class="hljs-attribute">sudo</span> ufw <span class="hljs-literal">deny</span> out <span class="hljs-number">80</span>
</code></pre>
<p> Replace <code>80</code> with the port number you want to restrict.</p>
</li>
<li><p><strong>Other Useful Commands:</strong></p>
<ul>
<li><p>To delete a rule: <code>sudo ufw delete &lt;rule&gt;</code></p>
</li>
<li><p>To disable UFW: <code>sudo ufw disable</code></p>
</li>
</ul>
</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[How to install Apache web server on ubuntu 22.04]]></title><description><![CDATA[Step 1 — Installing Apache
Apache is available within Ubuntu’s default software repositories, making it possible to install it using conventional package management tools.
Begin by updating the local package index to reflect the latest upstream chang...]]></description><link>https://samm.dev/how-to-install-apache-web-server-on-ubuntu-2204</link><guid isPermaLink="true">https://samm.dev/how-to-install-apache-web-server-on-ubuntu-2204</guid><category><![CDATA[#samdev015]]></category><dc:creator><![CDATA[Sammy Mulandi]]></dc:creator><pubDate>Fri, 27 Oct 2023 04:37:34 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-step-1-installing-apachehttpswwwdigitaloceancomcommunitytutorialshow-to-install-the-apache-web-server-on-ubuntu-22-04step-1-installing-apache"><a target="_blank" href="https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-22-04#step-1-installing-apache">Step 1 — Installing Apache</a></h2>
<p>Apache is available within Ubuntu’s default software repositories, making it possible to install it using conventional package management tools.</p>
<p>Begin by updating the local package index to reflect the latest upstream changes:</p>
<pre><code class="lang-plaintext">sudo apt update
</code></pre>
<p>Then, install the <code>apache2</code> package:</p>
<pre><code class="lang-plaintext">sudo apt install apache2
</code></pre>
<p>After confirming the installation, <code>apt</code> will install Apache and all required dependencies.</p>
<h2 id="heading-step-2-adjusting-the-firewallhttpswwwdigitaloceancomcommunitytutorialshow-to-install-the-apache-web-server-on-ubuntu-22-04step-2-adjusting-the-firewall"><a target="_blank" href="https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-22-04#step-2-adjusting-the-firewall">Step 2 — Adjusting the Firewall</a></h2>
<p>Before testing Apache, it’s necessary to modify the firewall settings to allow outside access to the default web ports. If you followed the instructions in the prerequisites, you should have a UFW firewall configured to restrict access to your server.</p>
<p>During installation, Apache registers itself with UFW to provide a few application profiles that can be used to enable or disable access to Apache through the firewall.</p>
<p>List the <code>ufw</code> application profiles by running the following:</p>
<pre><code class="lang-plaintext">sudo ufw app list
</code></pre>
<p>Your output will be a list of the application profiles:</p>
<pre><code class="lang-plaintext">OutputAvailable applications:
  Apache
  Apache Full
  Apache Secure
  OpenSSH
</code></pre>
<p>As indicated by the output, there are three profiles available for Apache:</p>
<ul>
<li><p><code>Apache</code>: This profile opens only port <code>80</code> (normal, unencrypted web traffic)</p>
</li>
<li><p><code>Apache Full</code>: This profile opens both port <code>80</code> (normal, unencrypted web traffic) and port <code>443</code> (TLS/SSL encrypted traffic)</p>
</li>
<li><p><code>Apache Secure</code>: This profile opens only port <code>443</code> (TLS/SSL encrypted traffic)</p>
</li>
</ul>
<p>It is recommended that you enable the most restrictive profile that will still allow the traffic you’ve configured. Since you haven’t configured SSL for your server yet in this guide, you’ll only need to allow traffic on port <code>80</code>:</p>
<pre><code class="lang-plaintext">sudo ufw allow 'Apache'
</code></pre>
<p>You can verify the change by checking the status:</p>
<pre><code class="lang-plaintext">sudo ufw status
</code></pre>
<p>The output will provide a list of allowed HTTP traffic:</p>
<pre><code class="lang-plaintext">OutputStatus: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere                  
Apache                     ALLOW       Anywhere                
OpenSSH (v6)               ALLOW       Anywhere (v6)             
Apache (v6)                ALLOW       Anywhere (v6)
</code></pre>
<p>As indicated by the output, the profile has been activated to allow access to the Apache web server.</p>
<h2 id="heading-step-3-checking-your-web-serverhttpswwwdigitaloceancomcommunitytutorialshow-to-install-the-apache-web-server-on-ubuntu-22-04step-3-checking-your-web-server"><a target="_blank" href="https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-22-04#step-3-checking-your-web-server">Step 3 — Checking your Web Server</a></h2>
<p>At the end of the installation process, Ubuntu 22.04 starts Apache. The web server will already be up and running.</p>
<p>Make sure the service is active by running the command for the <code>systemd</code> init system:</p>
<pre><code class="lang-plaintext">sudo systemctl status apache2
</code></pre>
<pre><code class="lang-plaintext">Output● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor prese&gt;
     Active: active (running) since Tue 2022-04-26 15:33:21 UTC; 43s ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 5089 (apache2)
      Tasks: 55 (limit: 1119)
     Memory: 4.8M
        CPU: 33ms
     CGroup: /system.slice/apache2.service
             ├─5089 /usr/sbin/apache2 -k start
             ├─5091 /usr/sbin/apache2 -k start
             └─5092 /usr/sbin/apache2 -k start
</code></pre>
<p>As confirmed by this output, the service has started successfully. However, the best way to test this is to request a page from Apache.</p>
<p>You can access the default Apache landing page to confirm that the software is running properly through your IP address. If you do not know your server’s IP address, you can get it a few different ways from the command line.</p>
<p>Try writing the following at your server’s command prompt:</p>
<pre><code class="lang-plaintext">hostname -I
</code></pre>
<p>You will receive a few addresses separated by spaces. You can try each in your web browser to determine if they work.</p>
<p>Another option is to use the free <a target="_blank" href="http://icanhazip.com"><code>icanhazip.com</code></a> tool. This is a website that, when accessed, returns your machine’s public IP address as read from another location on the internet:</p>
<pre><code class="lang-plaintext">curl -4 icanhazip.com
</code></pre>
<p>When you have your server’s IP address, enter it into your browser’s address bar:</p>
<pre><code class="lang-plaintext">http://your_server_ip
</code></pre>
<p>You will see the default Ubuntu 22.04 Apache web page as in the following:</p>
<p><img src="https://assets.digitalocean.com/articles/how-to-install-apache-webserver-22.04/apache-default.PNG" alt="Apache default page" /></p>
<p>This page indicates that Apache is working correctly. It also includes some basic information about important Apache files and directory locations.</p>
<h2 id="heading-step-4-managing-the-apache-processhttpswwwdigitaloceancomcommunitytutorialshow-to-install-the-apache-web-server-on-ubuntu-22-04step-4-managing-the-apache-process"><a target="_blank" href="https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-22-04#step-4-managing-the-apache-process">Step 4 — Managing the Apache Process</a></h2>
<p>Now that you have your web server up and running, let’s review some basic management commands using <code>systemctl</code>.</p>
<p>To stop your web server, run:</p>
<pre><code class="lang-plaintext">sudo systemctl stop apache2
</code></pre>
<p>Copy</p>
<p>To start the web server when it is stopped, run:</p>
<pre><code class="lang-plaintext">sudo systemctl start apache2
</code></pre>
<p>To stop and then start the service again, run:</p>
<pre><code class="lang-plaintext">sudo systemctl restart apache2
</code></pre>
<p>If you are simply making configuration changes, Apache can often reload without dropping connections. To do this, use the following command:</p>
<pre><code class="lang-plaintext">sudo systemctl reload apache2
</code></pre>
<p>By default, Apache is configured to start automatically when the server boots. If this is not what you want, disable this behavior by running:</p>
<pre><code class="lang-plaintext">sudo systemctl disable apache2
</code></pre>
<p>To re-enable the service to start up at boot, run:</p>
<pre><code class="lang-plaintext">sudo systemctl enable apache2
</code></pre>
<p>Apache will now start automatically when the server boots again.</p>
]]></content:encoded></item><item><title><![CDATA[Building and Deploying a Lightning-Fast React App with Vite (Latest Version) and GitHub + Vercel Integration.]]></title><description><![CDATA[Introduction
In the ever-evolving landscape of frontend development, the need for speed and efficiency is paramount. With Vite, the lightning-fast frontend build tool, and the seamless integration between GitHub and Vercel, deploying React applicatio...]]></description><link>https://samm.dev/building-and-deploying-a-lightning-fast-react-app-with-vite-latest-version-and-github-vercel-integration</link><guid isPermaLink="true">https://samm.dev/building-and-deploying-a-lightning-fast-react-app-with-vite-latest-version-and-github-vercel-integration</guid><category><![CDATA[#samdev015]]></category><dc:creator><![CDATA[Sammy Mulandi]]></dc:creator><pubDate>Sat, 14 Oct 2023 03:03:00 GMT</pubDate><content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>In the ever-evolving landscape of frontend development, the need for speed and efficiency is paramount. With Vite, the lightning-fast frontend build tool, and the seamless integration between GitHub and Vercel, deploying React applications has never been more straightforward. In this guide, we will explore how to create a React app using the latest version of Vite and deploy it on GitHub with Vercel, ensuring a smooth and efficient development process.</p>
<p><strong>Prerequisites</strong></p>
<p>Before we dive in, make sure you have the following prerequisites installed and set up:</p>
<ol>
<li><p><strong>Node.js:</strong> Ensure you have Node.js installed on your system. You can download and install it from <a target="_blank" href="http://nodejs.org">nodejs.org</a>.</p>
</li>
<li><p><strong>Git:</strong> Install Git from <a target="_blank" href="http://git-scm.com">git-scm.com</a>.</p>
</li>
<li><p><strong>GitHub Account:</strong> If you don’t have a GitHub account, you can sign up for free at <a target="_blank" href="http://github.com">github.com</a>.</p>
</li>
<li><p><strong>Vercel Account:</strong> Create a Vercel account at <a target="_blank" href="http://vercel.com">vercel.com</a>.</p>
</li>
</ol>
<p><strong>Step 1: Installing Vite</strong></p>
<p>First, let’s install the latest version of Vite globally on your system using npm. Open your terminal or command prompt and run the following command:</p>
<pre><code class="lang-plaintext">npm install -g create-vite@latest
</code></pre>
<p><strong>Step 2: Creating a New Vite Project</strong></p>
<p>Create a new React project using Vite by running the following command in your terminal:</p>
<pre><code class="lang-plaintext">create-vite my-react-app --template react
</code></pre>
<p>This command sets up a new React project in a folder named <code>my-react-app</code>.</p>
<p><strong>Step 3: Navigating to Your Project Directory</strong></p>
<p>Move into your project directory using the <code>cd</code> command:</p>
<pre><code class="lang-plaintext">cd my-react-app
</code></pre>
<p><strong>Step 4: Developing Your React App</strong></p>
<p>Start your development server by running:</p>
<pre><code class="lang-plaintext">npm run dev
</code></pre>
<p>This command launches a development server, allowing you to preview your React app locally.</p>
<p><strong>Step 5: Setting Up GitHub Repository</strong></p>
<p>Initialize a new Git repository in your project folder:</p>
<pre><code class="lang-plaintext">git init
</code></pre>
<p>Create a new repository on GitHub. Follow the instructions provided on GitHub to add your existing repository to your project folder.</p>
<p><strong>Step 6: Deploying on Vercel</strong></p>
<ol>
<li>Install the Vercel CLI globally if you haven’t already:</li>
</ol>
<pre><code class="lang-plaintext">npm install -g vercel
</code></pre>
<ol>
<li>Deploy your React app on Vercel by running the following command:</li>
</ol>
<pre><code class="lang-plaintext">vercel
</code></pre>
<p>Follow the prompts, and Vercel will guide you through the deployment process. Once deployed, Vercel will provide you with a unique URL for your React app.</p>
<p><strong>URL for my React App</strong></p>
<p><a target="_blank" href="https://vite-project-psi-seven.vercel.app/">https://vite-project-psi-seven.vercel.app/</a></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1697250589930/c500d8fb-4b30-4e8d-bdc4-cecfcbd4920c.png" alt class="image--center mx-auto" /></p>
<p><strong>Conclusion</strong></p>
<p>In this guide, we explored the process of creating a lightning-fast React app using the latest version of Vite and seamlessly deploying it on GitHub with Vercel. The combination of Vite’s speed and GitHub + Vercel integration provides developers with an efficient workflow, allowing them to focus on building exceptional user experiences.</p>
]]></content:encoded></item></channel></rss>