<?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: B. Burt</title>
    <description>The latest articles on DEV Community by B. Burt (@beeburrt).</description>
    <link>https://dev.to/beeburrt</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%2F896290%2F7f2f96bf-5332-4dfb-8759-466c463762b7.png</url>
      <title>DEV Community: B. Burt</title>
      <link>https://dev.to/beeburrt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/beeburrt"/>
    <language>en</language>
    <item>
      <title>Gaming the GitHub Contributions Stats</title>
      <dc:creator>B. Burt</dc:creator>
      <pubDate>Thu, 29 Dec 2022 05:35:49 +0000</pubDate>
      <link>https://dev.to/beeburrt/gaming-the-github-contributions-stats-2o44</link>
      <guid>https://dev.to/beeburrt/gaming-the-github-contributions-stats-2o44</guid>
      <description>&lt;p&gt;I'm mainly writing this in order to hear y'all's thoughts and opinions (so please share in the comments below) regarding this idea of mine.&lt;/p&gt;

&lt;p&gt;And that idea is to&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;git commit&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 and&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;git push&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 (to GitHub) every single little thing I can, every single day, in order to get my stats in the little green stats chart to shine. To look good for future prospective employers.&lt;/p&gt;

&lt;p&gt;I want solid green across that thing for 2023! 😝&lt;/p&gt;

&lt;p&gt;What do you all think about that? Anybody doing, or have done the same thing? Is it a dumb idea?&lt;/p&gt;

</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>Two Of The Same Blue Firefox Developer Edition Icons On My Dock! WTH?</title>
      <dc:creator>B. Burt</dc:creator>
      <pubDate>Tue, 15 Nov 2022 21:54:58 +0000</pubDate>
      <link>https://dev.to/beeburrt/two-of-the-same-blue-firefox-developer-edition-icons-on-my-dock-wth-404p</link>
      <guid>https://dev.to/beeburrt/two-of-the-same-blue-firefox-developer-edition-icons-on-my-dock-wth-404p</guid>
      <description>&lt;p&gt;Recently, I ran into some issues trying to install Firefox Developer Edition and so I'm writing this in the hopes that I can save somebody some trouble.&lt;/p&gt;

&lt;p&gt;My issues were that A) I didn't know how to go from a folder in my Downloads directory to a working browser, and B) after I got the browser installed, I had a dumb icon for it, the system default icon instead of the nice blue firefox logo icon.&lt;/p&gt;

&lt;p&gt;Oh, and also, I just remembered, I HAD TWO OF THE SAME ICON!! &lt;/p&gt;

&lt;p&gt;After I got the right icon showing up, I'd close the browser, there'd be the one icon on my dock, because I had pinned it there. If I fired up Firefox Developer Edition, there'd be a second blue icon on my dock. And that bugged me.&lt;/p&gt;

&lt;p&gt;But we can fix it with a .desktop file.&lt;/p&gt;

&lt;p&gt;You can get the Firefox Developer Edition browser from the &lt;a href="https://www.mozilla.org/en-US/firefox/developer/"&gt;Mozilla website&lt;/a&gt;, which I did.&lt;/p&gt;

&lt;p&gt;And we're left with a compressed archive in our downloads directory. In my case (I'm on Linux) it's called 'firefox-108.0b1.tar.bz2'.&lt;/p&gt;

&lt;p&gt;Ok. Now what?&lt;/p&gt;

&lt;p&gt;Let's right-click on it, and select "Extract Here" from the dropdown.&lt;/p&gt;

&lt;p&gt;Now we have a folder named: "firefox-108.ob1", that's not a browser! lol.&lt;/p&gt;

&lt;p&gt;So the next move is to try something different.&lt;/p&gt;

&lt;p&gt;The first time I went through this, a while back, I found a forum thread on this topic on &lt;em&gt;Ask Ubuntu&lt;/em&gt;, &lt;a href="https://askubuntu.com/questions/548003/how-do-i-install-the-firefox-developer-edition"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Recently I've been reading &lt;em&gt;How Linux Works, 3rd Edition&lt;/em&gt; by Brian Ward and I had just read the section about dealing with compressed files. So let's try working with this file from the command line.&lt;/p&gt;

&lt;p&gt;I learned that there's actually two steps involved here, decompressing and then unpacking. and you want to work from left to right (you can do it in one step but I want to do them separately). And the order is important.&lt;/p&gt;

&lt;p&gt;First we use the bzip2 tool and give it the name of the file, run:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;bunzip2 firefox-108.0b1.tar.bz2&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 to decompress it. Now I'm left with 'firefox-108.0b1.tar', minus the 'bz2' at the end. So that worked.&lt;/p&gt;

&lt;p&gt;Now let's check the contents with the 'table-of-contents' mode by running:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;tar -tvf firefox-108.0b1.tar&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;With that command, I can see that I'm not going to be left with a mess of files everywhere in my Downloads directory because I can see the directory structure, everything will be in a firefox folder.&lt;/p&gt;

&lt;p&gt;So let's run the same command, except switch the -t for an -x, and throw in a -p, like this:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;tar -xpvf firefox-108.0b1.tar&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;The -p is for preserve permissions (not sure if it's needed, but I included it to be safe), the -x is for extract, the -v is for verbose mode, and the -f is for file.&lt;/p&gt;

&lt;p&gt;Then delete the .tar file.&lt;/p&gt;

&lt;p&gt;Now I'm left with a folder named firefox. That's not a browser! lol. Now what?&lt;/p&gt;

&lt;p&gt;That forum thread I mentioned earlier, the &lt;em&gt;Ask Ubuntu&lt;/em&gt; forum, suggested an alternative method with a tool called Ubuntu Make. Here's &lt;a href="https://github.com/ubuntu/ubuntu-make"&gt;Ubuntu Make's GitHUb&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To install Ubuntu Make:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;snap install ubuntu-make --classic&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Or better yet:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;sudo add-apt-repository ppa:lyzardking/ubuntu-make&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 and then:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;sudo apt-get update&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 and finally:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;sudo apt-get ubuntu-make&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;After installing Ubuntu Make, you can run:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;umake web firefox-dev&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Another solution, and this is the one that I used this time because it's just cool is a Bash script to do all the work for you. It is from tanrax &lt;a href="https://github.com/tanrax/linux-install-firefox-developer-edition"&gt;on GitHub here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Run this command using curl and piped into Bash:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;curl -s -L linux-install-firefox-developer-edition   https://raw.githubusercontent.com/tanrax/linux-install-firefox-developer-edition/main/linux-install-firefox-developer-edition  | bash&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;This command fetches the script from his GitHub repository, then runs it. It even keeps you posted on it's progress in the terminal. Pretty cool, huh?&lt;/p&gt;

&lt;p&gt;Here's the entire script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="c"&gt;# START&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt;

&lt;span class="c"&gt;## UNINSTALL&lt;/span&gt;
&lt;span class="c"&gt;# Remove binaries&lt;/span&gt;
&lt;span class="nb"&gt;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /opt/firefox-developer/ /usr/bin/firefox-developer

&lt;span class="c"&gt;# DOWNLOAD&lt;/span&gt;
curl &lt;span class="nt"&gt;-L&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; firefox-developer.tar.bz2 https://download.mozilla.org/&lt;span class="se"&gt;\?&lt;/span&gt;product&lt;span class="se"&gt;\=&lt;/span&gt;firefox-devedition-latest-ssl&lt;span class="se"&gt;\&amp;amp;&lt;/span&gt;os&lt;span class="se"&gt;\=&lt;/span&gt;linux64&lt;span class="se"&gt;\&amp;amp;&lt;/span&gt;lang&lt;span class="se"&gt;\=&lt;/span&gt;en-US

&lt;span class="c"&gt;# EXTRACT&lt;/span&gt;
&lt;span class="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-xf&lt;/span&gt; firefox-developer.tar.bz2
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; firefox-developer.tar.bz2
&lt;span class="nb"&gt;mv &lt;/span&gt;firefox firefox-developer

&lt;span class="c"&gt;# INSTALL&lt;/span&gt;
&lt;span class="nb"&gt;sudo mv &lt;/span&gt;firefox-developer /opt
&lt;span class="nb"&gt;sudo ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /opt/firefox-developer/firefox /usr/bin/firefox-developer

&lt;span class="c"&gt;# DESKTOP INTEGRATION&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"[Desktop Entry]&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Encoding=UTF-8&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Name=Firefox Developer Edition&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Comment=Firefox Developer Edition&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Exec=/opt/firefox-developer/firefox %u&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Terminal=false&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Icon=/opt/firefox-developer/browser/chrome/icons/default/default128.png&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;StartupWMClass=Firefox Developer&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Type=Application&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Categories=Network;WebBrowser;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;x-scheme-handler/http;x-scheme-handler/https;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;StartupNotify=true&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /usr/share/applications/firefox-developer.desktop

&lt;span class="c"&gt;# NOTIFY&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Installed!"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The issue with the two icons, that I ran into in the past  has something to do with a file that has a .desktop file extension.&lt;/p&gt;

&lt;p&gt;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;[Desktop Entry]
Name=Firefox Developer 
GenericName=Firefox Developer Edition
Exec=/opt/firefox_dev/firefox %u
Terminal=false
Icon=/opt/firefox_dev/browser/chrome/icons/default/default128.png
Type=Application
Categories=Application;Network;X-Developer;
Comment=Firefox Developer Edition Web Browser.
StartupWMClass=Firefox Developer Edition
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can find these in your /usr/share/applications/ directory.&lt;/p&gt;

&lt;p&gt;You can see that in the example above, the icons are in /opt/firefox_dev/browser/chrome/icons/default/. You can look for your icons there.&lt;/p&gt;

&lt;p&gt;If the "Icon" line in your .desktop file says something different than where you found your icons, then change that line to where you found your icons.&lt;/p&gt;

&lt;p&gt;I ran this command:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;xprop WM_CLASS&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;which will turn your pointer or cursor into a little crosshairs thing. Move the crosshairs onto (anywhere on top of) your Firefox Developer browser window and click. Displayed in your terminal will be the WM_CLASS (whatever that is). My output said: '"Navigator", "firefox"'.&lt;/p&gt;

&lt;p&gt;And so I changed the line on my firefox-dev.desktop file, the line that says 'StartupWMClass' (the last line in the example above), I changed it to "Navigator", "firefox". I think I even threw in an "aurora" in there for good measure, lol. And that fixed my issue with the two icons.&lt;/p&gt;

&lt;p&gt;Using that script from tanrax, I didn't have that issue.&lt;/p&gt;

&lt;p&gt;Try running: &lt;code&gt;xprop&lt;/code&gt; by itself and then clicking on your browser window. The output in your terminal has a lot more info for you. HaHa, even some pictures of the logo.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Linux Kernel 5.19.12 Damaging Laptop LCD Screens?</title>
      <dc:creator>B. Burt</dc:creator>
      <pubDate>Thu, 06 Oct 2022 23:23:58 +0000</pubDate>
      <link>https://dev.to/beeburrt/linux-kernel-51912-damaging-laptop-lcd-screens-3bmc</link>
      <guid>https://dev.to/beeburrt/linux-kernel-51912-damaging-laptop-lcd-screens-3bmc</guid>
      <description>&lt;p&gt;I read about this last night while perusing &lt;a href="https://news.ycombinator.com/"&gt;Hacker News&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://arstechnica.com/gadgets/2022/10/linux-5-19-2-kernel-can-flicker-and-damage-screens-on-some-intel-gpu-laptops/"&gt;Here's an Ars Technica article about it&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lore.kernel.org/all/YzwooNdMECzuI5+h@intel.com/"&gt;And here's this&lt;/a&gt; from kernel.org&lt;/p&gt;

&lt;p&gt;On Linux you can check your Kernel version with&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;uname -r&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Be safe y'all. Take care.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>On Switching From Ubuntu</title>
      <dc:creator>B. Burt</dc:creator>
      <pubDate>Thu, 22 Sep 2022 17:59:56 +0000</pubDate>
      <link>https://dev.to/beeburrt/on-switching-from-ubuntu-1a0k</link>
      <guid>https://dev.to/beeburrt/on-switching-from-ubuntu-1a0k</guid>
      <description>&lt;p&gt;I started working through &lt;a href="https://www.theodinproject.com/"&gt;The Odin Project's&lt;/a&gt; curriculum earlier this year (2022). In the earliest sections, we went through things like: choosing a text editor, setting up git, command-line basics, and most importantly, at least for me, getting started with Linux.&lt;/p&gt;

&lt;p&gt;Ubuntu is the distro they recommended, and being new to it all, I was a little reluctant to give up Windows entirely. So I went through the process of configuring a dual-boot set-up with Windows alongside Ubuntu. Though not too long after, I made the switch entirely and gave up Windows once and for all.&lt;/p&gt;

&lt;p&gt;I actually enjoyed setting it up though, learning how to dual-boot my machine, having to solve certain issues by searching on forums and reading about how other people solved the same problems I was having.&lt;/p&gt;

&lt;p&gt;Being kind of privacy-minded, I eventually stumbled upon &lt;a href="https://prism-break.org/en/"&gt;Prism Break&lt;/a&gt; a web site which offers good alternatives to the software offered by the mega-corporations.&lt;/p&gt;

&lt;p&gt;From &lt;a href="https://en.wikipedia.org/wiki/PRISM"&gt;Wikipedia&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;PRISM is a code name for a program under which the United States National Security Agency (NSA) collects internet communications from various U.S. internet companies.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And so ever since reading bout how Ubuntu, and any derivative of Ubuntu, is NOT recommended by Prism Break, for &lt;a href="https://www.eff.org/deeplinks/2012/10/privacy-ubuntu-1210-amazon-ads-and-data-leaks"&gt;reasons&lt;/a&gt;, I decided to eventually switch Operating Systems.&lt;/p&gt;

&lt;p&gt;And while I can see the appeal in "distro-hopping," as they say, it is kind of fun, it's also kind of a pain.&lt;/p&gt;

&lt;p&gt;But so I went looking for a new OS. Trying to decide which OS I wanted to switch to, I considered a few: &lt;a href="https://pop.system76.com/"&gt;Pop!_OS&lt;/a&gt;, &lt;a href="https://getfedora.org/"&gt;Fedora&lt;/a&gt;, &lt;a href="https://linuxmint.com/"&gt;Mint&lt;/a&gt;, &lt;a href="https://www.freebsd.org/"&gt;FreeBSD&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;A couple weeks ago I finally made the switch. To &lt;a href="https://www.debian.org/"&gt;Debian&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The thing that sold me was their &lt;a href="https://www.debian.org/intro/philosophy"&gt;philosophy&lt;/a&gt;, and their &lt;a href="https://www.debian.org/social_contract"&gt;Social Contract&lt;/a&gt; and while there are some downsides (Systemd, no non-free software, and software that's not always up to date), I'm happy with my choice.&lt;/p&gt;

&lt;p&gt;Thank you for reading and have a great day! :)&lt;/p&gt;

</description>
      <category>linux</category>
      <category>beginners</category>
      <category>operatingsytems</category>
    </item>
    <item>
      <title>Merge yer Own!</title>
      <dc:creator>B. Burt</dc:creator>
      <pubDate>Mon, 05 Sep 2022 10:15:29 +0000</pubDate>
      <link>https://dev.to/beeburrt/merge-yer-own-584f</link>
      <guid>https://dev.to/beeburrt/merge-yer-own-584f</guid>
      <description>&lt;h3&gt;
  
  
  When Git and GitHub don't wanna play nice.
&lt;/h3&gt;




&lt;p&gt;Recently, I struggled trying to merge my remote repo on GitHub with a pre-existing, local repo. I'm gonna try and recreate the scenario here. &lt;/p&gt;

&lt;p&gt;Hopefully this article will save someone the grief that I went through. &lt;/p&gt;

&lt;p&gt;And also, I'm hoping for people with more Git experience than I, to comment down below with some solid advice for me and others. The beauty of learning in public!&lt;/p&gt;

&lt;p&gt;So the other day I made this silly click-counter/color-changer site (link below) and I'm going to merge it with my GitHub repo that I just created. Here's a screenshot of it. Nothing fancy, just for fun and practice.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mJ-iTdPV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9c9trwjo28a7yvrc8kxc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mJ-iTdPV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9c9trwjo28a7yvrc8kxc.png" alt="my color-changer/button-click-counter" width="800" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I know this is beginner-level but hey, what can I say, I'm a beginner :)&lt;/p&gt;

&lt;p&gt;So on my local branch, I don't have a README.md yet. But on GitHub, I checked the "Add a README file" checkbox when I made the repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GBkzlkKn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6u3gaxa6wockvxkwmuns.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GBkzlkKn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6u3gaxa6wockvxkwmuns.png" alt='Creating a repository on GitHub and checking the "Add a README file" checkbox' width="577" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating this repository on GitHub, I made a change to README.md and then commited that change there on GitHub. So now I have divergent branches or unrelated histories or something like that.&lt;/p&gt;

&lt;p&gt;Now, some of you are probably thinking that GitHub gives you instructions on connecting your local repo with GitHub immediately after you create your GitHub repo. That page looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7X413H_h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zgv28j00obflg7c2iuwy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7X413H_h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zgv28j00obflg7c2iuwy.png" alt="Some GitHub command line instructions" width="800" height="653"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Correct me if I'm wrong, but it seems that that page gets skipped if you check the "Add a README file" checkbox. Try it for yourself.&lt;/p&gt;

&lt;p&gt;But remember, this page, the picture up there, you see this when you DON'T add a README. I added a README and so this page got skipped for me. The photo is from a repo I deleted and then I made a new one so I could try a few different things.&lt;/p&gt;

&lt;p&gt;But so, back to my terminal I did:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;git init&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 and all that, did my commit, I add my remote repository that I just created with:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git remote add origin git@github.com:beeburrt/color-changer.git&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;To check it, run:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git remote -v&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;I think this is the part that tripped me up last time, when things didn't go so smoothly for me and I spent way too long trying to figure it out. I'm going through my bash history now, trying to piece it together haha.&lt;/p&gt;

&lt;p&gt;Well, so anyways, I'm just gonna show a few random things first. If I do like it says in that picture above, at the bottom of it, it says to do:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;git branch -M main&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 if you run&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;git branch --help&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 and scroll down a bit, you'll see that the -M flag is a shortcut for --move --force. &lt;/p&gt;

&lt;p&gt;Above that it says this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; With a -m or -M option, &amp;lt;oldbranch&amp;gt; will be renamed to &amp;lt;newbranch&amp;gt;. If
   &amp;lt;oldbranch&amp;gt; had a corresponding reflog, it is renamed to match
   &amp;lt;newbranch&amp;gt;, and a reflog entry is created to remember the branch
   renaming. If &amp;lt;newbranch&amp;gt; exists, -M must be used to force the rename to
   happen.
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;I'm not sure what reflog is, but it sounds kinda gross. Like it automatically comes with dog-slobber on it. "Would you like some reflog on your turkey young man?" I'll have to pass on the reflog, thanks though. Yummy reflog!&lt;/p&gt;

&lt;p&gt;After that at the bottom of that picture it says to do:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;git push -u origin main&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 if I do&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;git push --help&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 it says the -u flag is for --set-upstream let's run it!  &lt;/p&gt;

&lt;p&gt;Here's a shot of the output of that last command:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yNtKUGh5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hpvscnf2cfbqt5x3vtiz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yNtKUGh5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hpvscnf2cfbqt5x3vtiz.png" alt="git push -u origin main from my command-line" width="729" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The message mentions git pull and fast-forward. Let's run it!&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git pull --ff-only origin main&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Here's the output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GJmJqiXj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1sc8puszvr7ag1gg6h5o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GJmJqiXj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1sc8puszvr7ag1gg6h5o.png" alt="command-line output after git pull --ff-only origin main" width="731" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This output says fatal, uh oh, are you ok?&lt;/p&gt;

&lt;p&gt;It says refusing to merge unrelated histories. So let's tell git that we don't care about unrelated histories.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;git pull origin main --allow-unrelated-histories&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Success! Here's the output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fBC4T3H6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l1xwmfmgnjhw66avz0nc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fBC4T3H6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l1xwmfmgnjhw66avz0nc.png" alt="command-line output after git pull origin main --allow-unrelated-histories" width="730" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And for the win, we do:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
git push -u origin main

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;remember the -u is for --set-upstream.&lt;/p&gt;

&lt;p&gt;You can see the silly site &lt;a href="https://beeburrt.github.io/color-changer/"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/6565357/git-push-requires-username-and-password"&gt;This&lt;/a&gt; post helped.&lt;/p&gt;

&lt;p&gt;Here's a couple good Git and GitHub free books.&lt;br&gt;
This one from &lt;a href="https://launchschool.com/books/git"&gt;Launch School&lt;/a&gt;, thanks Launch School!&lt;/p&gt;

&lt;p&gt;And this one from the Learn Enough series &lt;a href="https://www.learnenough.com/git-tutorial"&gt;Learn Enough Git to Be Dangerous&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And of course, the ultimate, granddaddy of all free git books is &lt;a href="https://git-scm.com/book/en/v2"&gt;Pro Git&lt;/a&gt; by Scott Chacon and Ben Straub. I need to spend more time with my nose in this book!&lt;/p&gt;

&lt;p&gt;That's all for now! I hope you liked it. Leave a comment and tell me how I could've done this easier. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/beeburrt"&gt;Buy me a coffee&lt;/a&gt; so I can spend more time learning how to make better stuff than a color-changer/click-counter site haha just kidding, not kidding :)&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Use SSH! All the Cool Kids Are Doing It</title>
      <dc:creator>B. Burt</dc:creator>
      <pubDate>Mon, 05 Sep 2022 07:39:01 +0000</pubDate>
      <link>https://dev.to/beeburrt/use-ssh-all-the-cool-kids-are-doing-it-4egp</link>
      <guid>https://dev.to/beeburrt/use-ssh-all-the-cool-kids-are-doing-it-4egp</guid>
      <description>&lt;p&gt;Hi! I'm BBurt! And today I'm gonna concisely walk you through setting up Secure Shell Access, of which, I only know a little. haha&lt;/p&gt;

&lt;p&gt;So why, if I only know a little, am I trying to explain it? I'm glad you asked! &lt;/p&gt;

&lt;p&gt;Let me tell you :)&lt;/p&gt;

&lt;p&gt;First of all, not too long ago, I was listening to the fabulous Syntax podcast (it's great, you prolly already know) episode &lt;a href="https://syntax.fm/show/478/supper-club-developer-experience-with-shawn-wang"&gt;478&lt;/a&gt; with guest Shawn "Swyx" Wang and he mentioned his own &lt;a href="https://www.learninpublic.org/"&gt;Learn In Public&lt;/a&gt;, I was intrigued so I checked it out and read &lt;a href="https://www.learninpublic.org/v1-principles-learn-in-public.pdf"&gt;this&lt;/a&gt; free chapter. It's good. You should read it.&lt;/p&gt;

&lt;p&gt;But so, I'm taking his advice and learning in public!&lt;/p&gt;

&lt;p&gt;The other reason I'm writing this is because, you know how they say that if your function is doing too much, or too many things, you should probably refactor, split it up into more than one function? &lt;/p&gt;

&lt;p&gt;Well similarly, I was writing this other piece here and it was doing too much. Hence this :) &lt;/p&gt;

&lt;p&gt;What the heck is SSH, anyways?&lt;/p&gt;

&lt;p&gt;Well, how about a definition?&lt;/p&gt;

&lt;p&gt;From &lt;a href="https://en.wikipedia.org/wiki/Secure_Shell"&gt;Wikipedia&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Secure Shell Protocol (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Its most notable applications are remote login and command-line execution.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hey, that's us! Remote login and command-line execution.&lt;/p&gt;

&lt;p&gt;From &lt;a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh"&gt;GitHub&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Using the SSH protocol, you can connect and authenticate to remote servers and services. With SSH keys, you can connect to GitHub without supplying your username and personal access token at each visit. You can also use an SSH key to sign commits.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I'm not sure what happened, normally I don't have to enter my username and password at the command line when fetching or pulling my own code from GitHub. But yesterday I had to do the whole personal-access-token-thing which led me down a rabbit hole, you know how that goes, and I ended up &lt;a href="https://stackoverflow.com/questions/21095054/ssh-key-still-asking-for-password-and-passphrase/25721662#25721662"&gt;here on StackOverflow&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On my machine, I have it set up to use SSH thanks to doing the course work at The Odin Project. Their instructions for setting up Git to use SSH to access GitHub can be found &lt;a href="https://www.theodinproject.com/lessons/foundations-setting-up-git#step-2-configure-git-and-github"&gt;here&lt;/a&gt;. By the way, I highly recommend their course (I'm still working my way through it).&lt;/p&gt;

&lt;p&gt;I also highly recommend, if you're wanting to set up SSH, to follow the instructions on that link above, or &lt;a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh"&gt;on GitHub&lt;/a&gt; for the official, longer guide, but for the sake of this article, I'm gonna tell you how. The short and sweet of it is as follows (I'm on Linux by the way):&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ls ~/.ssh/id_ed25519.pub&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;to check if you have an ED25519 algorithm SSH key already installed.&lt;/p&gt;

&lt;p&gt;If you get no output, or "No such file or directory" from running that command, you can generate a key by entering:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ssh-keygen -t ed25519 -C &amp;lt;your-email&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;(I know y'all know better but, you'd put your own email address in there, minus the brackets) then just hit enter and enter again for the two questions after that.&lt;/p&gt;

&lt;p&gt;Go to GitHub settings --&amp;gt; on the left-hand side click, "SSH and GPG keys" --&amp;gt; click "New SSH key" --&amp;gt; name it something wonderful, then leave that page as is for a sec, go back to your command line and run:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cat ~/.ssh/id_ed25519.pub&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;you'll get a long string that ends with your email address, copy that badboy into your clipboard, go back to GitHub and paste er on in there. Then click the "Add SSH key" button.&lt;/p&gt;

&lt;p&gt;And that's it! No more having to enter your username and fussing with access tokens just to push or pull your code.&lt;/p&gt;

&lt;p&gt;You can test it with:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ssh -T git@github.com&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;and you'll get a nice little message from GitHub :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MgOHh8xd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v6zc6egh685yprlxmtiy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MgOHh8xd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v6zc6egh685yprlxmtiy.png" alt="A command-line greeting from GitHub that says, &amp;quot;Hi beeburrt! You've successfully authenticated, but GitHub does not provide shell access.&amp;quot;" width="734" height="58"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I know that GitHub currently recommends HTTPS over SSH, but I still like using SSH.&lt;/p&gt;

&lt;p&gt;I don't have much at stake, with regard to sending my data over the wire, but I can imagine there are others (journalists, activists, government devs?) that have a lot more on the line where security really IS of the utmost importance. In those cases, I can see how this decision, whether to use SSH or HTTPS, would take a lot of crucial consideration.&lt;/p&gt;

&lt;p&gt;That's all. I hope you like my writing, maybe I'll keep it up :) haha Let me know in the comments which one you use, SSH or HTTPS and why.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/beeburrt"&gt;buy me a coffee!&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>github</category>
      <category>git</category>
    </item>
    <item>
      <title>What's The Last Question You Asked On StackOverflow?</title>
      <dc:creator>B. Burt</dc:creator>
      <pubDate>Sat, 27 Aug 2022 23:24:00 +0000</pubDate>
      <link>https://dev.to/beeburrt/whats-the-last-question-you-asked-on-stackoverflow-4e6l</link>
      <guid>https://dev.to/beeburrt/whats-the-last-question-you-asked-on-stackoverflow-4e6l</guid>
      <description>&lt;h2&gt;
  
  
  My last question was: What's =~ in Ruby?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/73508062/what-is-in-ruby?noredirect=1#comment129810077_73508062"&gt;And I was immediately down-voted&lt;/a&gt; 😄 Oh well. And now it looks like it's been deleted, probably because it was asked, and answered, &lt;a href="https://stackoverflow.com/questions/3025838/what-is-the-operator-in-ruby?noredirect=1&amp;amp;lq=1"&gt;here&lt;/a&gt;, and &lt;a href="https://stackoverflow.com/questions/5781362/ruby-operator?noredirect=1&amp;amp;lq=1"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For those wondering this is from &lt;a href="https://ruby-doc.org/core-2.1.0/Regexp.html#method-i-3D-7E"&gt;Ruby docs&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;=~ is Ruby's basic pattern-matching operator. When one operand is a regular expression and the other is a string then the regular expression is used as a pattern to match against the string. (This operator is equivalently defined by Regexp and String so the order of String and Regexp do not matter. Other classes may have different implementations of =~.) If a match is found, the operator returns index of first match in string, otherwise it returns nil.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Basically it's the pattern matching operator. Matches a regex with a string (or a string with a regex) and returns the position where the match starts. Or nil if no match. Or a TypeError if, say, you put the number 9 instead of a string. Or it could possibly return false, I think.&lt;/p&gt;

&lt;p&gt;Did I mention I'm still a beginner? lol&lt;/p&gt;

&lt;p&gt;My initial search for the meaning of =~ in Ruby, I found out later, came up fruitless because I had failed to include the keyword "operator" in my search. That's why I had missed those two relevant StackOverflow posts (and I think why I got down-voted).&lt;/p&gt;

&lt;p&gt;So that you don't come up empty-handed on your next Google search,&lt;/p&gt;

&lt;h3&gt;
  
  
  Here are a few tips.
&lt;/h3&gt;

&lt;p&gt;Some basics first: spelling doesn't matter (Google spell-checks) and capitalization doesn't matter (ruby is the same as Ruby).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip number 1:&lt;/strong&gt; Choose words carefully.&lt;/p&gt;

&lt;p&gt;Google says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;...try to choose words that are likely to appear on the site you're looking for. For example, instead of saying my head hurts, say headache...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Looking for how to pronounce a word?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip number 2:&lt;/strong&gt; Put the word "define" in front of any word to get its definition.&lt;/p&gt;

&lt;p&gt;Directly underneath the searched-for word will be a little speaker icon, click on it and out loud you will hear the correct pronunciation. &lt;/p&gt;

&lt;p&gt;I used this after hearing more than one person say "integer" with a "g" sound, as in goose, instead of the "j" sound, as in jet, which is how I thought it was pronounced. I was right by the way. Integer is said with a "j" sound.&lt;/p&gt;

&lt;p&gt;Although, the word "define" isn't strictly needed, I usually type the word by itself and the first result is the definition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip number 3:&lt;/strong&gt; Use quotation marks or parentheses to group words together.&lt;/p&gt;

&lt;p&gt;This tells the search engine that you want results that include these particular words in this particular order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip number 4:&lt;/strong&gt; Use keywords, just like in programming.&lt;/p&gt;

&lt;p&gt;You can use logic keywords like AND or NOT or OR. In Bing you can use operators like "|", "-" to exclude things and "&amp;amp;" as well as the words.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip number 5:&lt;/strong&gt; Search within a certain domain or site or for a certain file-type.&lt;/p&gt;

&lt;p&gt;For example, site:edu "ruby programming". You can include the dot, like, site:.gov or site:.org but don't use spaces around the colon though, site : youtube is a no-no.&lt;/p&gt;

&lt;p&gt;You can search for only specific file-types, for example, ext:pdf "ruby books" In Bing it's filetype:pdf.&lt;/p&gt;

&lt;p&gt;Y'all probably know all this stuff already, but did you know you can search for cached pages? I didn't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip number 6:&lt;/strong&gt; Search for cached sites.&lt;/p&gt;

&lt;p&gt;Google offers the best help compared to other search engines (Ecosia, Bing, Yahoo, etc) when it comes to advanced search options.&lt;/p&gt;

&lt;p&gt;When your search results pop up, next to the title of the search result, to the right, are three little dots. Click the dots and a little "About This Result" modal appears. At the bottom of that are buttons, and if there's a cached site available, click on the "Cached" button and you will get the most recent cached version of the site.&lt;/p&gt;

&lt;p&gt;Or you can just put "cache" in front of your search term.&lt;/p&gt;

&lt;p&gt;That's all, hope you liked it. I'll keep writing so for more stuff you probably already know 🤪, follow me.&lt;/p&gt;

</description>
      <category>help</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>ruby</category>
    </item>
  </channel>
</rss>
