<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: zidane</title>
    <description>The latest articles on DEV Community by zidane (@zidane168).</description>
    <link>https://dev.to/zidane168</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1133336%2Fd7adef5b-4b7c-4a8b-b5df-6143f1086625.png</url>
      <title>DEV Community: zidane</title>
      <link>https://dev.to/zidane168</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zidane168"/>
    <language>en</language>
    <item>
      <title>HOW TO SET UP 2FA ON GITHUB AND WHY IT'S IMPORTANT FOR YOUR SECURITY</title>
      <dc:creator>zidane</dc:creator>
      <pubDate>Fri, 01 Sep 2023 04:38:48 +0000</pubDate>
      <link>https://dev.to/zidane168/how-to-set-up-2fa-on-github-and-why-its-important-for-your-security-58gf</link>
      <guid>https://dev.to/zidane168/how-to-set-up-2fa-on-github-and-why-its-important-for-your-security-58gf</guid>
      <description>&lt;p&gt;If you use GitHub to store, manage, or collaborate on code, you probably want to keep your account and repositories safe from unauthorized access. One of the best ways to do that is to enable two-factor authentication (2FA) on your GitHub account.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How to set up 2FA on GitHub and why it's important for your security&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Two-factor authentication (2FA)
&lt;/h2&gt;

&lt;p&gt;is a security feature that adds an extra layer of protection to your online accounts. It requires you to provide two pieces of information when you sign in: something you know (your password) and something you have (your phone, a security key, or a passkey). This way, even if someone steals or guesses your password, they won't be able to access your account without the second factor.&lt;/p&gt;

&lt;p&gt;GitHub supports several methods of 2FA, such as using a time-based one-time password (TOTP) app, receiving a text message, tapping a notification in GitHub Mobile, or using a security key. You can choose the one that suits your needs and preferences. You can also add multiple methods as backup options in case you lose access to one of them.&lt;/p&gt;

&lt;p&gt;To enable 2FA on GitHub, you need to follow these steps:&lt;/p&gt;

&lt;p&gt;•  Log in to your GitHub account and go to Settings.&lt;br&gt;
How to set up 2FA on GitHub and why it's important for your security&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Lrg5uRsD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/98r4uvt7itmfo2ewwh83.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Lrg5uRsD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/98r4uvt7itmfo2ewwh83.png" alt="Image description" width="656" height="988"&gt;&lt;/a&gt;&lt;br&gt;
•  Under Access, select Password and authentication.&lt;br&gt;
How to set up 2FA on GitHub and why it's important for your security -  Webzone Tech Tips - Zidane&lt;/p&gt;

&lt;p&gt;•  Click the green button that says "Enable two-factor authentication".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ImAx3R9b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4vdap0x727asemee8s2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ImAx3R9b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4vdap0x727asemee8s2.png" alt="Image description" width="800" height="685"&gt;&lt;/a&gt;&lt;br&gt;
•  Choose the method of 2FA you want to use and follow the instructions on the screen.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On this step you can choose Mobile Verification or Choose Authentication app via microsoft authenticator (just simple add account and scan the QR code on github above screen)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;•  Save your recovery codes in a safe place. You'll need them if you lose access to your 2FA method or device.&lt;/p&gt;

&lt;p&gt;How to set up 2FA on GitHub and why it's important for your security&lt;/p&gt;

&lt;p&gt;After you enable 2FA, you'll need to provide your second factor every time you sign in to GitHub through your browser. You'll also need to use a token, application, or SSH key when accessing GitHub through other methods, such as the API or the command line.&lt;/p&gt;

&lt;p&gt;Enabling 2FA on GitHub has many benefits for your security and privacy. It can help you:&lt;/p&gt;

&lt;p&gt;•  Protect your account from hackers who may try to steal your password or personal information.&lt;/p&gt;

&lt;p&gt;•  Prevent unauthorized changes to your code or repositories.&lt;/p&gt;

&lt;p&gt;•  Avoid losing access to your account if someone tries to reset your password.&lt;/p&gt;

&lt;p&gt;•  Comply with the security policies of organizations that require 2FA for their members.&lt;/p&gt;

&lt;p&gt;By enabling 2FA on GitHub, you can enjoy coding with peace of mind, knowing that your account and code are well protected.&lt;/p&gt;

&lt;p&gt;More security tips you can view more &lt;a href="https://learn-tech-tips.blogspot.com/search?q=security"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading this post. I hope you found it helpful and easy to follow. If you have any feedback or questions about How to set up 2FA on GitHub and why it's important for your security , please share them in the comments below. I would love to hear from you and discuss this topic further&lt;br&gt;
✋✋✋✋  Webzone Tech Tips, all things Tech Tips for web development  - I am Zidane, See you next time soon ✋✋✋✋&lt;/p&gt;

</description>
      <category>github</category>
      <category>2fa</category>
      <category>security</category>
    </item>
    <item>
      <title>CakePHP plugin for usage of RabbitMQ</title>
      <dc:creator>zidane</dc:creator>
      <pubDate>Sat, 05 Aug 2023 02:32:56 +0000</pubDate>
      <link>https://dev.to/zidane168/cakephp-plugin-for-usage-of-rabbitmq-3lli</link>
      <guid>https://dev.to/zidane168/cakephp-plugin-for-usage-of-rabbitmq-3lli</guid>
      <description>&lt;p&gt;&lt;strong&gt;CakePHP&lt;/strong&gt; is a PHP web application framework that can be used to build web applications that interact with RabbitMQ. Here's an example of how to use CakePHP with RabbitMQ:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install the PHP AMQP extension: &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The PHP AMQP extension provides a PHP interface for interacting with RabbitMQ. You can install this extension using PECL by running the following command:&lt;br&gt;
pecl install amqp&lt;/p&gt;

&lt;p&gt;if get error "Zend Extension Api No: 320190902 Cannot find autoconf"&lt;/p&gt;

&lt;p&gt;CakePHP plugin for usage of RabbitMQ&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kj5TlLH_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5obt8vcvkbia3lvm04m7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kj5TlLH_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5obt8vcvkbia3lvm04m7.png" alt="Image description" width="800" height="561"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;run more command

brew install autoconf
brew install rabbitmq-c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;composer require php-amqplib/php-amqplib&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Configure the RabbitMQ connection: &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In your CakePHP application, you can configure the RabbitMQ connection in the app/config/bootstrap.php file. Here's an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Cake\Core\Configure;
use PhpAmqpLib\Connection\AMQPStreamConnection;

Configure::write('RabbitMQ', [
    'host' =&amp;gt; 'localhost',
    'port' =&amp;gt; 5672,
    'username' =&amp;gt; 'guest',
    'password' =&amp;gt; 'guest',
    'vhost' =&amp;gt; '/',
]);

$connection = new AMQPStreamConnection(
    Configure::read('RabbitMQ.host'),
    Configure::read('RabbitMQ.port'),
    Configure::read('RabbitMQ.username'),
    Configure::read('RabbitMQ.password'),
    Configure::read('RabbitMQ.vhost')
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code sets the RabbitMQ connection parameters in the Configure object and creates a new AMQPStreamConnection object.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Send messages to RabbitMQ: &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To send messages to RabbitMQ, you can use the PhpAmqpLib\Channel\AMQPChannel class. Here's an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use PhpAmqpLib\Message\AMQPMessage;

$channel = $connection-&amp;gt;channel();

$exchangeName = 'my-exchange';
$queueName = 'my-queue';

$channel-&amp;gt;exchange_declare($exchangeName, 'direct', false, true, false);
$channel-&amp;gt;queue_declare($queueName, false, true, false, false);
$channel-&amp;gt;queue_bind($queueName, $exchangeName);

$messageBody = 'Hello, RabbitMQ!';
$message = new AMQPMessage($messageBody);

$channel-&amp;gt;basic_publish($message, $exchangeName);

$channel-&amp;gt;close();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code declares an exchange and a queue, binds the queue to the exchange, creates a new message, and publishes the message to the exchange.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Receive messages from RabbitMQ: &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To receive messages from RabbitMQ, you can use the PhpAmqpLib\Channel\AMQPChannel class and define a callback function to handle incoming messages. Here's an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use PhpAmqpLib\Message\AMQPMessage; 
$callback = function ($message) {
    echo 'Received message: ' . $message-&amp;gt;body . PHP_EOL;
};

$channel-&amp;gt;basic_consume($queueName, '', false, true, false, false, $callback);

while (count($channel-&amp;gt;callbacks)) {
    $channel-&amp;gt;wait();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code sets up a callback function that simply echoes the message body to the console. It then sets up a consumer on the queue and waits for incoming messages.&lt;/p&gt;

&lt;p&gt;Overall, using CakePHP with RabbitMQ involves configuring the RabbitMQ connection and using the PhpAmqpLib library to send and receive messages. There are many other features and configurations available in RabbitMQ, and the CakePHP framework has many other features and capabilities as well&lt;/p&gt;

&lt;p&gt;Thank you for reading this post. I hope you found it helpful and easy to follow. If you have any feedback or questions about &lt;a href="https://learn-tech-tips.blogspot.com/2023/08/cakephp-plugin-for-usage-of-rabbitmq.html"&gt;CakePHP plugin for usage of RabbitMQ&lt;/a&gt; , please share them in the comments below. I would love to hear from you and discuss this topic further&lt;br&gt;
✋✋✋✋  Webzone Tech Tips, all things Tech Tips for web development  - I am Zidane, See you next time soon ✋✋✋✋&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>rabbitmq</category>
      <category>php</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
