<?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: Imed Adel</title>
    <description>The latest articles on DEV Community by Imed Adel (@imed).</description>
    <link>https://dev.to/imed</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%2F212760%2Ff7b8f769-1384-4d9c-bd17-a5a09063a32e.png</url>
      <title>DEV Community: Imed Adel</title>
      <link>https://dev.to/imed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/imed"/>
    <language>en</language>
    <item>
      <title>Answer: How do you merge two Git repositories?</title>
      <dc:creator>Imed Adel</dc:creator>
      <pubDate>Sun, 17 May 2020 17:00:03 +0000</pubDate>
      <link>https://dev.to/imed/answer-how-do-you-merge-two-git-repositories-27l</link>
      <guid>https://dev.to/imed/answer-how-do-you-merge-two-git-repositories-27l</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d6fSuj3N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackoverflow-logo-e7205b186f9c84b1d4e8eb405ef6008a5774db316bd7d257421920b0f954810f.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/1425892/how-do-you-merge-two-git-repositories/10548919#10548919" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re:  How do you merge two Git repositories?
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;May 11 '12&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/1425892/how-do-you-merge-two-git-repositories/10548919#10548919" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xjukSftY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-up-73f60a9ccafdb2f40eec3701f62d2fd7121e02a581a2850e671a7e415eb49071.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          1893
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4ZRntoBk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-down-80fee73e4bc433405a0c0f3b9b88354ecccbdf53f131f8cd998aa30ed5223407.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;If you want to merge &lt;code&gt;project-a&lt;/code&gt; into &lt;code&gt;project-b&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="lang-sh prettyprint-override"&gt;&lt;code&gt;cd path/to/project-b
git remote add project-a path/to/project-a
git fetch project-a --tags
git merge --allow-unrelated-histories project-a/master # or whichever branch you want to merge
git remote remove project-a
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Taken from: &lt;a href="https://stackoverflow.com/questions/2949738/git-merge-different-repositories"&gt;git merge different repositories?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This method worked pretty well for me, it's…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/1425892/how-do-you-merge-two-git-repositories/10548919#10548919" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>todayilearned</category>
      <category>git</category>
    </item>
    <item>
      <title>What is the easiest way to deploy Docker Compose and update it with no downtime?</title>
      <dc:creator>Imed Adel</dc:creator>
      <pubDate>Mon, 13 Apr 2020 17:35:01 +0000</pubDate>
      <link>https://dev.to/imed/what-is-the-easiest-way-to-deploy-docker-compose-and-update-it-with-no-downtime-4igi</link>
      <guid>https://dev.to/imed/what-is-the-easiest-way-to-deploy-docker-compose-and-update-it-with-no-downtime-4igi</guid>
      <description>&lt;p&gt;I usually work on the frontend, but I had to learn Docker and Nginx last week in order to set up my app's backend. So I am a bit confused about how to deploy it now.&lt;/p&gt;

&lt;p&gt;I read about AWS ECS, however, it seems that I cannot "just deploy" to it using my &lt;code&gt;docker-compose.yml&lt;/code&gt; file. Deploying directly to EC2 can be problematic when I want to update my backend without any downtime.&lt;/p&gt;

&lt;p&gt;I also do not want to introduce any other complicated tool to this setup, because I feel like I need to "digest" what I've learned so far.&lt;/p&gt;

&lt;p&gt;PS. ECS CLI supports deploying using a Docker Compose file, but it's missing some Docker Compose features that I'm currently using.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>help</category>
      <category>docker</category>
    </item>
    <item>
      <title>[a, b] = [b, a]</title>
      <dc:creator>Imed Adel</dc:creator>
      <pubDate>Sun, 12 Apr 2020 10:26:58 +0000</pubDate>
      <link>https://dev.to/imed/a-b-b-a-1e02</link>
      <guid>https://dev.to/imed/a-b-b-a-1e02</guid>
      <description>&lt;p&gt;Today I realized that I can easily swap values in JavaScript using destructuring 😲 I don't know how I never noticed this before!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;a&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;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="c1"&gt;//=&amp;gt; {a: 2, b: 1}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>I made an Emoji Maker using React (DOM) and SVG 🤓</title>
      <dc:creator>Imed Adel</dc:creator>
      <pubDate>Tue, 26 Nov 2019 19:00:00 +0000</pubDate>
      <link>https://dev.to/imed/i-made-an-emoji-maker-using-react-dom-and-svg-5049</link>
      <guid>https://dev.to/imed/i-made-an-emoji-maker-using-react-dom-and-svg-5049</guid>
      <description>&lt;p&gt;This weekend, I wanted to make something creative so I made an Emoji Maker using React, ReactDOM, and SVG. I built it with Gatsby too, which allowed me to make a Progressive Web App in no time 😁.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XYZm3Mnr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/aipvjnubdb0dc9jj3169.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XYZm3Mnr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/aipvjnubdb0dc9jj3169.png" alt="Emoji Maker demo by Jamstack Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Contrary to other bots or (deprecated) emoji generators, this one can generate an SVG version, which is really helpful in case you want to include it in another design or you want to customize it even further.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T_2gyqmy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/cin6z8229jxc7ejdbqf4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T_2gyqmy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/cin6z8229jxc7ejdbqf4.png" alt="Download emoji demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some features, such as changing the position of elements and changing their colors, are still missing. However, they are mostly complete and I just need to add a UI component 😊.&lt;/p&gt;

&lt;p&gt;Check out the app at &lt;a href="https://jamstack.studio/emoji"&gt;https://jamstack.studio/emoji&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>showdev</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I created a Chrome extension to practice LeetCode with Spaced Repetition</title>
      <dc:creator>Imed Adel</dc:creator>
      <pubDate>Tue, 22 Oct 2019 09:58:50 +0000</pubDate>
      <link>https://dev.to/imed/i-created-a-chrome-extension-to-practice-leetcode-with-spaced-repetition-4i9n</link>
      <guid>https://dev.to/imed/i-created-a-chrome-extension-to-practice-leetcode-with-spaced-repetition-4i9n</guid>
      <description>&lt;p&gt;I was recently practicing LeetCode problems while preparing for interviews and I got frustrated with using Excel sheets to track my learning progress, so I decided to make a Chrome extension to automate my reviews 😊: &lt;strong&gt;SpacedLeet&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I used a simple spaced repetition algorithm to optimally set my next reviews and I used Webpack and Lit-HTML to make the extension 😁.&lt;/p&gt;

&lt;p&gt;The process is straightforward: after working on a problem, you launch the extension and rate your performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vmC7u-c_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mgr5ghs9ayb1iqolafnh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vmC7u-c_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mgr5ghs9ayb1iqolafnh.png" alt="LeetCode problem rating"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Depending on your rating and how you performed in the past, the problem will be shown for review after a couple of days (or months) when you visit any page other than the problem page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B_TLMD5s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/u4g22zva0zene1ocpuhn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B_TLMD5s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/u4g22zva0zene1ocpuhn.png" alt="LeetCode problems list"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can get the extension on &lt;a href="https://buy.paddle.com/product/572780"&gt;Paddle&lt;/a&gt;. It's available for two dollars 😊.&lt;/p&gt;

&lt;p&gt;You can also read more about it and how to install it on &lt;a href="https://spacedleet.imedadel.me"&gt;the extension's website&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I'm also looking for any feedback about the landing page and the extension 🙏.&lt;/p&gt;

</description>
      <category>leetcode</category>
      <category>productivity</category>
      <category>chrome</category>
      <category>career</category>
    </item>
    <item>
      <title>A VS Code Snippet for Generating Gatsby Components with Static Query</title>
      <dc:creator>Imed Adel</dc:creator>
      <pubDate>Thu, 15 Aug 2019 13:37:42 +0000</pubDate>
      <link>https://dev.to/imed/a-vs-code-snippet-for-generating-gatsby-components-with-static-query-o2h</link>
      <guid>https://dev.to/imed/a-vs-code-snippet-for-generating-gatsby-components-with-static-query-o2h</guid>
      <description>&lt;p&gt;Having to re-write the same boilerplate code for a React component with &lt;code&gt;StaticQuery&lt;/code&gt; from Gatsby can get tiresome. Which is why I recently made a small snippet for VS Code in order to automate the process.&lt;/p&gt;

&lt;p&gt;Go to &lt;code&gt;File &amp;gt; Preferences &amp;gt; User Snippets&lt;/code&gt; (Or  Code &amp;gt; Preferences &amp;gt; User Snippets` on MacOS), choose JavaScript, and paste the following snippet inside of the curly braces:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;JSON&lt;br&gt;
"Gatsby Static Query": {&lt;br&gt;
        "prefix": "gatstaq",&lt;br&gt;
        "body": [&lt;br&gt;
            "import React from 'react'",&lt;br&gt;
            "import { StaticQuery, graphql } from 'gatsby'\n",&lt;br&gt;
            "const ${1/(.*)/${1:/capitalize}/} = ({ data }) =&amp;gt; (\n\t$0\n)\n",&lt;br&gt;
            "const ${1:page}Query = graphql&lt;/code&gt;\n\t\n&lt;code&gt;\n",&lt;br&gt;
            "export default () =&amp;gt; (\n\t&amp;lt;StaticQuery query={${1:page}Query} render={data =&amp;gt; &amp;lt;${1/(.*)/${1:/capitalize}/} data={data} /&amp;gt;} /&amp;gt;\n)\n"&lt;br&gt;
        ]&lt;br&gt;
    }&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally posted on my blog: &lt;a href="https://imedadel.me/gatsby-staticquery-vs-code-snippet"&gt;Gatsby StaticQuery Snippet for VS Code&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>gatsby</category>
      <category>react</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
