<?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: Aris</title>
    <description>The latest articles on DEV Community by Aris (@arisamiga).</description>
    <link>https://dev.to/arisamiga</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%2F949046%2F364beaee-99e4-4542-a87c-036fcb032c11.jpg</url>
      <title>DEV Community: Aris</title>
      <link>https://dev.to/arisamiga</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arisamiga"/>
    <language>en</language>
    <item>
      <title>Happy New Year Everyone! Wishing you all an amazing 2023!</title>
      <dc:creator>Aris</dc:creator>
      <pubDate>Sun, 01 Jan 2023 17:12:24 +0000</pubDate>
      <link>https://dev.to/arisamiga/happy-new-year-everyone-wishing-you-all-an-amazing-2023-650</link>
      <guid>https://dev.to/arisamiga/happy-new-year-everyone-wishing-you-all-an-amazing-2023-650</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvj507gn1zpkqaf6ubz6i.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvj507gn1zpkqaf6ubz6i.gif" alt="Fireworks" width="640" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>welcome</category>
    </item>
    <item>
      <title>Making integration between RSS and LinkedIn</title>
      <dc:creator>Aris</dc:creator>
      <pubDate>Tue, 29 Nov 2022 20:14:43 +0000</pubDate>
      <link>https://dev.to/arisamiga/making-integration-between-rss-and-linkedin-95c</link>
      <guid>https://dev.to/arisamiga/making-integration-between-rss-and-linkedin-95c</guid>
      <description>&lt;p&gt;Hello!&lt;/p&gt;

&lt;p&gt;Today I decided to make a project that will allow me to post my blog posts on LinkedIn. I have been thinking of doing this for a while but I never got around to doing it. I decided to do it today as I never used the LinkedIn API and RSS and I was very interested in making something from them.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;ㅤ&lt;/th&gt;
&lt;th&gt;ㅤ&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5N2Ls3rq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/linkedin.png" alt="LinkedIn" width="320" height="282"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z_TG-xmV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/rss.png" alt="RSS" width="512" height="512"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;What is RSS?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;RSS stands for &lt;strong&gt;Really Simple Syndication&lt;/strong&gt;. It's a web feed that allows users and applications to access updates to websites in a standardized, computer-readable format.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What is LinkedIn?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;LinkedIn is a business and employment-oriented social networking service that operates via websites and mobile apps. Launched on May 5, 2003, it is mainly used for professional networking, including employers posting jobs and job seekers posting their CVs.&lt;/p&gt;

&lt;p&gt;Now you might ask me why would I want to post my blog posts on LinkedIn.&lt;/p&gt;

&lt;p&gt;Sharing your blogs on LinkedIn is one of the best ways to increase traffic and engagement in your brand or business. Also, it's a great way to show what you have been working on and what you are interested in, to potential employers.&lt;/p&gt;

&lt;p&gt;For this, I decided to work with Github Actions as I have never used it before and I wanted to learn more about it. I also used the RSS feed from my blog and the LinkedIn API to make this project.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What are Github Actions?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Github Actions is a feature of Github that allows you to automate your workflow. You can create your actions and use them in your workflow. You can also use actions that are already made by the community.&lt;/p&gt;

&lt;p&gt;So I decided to make a workflow that will run every Monday at 13:00 UTC and will post my latest blog post to LinkedIn.&lt;/p&gt;

&lt;p&gt;Unfortunately, there wasn't an action that was already made that would do this so I had to make my own action.&lt;/p&gt;

&lt;p&gt;Now I didn't have any idea how to make a Github Action.&lt;/p&gt;

&lt;p&gt;Thankfully there was a guide to make a hello-world action and I followed it and from that made my own action.&lt;/p&gt;

&lt;p&gt;The guide can be found here &lt;a href="https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action"&gt;&lt;strong&gt;Github Actions Javascript&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now I had an action that would run and print "Hello World" but I needed to make it post my blog post to LinkedIn.&lt;/p&gt;

&lt;p&gt;I started by making a function that would get the RSS feed from my blog and get the latest post.&lt;/p&gt;

&lt;p&gt;For it, I used the &lt;a href="https://www.npmjs.com/package/rss-parser"&gt;&lt;strong&gt;RSS-parser&lt;/strong&gt;&lt;/a&gt; npm package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;core&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@actions/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;github&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@actions/github&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;RSSParser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;rss-parser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;parse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;feed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;RSSParser&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;parseURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;feed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;feed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; - &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;feed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;link&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;\n&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;feed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;contentSnippet&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;\n\n`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;feed_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;core&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getInput&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;feed_list&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Parsing &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;feed_list&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;feed_list&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;core&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setFailed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now I had a function that would get the RSS feed from my blog and get the latest post.&lt;/p&gt;

&lt;p&gt;Now I needed to make a function that would post the blog post to LinkedIn.&lt;/p&gt;

&lt;p&gt;Thankfully there was a project by &lt;a href="https://github.com/gfiocco"&gt;&lt;strong&gt;@gfiocco&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The project can be found here &lt;a href="https://github.com/gfiocco/linkedin-node-api"&gt;&lt;strong&gt;linkedin-post&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I used this project as the documentation for the LinkedIn API was very confusing and not very detailed.&lt;/p&gt;

&lt;p&gt;I used the project and made a function that would post the blog post to LinkedIn.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;core&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@actions/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;github&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@actions/github&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;RSSParser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;rss-parser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;https&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

 &lt;span class="c1"&gt;// Publish content on LinkedIn&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;postShare&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;ownerId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;shareUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;shareThumbnailUrl&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rej&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;hostname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;api.linkedin.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/v2/shares&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;method&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;urn:li:person:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;ownerId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// max 1300 characters&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;contentEntities&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
          &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;entityLocation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;shareUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;thumbnails&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
              &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="na"&gt;resolvedUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;shareThumbnailUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;],&lt;/span&gt;
          &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;distribution&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;linkedInDistributionTarget&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;Authorization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Bearer &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cache-control&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;no-cache&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;X-Restli-Protocol-Version&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2.0.0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;x-li-format&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Length&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;byteLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="nx"&gt;_request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;method&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;})&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;rej&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;So now I had a function that would get the RSS feed from my blog and get the latest post and a function that would post the blog post to LinkedIn!&lt;/p&gt;

&lt;p&gt;Now I needed to make a workflow that would run every Monday at 13:00 UTC and would run the action.&lt;/p&gt;

&lt;p&gt;I made a workflow that would run every Monday at 13:00 UTC using crontab and would run the action.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What is Crontab?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Crontab is a time-based job scheduler in Unix-like computer operating systems. Users that set up and maintain software environments use crontab to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;📤 Linkedin Blog Post Workflow&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;cron&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;13&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;1'&lt;/span&gt;
  &lt;span class="na"&gt;workflow_dispatch&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;linkedin_rss_job&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;📤 Post Latest RSS Post to Linkedin&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;🧱 Checkout&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v3&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;📫 Get the Latest Post / Post On Linkedin&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Arisamiga/Linkedin-RSS@master&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;feed_list&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.feed_list }}&lt;/span&gt;
          &lt;span class="na"&gt;ln_access_token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.ln_access_token }}&lt;/span&gt;
          &lt;span class="na"&gt;embed_image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.embed_image }}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Now I had a workflow that would run every Monday at 13:00 UTC and would run the action.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: When adding Personal Access Tokens or any other private information make sure to add them as secrets.&lt;/p&gt;

&lt;p&gt;How to make a Github Secret can be found here &lt;a href="https://docs.github.com/en/actions/reference/encrypted-secrets"&gt;&lt;strong&gt;Github Secrets&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Information on How to get a LinkedIn Access Token and How to use this action can be found in the Actions repository:&lt;/p&gt;

&lt;p&gt;⭐ &lt;a href="https://github.com/Arisamiga/Linkedin-RSS"&gt;https://github.com/Arisamiga/Linkedin-RSS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this post and Thank you for reading!&lt;/p&gt;

</description>
      <category>github</category>
      <category>rss</category>
      <category>linkedin</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Docker is awesome.</title>
      <dc:creator>Aris</dc:creator>
      <pubDate>Sun, 13 Nov 2022 11:41:18 +0000</pubDate>
      <link>https://dev.to/arisamiga/docker-is-awesome-4f55</link>
      <guid>https://dev.to/arisamiga/docker-is-awesome-4f55</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fdocker.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fdocker.png" alt="Docker"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  So. What is Docker?
&lt;/h2&gt;

&lt;p&gt;Docker is a tool that allows you to run applications in a containerized environment. It is a great tool for developers and sysadmins as it allows you to run applications in a sandboxed environment that is isolated from the host system. This allows you to run multiple applications in the same system without having to worry about conflicts between them.&lt;/p&gt;

&lt;p&gt;Docker allows you to run an application in something called a "Container" which is an environment that is isolated from the host system. It is especially useful in cases where you need to have libraries or packages with different versions in the same system.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;p&gt;Docker is started by creating a Dockerfile which is a file that contains the instructions for building the container. The Dockerfile is then used to build the container which is then run by the Docker daemon. &lt;em&gt;(The Docker daemon is a service that runs in the background and is responsible for running the containers.)&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="c"&gt;# syntax=docker/dockerfile:1&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; node:12-alpine&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apk add &lt;span class="nt"&gt;--no-cache&lt;/span&gt; python2 g++ make
&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /app&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . .&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;yarn &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--production&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["node", "src/index.js"]&lt;/span&gt;
&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; 3000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of a Dockerfile, you are able to also use a Docker image which is a pre-built container that you can use. Each image is made for specific purposes and is usually made by the community at &lt;a href="https://hub.docker.com/" rel="noopener noreferrer"&gt;Docker Hub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fdocker-hub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fdocker-hub.png" alt="Docker Hub"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When a container is run using &lt;a href="https://docs.docker.com/engine/reference/run/" rel="noopener noreferrer"&gt;&lt;code&gt;docker run&lt;/code&gt;&lt;/a&gt; it is then given a name and a unique ID. The name is used to identify the container and the ID is used to identify the container in the Docker daemon. By also using the &lt;a href="https://docs.docker.com/engine/reference/commandline/run/#options" rel="noopener noreferrer"&gt;&lt;code&gt;-d&lt;/code&gt;&lt;/a&gt; flag, the container is run in the background and is not attached to the terminal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fdocker-container.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fdocker-container.png" alt="Docker Number and ID"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can look at running containers using &lt;a href="https://docs.docker.com/engine/reference/commandline/ps/" rel="noopener noreferrer"&gt;&lt;code&gt;docker ps&lt;/code&gt;&lt;/a&gt; and you can look at all containers using &lt;a href="https://docs.docker.com/engine/reference/commandline/ps/" rel="noopener noreferrer"&gt;&lt;code&gt;docker ps -a&lt;/code&gt;&lt;/a&gt; which will show even exited ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker commands
&lt;/h2&gt;

&lt;p&gt;Here are some of the most common commands that you will use when working with Docker.&lt;/p&gt;

&lt;h3&gt;
  
  
  docker run
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.docker.com/engine/reference/run/" rel="noopener noreferrer"&gt;&lt;code&gt;docker run&lt;/code&gt;&lt;/a&gt; command is used to run a container. It takes the name of the image that you want to run as an argument. You can also specify the name of the container using the &lt;code&gt;--name&lt;/code&gt; flag. If you don't specify a name Docker will generate a random name for you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;--name&lt;/span&gt; my-container my-image
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  docker ps
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.docker.com/engine/reference/commandline/ps/" rel="noopener noreferrer"&gt;&lt;code&gt;docker ps&lt;/code&gt;&lt;/a&gt; command is used to list running containers. You can also use the &lt;code&gt;-a&lt;/code&gt; flag to list all containers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  docker stop
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.docker.com/engine/reference/commandline/stop/" rel="noopener noreferrer"&gt;&lt;code&gt;docker stop&lt;/code&gt;&lt;/a&gt; command is used to stop a running container. It takes the name of the container as an argument.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker stop my-container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  docker start
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.docker.com/engine/reference/commandline/start/" rel="noopener noreferrer"&gt;&lt;code&gt;docker start&lt;/code&gt;&lt;/a&gt; command is used to start a stopped container. It takes the name of the container as an argument.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker start my-container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  docker rm
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.docker.com/engine/reference/commandline/rm/" rel="noopener noreferrer"&gt;&lt;code&gt;docker rm&lt;/code&gt;&lt;/a&gt; command is used to remove a container. It takes the name of the container as an argument.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;rm &lt;/span&gt;my-container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  docker exec
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.docker.com/engine/reference/commandline/exec/" rel="noopener noreferrer"&gt;&lt;code&gt;docker exec&lt;/code&gt;&lt;/a&gt; command is used to execute a command in a running container. It takes the name of the container as an argument and the command that you want to execute.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;exec &lt;/span&gt;my-container &lt;span class="nb"&gt;ls&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  docker build
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.docker.com/engine/reference/commandline/build/" rel="noopener noreferrer"&gt;&lt;code&gt;docker build&lt;/code&gt;&lt;/a&gt; command is used to build a container from a Dockerfile. It takes the path to the Dockerfile as an argument.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker build &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  docker pull
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.docker.com/engine/reference/commandline/pull/" rel="noopener noreferrer"&gt;&lt;code&gt;docker pull&lt;/code&gt;&lt;/a&gt; command is used to pull an image from Docker Hub. It takes the name of the image as an argument.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker pull my-image
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  docker push
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.docker.com/engine/reference/commandline/push/" rel="noopener noreferrer"&gt;&lt;code&gt;docker push&lt;/code&gt;&lt;/a&gt; command is used to push an image to Docker Hub. It takes the name of the image as an argument.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker push my-image
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Docker is a pretty amazing tool to use and is especially useful when working with multiple applications and I couldn't recommend it enough. &lt;/p&gt;

&lt;p&gt;Here is also an amazing Tutorial by Programming with Mosh that you can watch to learn more about Docker!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pTFZFxd4hOI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>docker</category>
      <category>tools</category>
    </item>
    <item>
      <title>Transition Year Work Experience!</title>
      <dc:creator>Aris</dc:creator>
      <pubDate>Sun, 30 Oct 2022 18:07:34 +0000</pubDate>
      <link>https://dev.to/arisamiga/transition-year-work-experience-3e9</link>
      <guid>https://dev.to/arisamiga/transition-year-work-experience-3e9</guid>
      <description>&lt;p&gt;So this year I am going into Transition Year and we are advised to search for work experience as it is part of the Transition Year program here in Ireland which is great.&lt;/p&gt;

&lt;p&gt;They provided us with websites that show work experiences specifically for the Transition year which are&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2FCareersPortal.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2FCareersPortal.jpg" alt="CareersPortal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://careersportal.ie/" rel="noopener noreferrer"&gt;https://careersportal.ie/&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fty_ie.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fty_ie.jpg" alt="Ty.ie"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ty.ie/" rel="noopener noreferrer"&gt;https://ty.ie/&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Then they told us to look daily on these websites for experiences as most work experiences are "first come, first served" which means that they are gonna get whoever applies first.&lt;/p&gt;

&lt;p&gt;So... As a developer, I had the idea that I can probably get the changes of a website through fetch or cURL so I don't have to check every day for changes on the work experiences and still know if a new experience arises.&lt;/p&gt;

&lt;p&gt;Alright so how am I gonna do this? I decided to use my trusty and favorite &lt;strong&gt;Node.js&lt;/strong&gt; and a method that is called "Web Scraping".&lt;/p&gt;

&lt;p&gt;Web scraping is the process of using bots to extract content and data from a website.&lt;/p&gt;

&lt;p&gt;So firstly I created a loop that would fetch careersportal. ie every 1 minute and display me the HTML.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;setInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://careersportal.ie/workx/student_search.php?s_sector1=8&amp;amp;s_ty=&amp;amp;s_cx_county=6&amp;amp;s_cx_address=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;method&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GET&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;headers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which... Didn't work.&lt;/p&gt;

&lt;p&gt;It kept responding to me with HTML code of what seemed to be google statistics and drupal which was quite unusual. After debugging and trying to use something such as Phantomjs which is a headless browser used for automating web page interaction still no result. I decided to dig inside the code of the website in case it had something that blocked the request.&lt;/p&gt;

&lt;p&gt;I ended up finding that the whole webpage &lt;a href="https://careersportal.ie" rel="noopener noreferrer"&gt;https://careersportal.ie&lt;/a&gt; is just for displaying buttons and it is actually using an iframe to display all the work experience placings from a URL that was &lt;a href="https://cc.careersportal.ie" rel="noopener noreferrer"&gt;https://cc.careersportal.ie&lt;/a&gt;. So I used that URL to fetch everything and it seemed to work!&lt;/p&gt;

&lt;p&gt;Now on the problems with fetching &lt;a href="https://ty.ie/" rel="noopener noreferrer"&gt;https://ty.ie/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thankfully Ty.ie uses an API which it gets its work experiences from, which was using WordPress. So I was able to fetch that API in order to get the companies that had work experience. &lt;/p&gt;

&lt;p&gt;While CareersPortal has work placements with descriptions and contact info, Ty.ie has companies which they affiliate with for Ty Students to apply. &lt;/p&gt;

&lt;p&gt;While the fetch of ty.ie API worked it only worked for around 1 hour which is not ideal. I found out that ty. ie uses something called &lt;strong&gt;Nonce&lt;/strong&gt; which is added by WordPress. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2FWordPress.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2FWordPress.png" alt="WordPress"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A nonce is a one-time use security token generated by WordPress to help protect URLs from forms of misuse. &lt;/p&gt;

&lt;p&gt;So I had to think about how to bypass this as I realized that I needed to provide a nonce or else the API would return an error. &lt;/p&gt;

&lt;p&gt;So after testing and looking into the code of the website. It looks like when you enter the &lt;a href="https://ty.ie/" rel="noopener noreferrer"&gt;https://ty.ie/&lt;/a&gt; website it indeed creates a nonce that is stored in a variable called "um_scripts" and then used by the website to access the API.&lt;/p&gt;

&lt;p&gt;With that info, I am able to extract that code from the HTML using something called &lt;a href="https://www.npmjs.com/package/jsdom" rel="noopener noreferrer"&gt;JSDOM&lt;/a&gt; which is an npm package that parses and interacts with assembled HTML just like a browser so I am able to use code to get that variable and then called the API myself with that nonce code to get the companies!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fjsdom.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fjsdom.png" alt="jsdom"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which seems to work!&lt;/p&gt;

&lt;p&gt;Now we need to check if there is any difference on the pages which I am able to detect by saving a previous fetch response on a txt file and then comparing the 2 responses to see if anything changed using the following code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;diff&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;diffMe&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;diffBy&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;diffMe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;diffBy&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;differences&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;diff&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;oldpage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;newpage&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;differences&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// No Change&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Something changed&lt;/span&gt;
    &lt;span class="p"&gt;}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If there is any difference we want to alert the user. I decided to do that by using Discord.js to make a discord bot that will notify me when there is a change within a specific channel that will be associated with that fetch/request!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Ftyexperiencediscord.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Ftyexperiencediscord.png" alt="Discord Bot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a diagram of how it all works basically:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fty-experience.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.arisamiga.rocks%2Fimg%2Fty-experience.png" alt="Diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was a pretty interesting project as it had some interesting problems and I learned a lot such as how to get information from a website but also new packages that I haven't used before such as JSDOM and also how to connect everything together using node.js!&lt;/p&gt;

&lt;p&gt;-&lt;br&gt;
Originally Posted on: &lt;a href="https://blog.arisamiga.rocks/post/tyexperience/" rel="noopener noreferrer"&gt;https://blog.arisamiga.rocks/post/tyexperience/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>project</category>
      <category>node</category>
      <category>discordjs</category>
      <category>api</category>
    </item>
    <item>
      <title>Making a retro bag!</title>
      <dc:creator>Aris</dc:creator>
      <pubDate>Sun, 23 Oct 2022 18:40:17 +0000</pubDate>
      <link>https://dev.to/arisamiga/making-a-retro-bag-2fkg</link>
      <guid>https://dev.to/arisamiga/making-a-retro-bag-2fkg</guid>
      <description>&lt;p&gt;So today we have something a bit different. This is a project that I always wanted to do as I wanted to work with the &lt;a href="https://www.raspberrypi.com/products/raspberry-pi-zero-w/"&gt;Raspberry Pi Zero W&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--phq9NVOz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/Pizerow.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--phq9NVOz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/Pizerow.webp" alt="Raspberry Pi Zero W" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you might ask me "&lt;em&gt;Aris, Why didn't you get the Raspberry Pi Zero W 2 which is faster and more powerful?&lt;/em&gt;"&lt;/p&gt;

&lt;p&gt;Well, I didn't get the Pi Zero W 2 because it came out &lt;strong&gt;2 days&lt;/strong&gt; after I bought the Pi Zero W and I had no idea that a Pi Zero W was even in the works... so yea, Fun!&lt;/p&gt;

&lt;p&gt;The Raspberry Pi Zero W is an amazing system tho. Some of Its features include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;802.11 b/g/n wireless LAN&lt;/li&gt;
&lt;li&gt;Bluetooth 4.1&lt;/li&gt;
&lt;li&gt;1GHz, single-core CPU&lt;/li&gt;
&lt;li&gt;512MB RAM&lt;/li&gt;
&lt;li&gt;Mini HDMI port and micro USB On-The-Go (OTG) port&lt;/li&gt;
&lt;li&gt;Micro USB power&lt;/li&gt;
&lt;li&gt;HAT-compatible 40-pin header
etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which makes it the perfect candidate for a Project that I wanted to do ever since I saw this amazing device.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Remote Retropie Powered School Bag &lt;strong&gt;Ah yes&lt;/strong&gt;.
&lt;/h3&gt;

&lt;p&gt;The Plan is to have the Raspberry Pi Zero W inside the bag and have the HDMI in the Bag's USB port which will display pictures when not in use and every time I want to play anything I just plug in the HDMI and press a button which will launch the Retropie's Emulationstation.&lt;/p&gt;

&lt;p&gt;This is why I got this &lt;a href="https://shop.pimoroni.com/products/illuminated-button?variant=12925993222227"&gt;Button&lt;/a&gt; which I plan to use for entering Retropie.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6KXBKb4Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/button.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6KXBKb4Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/button.webp" alt="Button" width="768" height="768"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  So let's Start!
&lt;/h2&gt;

&lt;p&gt;The bag that I am gonna use for this project is a &lt;a href="https://www.plaisio.gr/pc-perifereiaka/laptop-accessories/tsantes-thikes/sentio-tsanta-platis-15-6-casual-series-gkri-antitheft_3336581?qId=9bcf16913b18e598a6c9677d80ed0b4f&amp;amp;qIx=products"&gt;Sentio Backpack 15.6" Casual Series Gray Antitheft Bag&lt;/a&gt; which I bought from Plaisio in Greece.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--x6bbEP52--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/Bag.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x6bbEP52--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/Bag.jpeg" alt="Bag" width="420" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the OS I went with &lt;a href="https://www.raspberrypi.com/software/operating-systems/"&gt;Raspberry Pi OS Lite&lt;/a&gt; which is basically like Raspberry Pi OS without the Desktop Interface so basically only a console.&lt;/p&gt;

&lt;p&gt;I started with making a case for the Raspberry so it doesn't get damaged in the bag. I used &lt;a href="https://www.thingiverse.com/thing:1165227"&gt;this&lt;/a&gt; amazing design by &lt;a href="https://www.thingiverse.com/adafruit/designs"&gt;adafruit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Trczxbp3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/picase.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Trczxbp3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/picase.png" alt="Pi's Case" width="700" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And then I went on to work on the software for the button detection and the emulationstation.&lt;/p&gt;

&lt;p&gt;I decided to write everything in &lt;a href="https://www.python.org/"&gt;Python&lt;/a&gt; which is a high-level, general-purpose programming language and the one I am most familiar with.&lt;/p&gt;

&lt;p&gt;For the button detection, I needed to connect the button to 1 GPIO pin to detect the press and a Ground pin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: If your button has a LED make sure to put a 330-ohm resistor between it and the Voltage or else it will break. I forgot to do that.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GbQiFkWR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/pinoutpizerow.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GbQiFkWR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/pinoutpizerow.png" alt="Pi zero Pinout" width="880" height="616"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To detect the button I used the following script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Import Rpi's Library for GPIO pins
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;RPi.GPIO&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;GPIO&lt;/span&gt;
&lt;span class="c1"&gt;# Disables Warnings. 
# It's usually telling you that the gpio is already in use, 
# that's because you have stopped the program and started it again.
&lt;/span&gt;&lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setwarnings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# The GPIO.BCM option means that you are referring to the pins by the 
# "Broadcom SOC channel" number, these are the numbers after "GPIO" 
# around the outside of the above diagram
&lt;/span&gt;&lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setmode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;BCM&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# It tells the library which pins you want to use
&lt;/span&gt;&lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;IN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pull_up_down&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PUD_UP&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# Waits till the Button is Pressed
&lt;/span&gt;&lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wait_for_edge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;GPIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FALLING&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# The rest of the script gets executed when the button is pressed
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As I wanted to display pictures on the Raspberry when it's not in use I had to find something that doesn't need an interface to display an image which was quite hard to do. &lt;/p&gt;

&lt;p&gt;After a lot of searches, I found a package called &lt;a href="https://manpages.ubuntu.com/manpages/bionic/man1/fbi.1.html"&gt;FBI&lt;/a&gt; a Linux frame buffer image viewer which from my understanding is something used to show graphics on a computer monitor, typically on the system console which also includes Pictures!&lt;/p&gt;

&lt;p&gt;The problem with having Fbi running is that it completely freezes the console meaning that if I run it and tell it to run a log after 2 seconds of opening the fbi it will wait till fbi exits and then it will wait 2 seconds to execute the command I want.&lt;/p&gt;

&lt;p&gt;The script for detecting the Button press also had the same thing, you couldn't run any command while it was doing something and that is when I stumbled into something called &lt;strong&gt;"Subprocess"&lt;/strong&gt; which was a lifesaver.&lt;/p&gt;

&lt;p&gt;Subprocess is a python module that allows you to spawn new processes, connect to their input/output/error, and obtain their return codes. What it does is it allows you to create a different console/process from your current process so you don't have to wait for other tasks to finish. &lt;/p&gt;

&lt;p&gt;This was amazing, so instead of having 1 Python file, I ended up with 3 different Python files. &lt;/p&gt;

&lt;p&gt;I would say what each of them is and what it does but I realized that it's just gonna be a big paragraph of complicated things so here is a diagram to explain how it works (Note that main.py always gets executed first):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HPzYWfum--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/RetropieDiagram.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HPzYWfum--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/RetropieDiagram.png" alt="Retropie Diagram" width="831" height="571"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also when working with Retropie's Themes I had a problem where when I started the emulationstation the theme would glitch out and I couldn't change it back to normal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ozn_cBMx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/glitchedmenu.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ozn_cBMx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/glitchedmenu.webp" alt="Retropie Theme Glitch" width="600" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The problem that caused this for me was having a limit on the VRAM on retropie and probably the many times I restarted which might have corrupted the theme.&lt;/p&gt;

&lt;p&gt;I fixed it with a reinstall of Retropie which thankfully didn't delete any of my ROMs and by putting the Vram limit to at least &lt;strong&gt;80&lt;/strong&gt; so the menu can load normally. Which fixed the problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tSQmmwKj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/vramretropie.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tSQmmwKj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/vramretropie.png" alt="Retropie Vram Limit" width="709" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, another problem I encountered was that Retropie didn't want to run the games and put me back in the menu when it was opened using a subprocess script. &lt;/p&gt;

&lt;p&gt;The solution that worked for me was that I added all the scripts inside a &lt;a href="https://linuxize.com/post/how-to-use-linux-screen/"&gt;Screen&lt;/a&gt; which is a way that you can start a session and then open any number of windows (virtual terminals) inside that session which allowed Retropie to launch the games that way.&lt;/p&gt;

&lt;p&gt;Then, After adding around 5000 ROMs and waiting like 4hours for the Retropie Scraper to add Titles and Images I finished with the software part of this project.&lt;/p&gt;

&lt;p&gt;Also, I went with the &lt;a href="https://github.com/ruckage/es-theme-famicom-mini"&gt;Famicom-Mini&lt;/a&gt; theme as I liked the design of it!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;~&lt;/strong&gt; Also tip for anyone that does the project make sure to at least keep ssh on in case any problems occur and you need to manually start emulationstation or restart the pi.&lt;/p&gt;

&lt;p&gt;I use an app called &lt;a href="https://termius.com/"&gt;Termius&lt;/a&gt;. Termius is the SSH client that works on Desktop and Mobile so if anything breaks I can ssh into the RPI from my phone. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--roBNeSxA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/termiuslogo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--roBNeSxA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/termiuslogo.png" alt="Termius" width="416" height="121"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, quick tip, if you are a student you can get Termius Premium using the &lt;a href="https://education.github.com/pack/offers"&gt;Github Student Developer Pack&lt;/a&gt; which I highly recommend.&lt;/p&gt;

&lt;h3&gt;
  
  
  Time to go to the bag.
&lt;/h3&gt;

&lt;p&gt;Right now out of the bat there is a problem where the port that it has on the side is a USB port and if I try to put an HDMI the cable is sticking out. &lt;/p&gt;

&lt;p&gt;I decided to sew a cover around the port at the side and have that along with an HDMI dust cap glued at the end of it to prevent anything from going inside the cable and damaging it.&lt;/p&gt;

&lt;p&gt;And after a couple of hours and a lot of accidental piercings from sewing. &lt;/p&gt;

&lt;h4&gt;
  
  
  I finally finished it!
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Om9H-psa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/bagport1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Om9H-psa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/bagport1.jpeg" alt="Bag Port Image 1" width="880" height="1173"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BYbOhhHU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/bagport2.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BYbOhhHU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/bagport2.jpeg" alt="Bag Port Image 2" width="880" height="1173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also added a small button to hold it in place at the end of the HDMI.&lt;/p&gt;

&lt;p&gt;Overall I think it ended up pretty nice!&lt;/p&gt;

&lt;p&gt;This Project was a pretty interesting one to work on I was able to work with the Raspberry Pi Zero W and with all the debugging I also discovered a lot of new things like Subprocessing and Screens and learned to work more on the Linux command line which I always wanted to do.&lt;/p&gt;

&lt;p&gt;I am gonna be continuing this project in the future and I am thinking of using Java to make some kind of app that shows statistics from the Raspberry Pi which will be very interesting.&lt;/p&gt;

&lt;p&gt;I know this post is a quite long one but thanks for reading my Blog :D&lt;/p&gt;

&lt;p&gt;-&lt;br&gt;
Originally Posted on: &lt;a href="https://blog.arisamiga.rocks/post/retrobag/"&gt;https://blog.arisamiga.rocks/post/retrobag/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>project</category>
      <category>python</category>
      <category>raspberrypi</category>
      <category>retropie</category>
    </item>
    <item>
      <title>New Website, Who Dis?</title>
      <dc:creator>Aris</dc:creator>
      <pubDate>Wed, 19 Oct 2022 12:02:36 +0000</pubDate>
      <link>https://dev.to/arisamiga/new-website-who-dis-27p8</link>
      <guid>https://dev.to/arisamiga/new-website-who-dis-27p8</guid>
      <description>&lt;p&gt;For a long time, I have had a website called &lt;a href="https://arisamiga.rocks"&gt;arisamiga.rocks&lt;/a&gt; which was made using Basic HTML &amp;amp; CSS, and Javascript. &lt;/p&gt;

&lt;p&gt;I have been using this website for a long time for experimenting with website making and I always wanted to revamp it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WyD2fzSt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/Website-pre.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WyD2fzSt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/Website-pre.jpg" alt="Old Website" width="880" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;This is how it looked.&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;I have been interested in the design of Terminals and especially Ubuntu Terminals&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wAhPTSl2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/ubuntu-terminal.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wAhPTSl2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/ubuntu-terminal.jpg" alt="Ubuntu Terminal" width="880" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So I decided that maybe I can make a website that behaves kinda like a terminal and have all the information in the form of commands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WxjfiRvy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/New-Website.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WxjfiRvy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.arisamiga.rocks/img/New-Website.jpg" alt="New Website" width="880" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I also turned my Profile Picture to Ascii which is a pretty cool feature of the website.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The commands are handled by a Javascript file which calls upon a list of commands and their functions that are stored in a JSON file which is read by the Javascript file.&lt;/p&gt;

&lt;p&gt;So it is also much easier to add commands in the future. Special commands such as "Start", "blog" and "nocss" are handled by the Javascript file itself.&lt;/p&gt;

&lt;p&gt;If you want to check the Javascript file you can at &lt;a href="https://arisamiga.rocks"&gt;arisamiga.rocks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also if you are not tech-savvy you can still use the website by typing the "start" command on the terminal.&lt;/p&gt;

&lt;p&gt;The website is still a work in progress and I will be adding more features to it. I am also thinking for the holidays I might add some special commands or "apps" that you can do...&lt;/p&gt;

&lt;p&gt;-&lt;br&gt;
Originally Posted on: &lt;a href="https://blog.arisamiga.rocks/post/website/"&gt;https://blog.arisamiga.rocks/post/website/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>website</category>
      <category>javascript</category>
      <category>terminal</category>
      <category>project</category>
    </item>
  </channel>
</rss>
