<?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: Daniel Felix</title>
    <description>The latest articles on DEV Community by Daniel Felix (@danielfelix).</description>
    <link>https://dev.to/danielfelix</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%2F411411%2Fb797e2f7-4586-4341-a274-b205f4aba7c7.jpg</url>
      <title>DEV Community: Daniel Felix</title>
      <link>https://dev.to/danielfelix</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/danielfelix"/>
    <language>en</language>
    <item>
      <title>How to Configure Git Username and Email Address</title>
      <dc:creator>Daniel Felix</dc:creator>
      <pubDate>Fri, 11 Jun 2021 02:51:09 +0000</pubDate>
      <link>https://dev.to/danielfelix/how-to-configure-git-username-and-email-address-204k</link>
      <guid>https://dev.to/danielfelix/how-to-configure-git-username-and-email-address-204k</guid>
      <description>&lt;p&gt;Git is a distributed version control system that’s being used by most software teams today. The first thing you should do after installing Git on your system is to configure your git username and email address. Git associate your identity with every commit you make.&lt;/p&gt;

&lt;p&gt;Git allows you to set a global and per-project username and email address. You can set or change your git identity using the &lt;code&gt;git config&lt;/code&gt; command. Changes only affect future commits. The name and email associated with the commits you made prior to the change are not affected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Global Git Username and Password
&lt;/h2&gt;

&lt;p&gt;The global git username and password are associated with commits on all repositories on your system that don’t have repository-specific values.&lt;/p&gt;

&lt;p&gt;To set your global commit name and email address run the &lt;code&gt;git config&lt;/code&gt; command with the &lt;code&gt;--global&lt;/code&gt; option:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name "Your Name"
git config --global user.email "youremail@yourdomain.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once done, you can confirm that the information is set by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user.name=Your Name
user.email=youremail@yourdomain.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command saves the values in the global configuration file, &lt;code&gt;~/.gitconfig&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;~/.gitconfig&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[user]
    name = Your Name
    email = youremail@yourdomain.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also edit the file with your text editor, but it is recommended to use the &lt;code&gt;git config&lt;/code&gt; command.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Git Username and Password for a Single Repository
&lt;/h2&gt;

&lt;p&gt;If you want to use a different username or email address for a specific repository, run the &lt;code&gt;git config&lt;/code&gt; command without the &lt;code&gt;--global&lt;/code&gt; option from within the repository directory.&lt;/p&gt;

&lt;p&gt;Let’s say you want to set a repository-specific username and email address for a stored in the &lt;code&gt;~/Projects/myapp&lt;/code&gt; directory. First, switch the repository root directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ~/Projects/myapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set a Git username and email address:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config user.name "Your Name"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify that the changes were made correctly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user.name=Your Name
user.email=youremail@yourdomain.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The repository-specific setting are kept in the &lt;code&gt;.git/config&lt;/code&gt; file under the root directory of the repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The Git username and email address can be set with the &lt;code&gt;git config&lt;/code&gt; command. The values are associated with your commits.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>bitbucket</category>
    </item>
    <item>
      <title>How to list all SSL certificates issued by Certbot and how to delete one in Ubuntu</title>
      <dc:creator>Daniel Felix</dc:creator>
      <pubDate>Fri, 11 Jun 2021 02:45:04 +0000</pubDate>
      <link>https://dev.to/danielfelix/how-to-list-all-ssl-certificates-issued-by-certbot-and-how-to-delete-one-in-ubuntu-1356</link>
      <guid>https://dev.to/danielfelix/how-to-list-all-ssl-certificates-issued-by-certbot-and-how-to-delete-one-in-ubuntu-1356</guid>
      <description>&lt;p&gt;If you are using Let’s Encrypt Certbot to issue SSL certificates for your site and want to display a list of all your SSL certificates.&lt;/p&gt;

&lt;p&gt;You can run the following if your server is using certbot.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;certbot certificates&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bAN_moGL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vqsd0xdgunwl28tkqtrb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bAN_moGL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vqsd0xdgunwl28tkqtrb.png" alt="List all SSL certificates issued by Certbot in Ubuntu" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To delete a Let’s Encrypt SSL certificate that is on your server run the following.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;certbot delete&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and choose the number that correspond to the site you want to delete the SSL certificate for.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BCv3R1-x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cwszxzztaec49749av63.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BCv3R1-x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cwszxzztaec49749av63.png" alt="Delete SSL certificates issued by Certbot in Ubuntu" width="800" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>ssl</category>
      <category>certbot</category>
    </item>
    <item>
      <title>Print the raw query from dbo for debugging Joomla</title>
      <dc:creator>Daniel Felix</dc:creator>
      <pubDate>Wed, 02 Jun 2021 01:57:12 +0000</pubDate>
      <link>https://dev.to/danielfelix/print-the-raw-query-from-dbo-for-debugging-joomla-5cc1</link>
      <guid>https://dev.to/danielfelix/print-the-raw-query-from-dbo-for-debugging-joomla-5cc1</guid>
      <description>&lt;p&gt;We can use Joomla's &lt;code&gt;replacePrefix&lt;/code&gt; function which dumps out the query in a format that can be inserted straight into the likes of phpMyAdmin.&lt;/p&gt;

&lt;p&gt;Here's a simple example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;JFactory&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;getDbo&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nv"&gt;$query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$db&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getQuery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$query&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$db&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;quoteName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'title'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
      &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$db&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;quoteName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'#__content'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="nv"&gt;$db&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;setQuery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$query&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Dump the query&lt;/span&gt;
&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$db&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;replacePrefix&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;$query&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Will output the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;SELECT &lt;span class="sb"&gt;`&lt;/span&gt;title&lt;span class="sb"&gt;`&lt;/span&gt; FROM &lt;span class="sb"&gt;`&lt;/span&gt;jos_content&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>php</category>
      <category>joomla</category>
      <category>debugging</category>
      <category>programming</category>
    </item>
    <item>
      <title>Renaming a remote on GIT</title>
      <dc:creator>Daniel Felix</dc:creator>
      <pubDate>Wed, 02 Jun 2021 01:53:12 +0000</pubDate>
      <link>https://dev.to/danielfelix/renaming-a-remote-on-git-2j58</link>
      <guid>https://dev.to/danielfelix/renaming-a-remote-on-git-2j58</guid>
      <description>&lt;p&gt;Use the &lt;code&gt;git remote rename&lt;/code&gt;  command to rename an existing remote.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;git remote rename&lt;/code&gt;  command takes two arguments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An existing remote name, for example, &lt;code&gt;origin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A new name for the remote, for example, &lt;code&gt;destination&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# view existing remotes of a repo&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; origin    git@github.com:itsdanielfelix/my-awesome-repo.git &lt;span class="o"&gt;(&lt;/span&gt;fetch&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; origin    git@github.com:itsdanielfelix/my-awesome-repo.git &lt;span class="o"&gt;(&lt;/span&gt;push&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# change remote name from 'origin' to 'github'&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git remote rename origin github

&lt;span class="c"&gt;# Verify it&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; github    git@github.com:itsdanielfelix/my-awesome-repo.git &lt;span class="o"&gt;(&lt;/span&gt;fetch&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; github    git@github.com:itsdanielfelix/my-awesome-repo.git &lt;span class="o"&gt;(&lt;/span&gt;push&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>github</category>
      <category>git</category>
      <category>bitbucket</category>
    </item>
    <item>
      <title>Removing a remote from GIT</title>
      <dc:creator>Daniel Felix</dc:creator>
      <pubDate>Wed, 02 Jun 2021 01:45:21 +0000</pubDate>
      <link>https://dev.to/danielfelix/removing-a-remote-from-git-10a6</link>
      <guid>https://dev.to/danielfelix/removing-a-remote-from-git-10a6</guid>
      <description>&lt;p&gt;Use the &lt;code&gt;git remote rm&lt;/code&gt;  command to remove a remote URL from your repository.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;git remote rm&lt;/code&gt;  command takes one argument:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A remote name, for example, &lt;code&gt;destination&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# view all remotes of a repo&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; origin    git@github.com:itsdanielfelix/my-awesome-repo.git &lt;span class="o"&gt;(&lt;/span&gt;fetch&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; origin    git@github.com:itsdanielfelix/my-awesome-repo.git &lt;span class="o"&gt;(&lt;/span&gt;push&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; gitlab    git@gitlab.com:itsdanielfelix/my-awesome-repo.git &lt;span class="o"&gt;(&lt;/span&gt;fetch&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; gitlab    git@gitlab.com:itsdanielfelix/my-awesome-repo.git &lt;span class="o"&gt;(&lt;/span&gt;push&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# Remove a remote&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git remote &lt;span class="nb"&gt;rm &lt;/span&gt;gitlab

&lt;span class="c"&gt;# Verify it&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; origin    git@github.com:itsdanielfelix/my-awesome-repo.git &lt;span class="o"&gt;(&lt;/span&gt;fetch&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; origin    git@github.com:itsdanielfelix/my-awesome-repo.git &lt;span class="o"&gt;(&lt;/span&gt;push&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>github</category>
      <category>git</category>
      <category>bitbucket</category>
      <category>gitlab</category>
    </item>
  </channel>
</rss>
