<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by kitani_Islam on Medium]]></title>
        <description><![CDATA[Stories by kitani_Islam on Medium]]></description>
        <link>https://medium.com/@slmkitani?source=rss-3a0c53e3d37f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ngp-7KJk1kgSb8gv_CNwoA.jpeg</url>
            <title>Stories by kitani_Islam on Medium</title>
            <link>https://medium.com/@slmkitani?source=rss-3a0c53e3d37f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 02:59:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@slmkitani/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Change Git Commits DateTime (All Supported formats)]]></title>
            <link>https://slmkitani.medium.com/change-git-commits-datetime-all-supported-formats-3522f4b1558d?source=rss-3a0c53e3d37f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3522f4b1558d</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[kitani_Islam]]></dc:creator>
            <pubDate>Sun, 03 Apr 2022 18:04:49 GMT</pubDate>
            <atom:updated>2022-04-03T18:04:49.519Z</atom:updated>
            <content:encoded><![CDATA[<p>All Possible ways to change a git commits Author/Commit Date Time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PLL6Zbhjowr0nXh0" /><figcaption>Photo by <a href="https://unsplash.com/@marcnoorman?utm_source=medium&amp;utm_medium=referral">Marc Noorman</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>It&#39;s Really handy in many scenarios like mirroring a repository from one source to a destination while trying to keep the same history, same commit message same timing for Auther or the commit.</p><p>Regardless of your reason, we will keep it short and move straightforwardly to 3 ways to achieve it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4PtmezdDgkn4jg9niFt1vw.png" /><figcaption>“ git log — pretty=fuller “ output</figcaption></figure><h4>1 — Author DateTime:</h4><pre>$ git commit --amend --date=&quot;Thu Mar 16 12:11:12 2022 +0000&quot; --no-edit</pre><h4>2 — Commit DateTime</h4><pre>$ git commit --amend --date=&quot;Thu Mar 16 12:11:12 2022 +0000&quot; --no-edit</pre><h4>3 — Set DateTime on Committing:</h4><p>commit and set the time for both author and commit under the same git command.</p><pre>$ GIT_AUTHOR_DATE=format:iso8601:&quot;yourISOdate&quot; GIT_COMMITTER_DATE=format:iso8601:&quot;yourISOdate&quot; git commit -m &quot;description&quot;</pre><h4>All Supported DateTime Formats</h4><ol><li>rfc2822: Mon, 3 Jul 2022 17:18:43 +0200</li><li>iso8601: 2022–04–03 17:18:43 +0200</li><li>local: Mon Jul 3 15:18:43 2022</li><li>short: 2006–07–03 (not in 1.9.1, works in 2.3.0)</li><li>relative:</li></ol><pre>#EX of Relative:<br>5.seconds.ago, <br>2.years.3.months.ago, <br>&#39;6am yesterday&#39;</pre><pre>#Usage:<br>git commit -m &quot;message&quot; --date=format:relative:5.hours.ago</pre><p>6. raw (<a href="https://github.com/git/git/commit/7dff9b30ea0603fe265f9f7da055fc34f5d57d2f">reference</a>)<br> (git 1.6.2, March 2009)<br> internal raw git format - seconds since epoch plus. timezone (put another way: &#39;date +&quot;%s %z&quot;&#39; format)</p><p>7. default: Mon Jul 3 17:18:43 2006 +0200</p><p>Happy Coding,<br>Made with ❤️ by <strong>Kitani Islam.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3522f4b1558d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No More ‘ NPM i -g …’ Permission Denied ERRORS.]]></title>
            <link>https://slmkitani.medium.com/no-more-npm-i-g-permission-denied-errors-84ab4f6fd0ee?source=rss-3a0c53e3d37f------2</link>
            <guid isPermaLink="false">https://medium.com/p/84ab4f6fd0ee</guid>
            <category><![CDATA[npm-package]]></category>
            <category><![CDATA[permission-denied]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[node]]></category>
            <dc:creator><![CDATA[kitani_Islam]]></dc:creator>
            <pubDate>Wed, 08 Sep 2021 00:43:42 GMT</pubDate>
            <atom:updated>2021-09-08T00:43:42.660Z</atom:updated>
            <content:encoded><![CDATA[<h3>No More ‘ NPM i -g …’ Permission Denied ERRORS.</h3><p>Common problems for Non-ownership of the default directory that NPM uses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iObs-ZY3TGZijx41" /><figcaption>Photo by <a href="https://unsplash.com/@ej1209_?utm_source=medium&amp;utm_medium=referral">EJ Li</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Explanation:</h3><p>For many systems the NPM default directory located at /usr/local, run :</p><pre>npm config get prefix</pre><blockquote>you may get /usrit’s fine you will not mess your permissions.</blockquote><p>Here where all NPM global packages located, while you don’t have permission to write to that path ( for example if you are sharing the system with other users ) we need to make NPM save packages somewhere else in a different directory.</p><h3>Solution:</h3><p>Open your default terminal at /home/yourUsernameand follow the next steps:</p><p>1 — Make a directory for global installations:</p><pre>mkdir ~/.npm-global</pre><p>2 — Configure npm to use the new directory path:</p><pre>npm config set prefix &#39;~/.npm-global&#39;</pre><p>3 — Open or create a ~/.profile file and add this line:</p><pre>export PATH=~/.npm-global/bin:$PATH</pre><p>4 — Back on the command line, update your system variables:</p><pre>source ~/.profile</pre><p>Now you can install any package globally using the npm install -g ... 🎉</p><p>For more details and more alternatives please refer to the <a href="http://npm.github.io/installation-setup-docs/installing/a-note-on-permissions.html">npm official doc</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84ab4f6fd0ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Render Content Client-Side-Only for SSR — Nuxt.js]]></title>
            <link>https://slmkitani.medium.com/render-content-client-side-only-for-ssr-nuxt-js-55d1ad5c5d1a?source=rss-3a0c53e3d37f------2</link>
            <guid isPermaLink="false">https://medium.com/p/55d1ad5c5d1a</guid>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[nuxtjs]]></category>
            <category><![CDATA[ssrs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vue]]></category>
            <dc:creator><![CDATA[kitani_Islam]]></dc:creator>
            <pubDate>Fri, 12 Feb 2021 15:47:39 GMT</pubDate>
            <atom:updated>2021-02-12T15:47:39.685Z</atom:updated>
            <content:encoded><![CDATA[<h3>Render Content Client-Side-Only for SSR — Nuxt.js</h3><p>Better explanation for the usage and alternatives, taking the SEO in consideration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PfHUdQY5OCfP1gEY" /><figcaption>Photo by <a href="https://unsplash.com/@mbaumi?utm_source=medium&amp;utm_medium=referral">Mika Baumeister</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>The purpose of this article is clarifying the concept regardless of the use case.</blockquote><h3>Server Side Rendering ( SSR ) :</h3><p>SSR is the ability of an application to contribute by displaying the web-page on the server instead of rendering it in the browser. (<a href="https://nuxtjs.org/docs/2.x/concepts/server-side-rendering/">official documentation</a>)</p><p>if you visit an SSR Application and go to dev tools in the network section you will notice that the first request is the home page fully rendered:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*heHz3Xy3pZzaW47s-iU3WQ.png" /></figure><p>and keep in mind you do not have access to the <strong>window</strong> or <strong>document</strong> objects as they belong to the browser environment.</p><h3>What if my Render depends on the browser ?</h3><p>You will face a case where you need to store some costume variables in the browser, that will control the Style or the behavior for certain components. lets take a simple case :</p><p><strong>EX:</strong> your application support multiple langues and English by default.<br>you need to save for each user the preferred language and render the content depending on that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*K7WXPCtBYUXJgQHb" /><figcaption>Photo by <a href="https://unsplash.com/@jeremy0?utm_source=medium&amp;utm_medium=referral">Jeremy Zero</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>We make the ‘ Language Button ’ Component render in the client side after the Vue instance is initialized in the user’s browser and display a text ‘ Loading … ’ as place holder <em>‘ optional ’</em> ( assuming the component read the configuration from the browser local storage )</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b65a85ee13fd75779f4c3f7e7e43919/href">https://medium.com/media/7b65a85ee13fd75779f4c3f7e7e43919/href</a></iframe><h4>If contents are important for SEO ?</h4><p>As mentioned before the <strong>Server Side Rendering </strong>will deliver the content prerendered which’s good for <strong>SEO</strong>, by using ‘ Client-Only ’ Vue instance is never initialized and those contents will not be visible.</p><p>we solve that by adding placeholders, which are displayed before those client-only contents and replaced once the client-only contents are loaded.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6f50fd9e1030013fa72cfc74ad25cce4/href">https://medium.com/media/6f50fd9e1030013fa72cfc74ad25cce4/href</a></iframe><h4>Alternatives :</h4><p>There’s other solutions if your data are <strong><em>dynamic </em></strong>and<strong><em> not important for SEO !!</em></strong> so simply hide your component and show a loading spinner instead.</p><p>once your data are ready show the content , that way you’re making it looks more responsive.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/46b7d0a0b8d1fe9dc5ca66381145c928/href">https://medium.com/media/46b7d0a0b8d1fe9dc5ca66381145c928/href</a></iframe><p>Made with ❤️ by <a href="https://twitter.com/kitani_islam">Kitani Islam</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55d1ad5c5d1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customize Theme — Ant Design with Nuxt.js]]></title>
            <link>https://slmkitani.medium.com/customize-theme-ant-design-with-nuxt-js-512e45d8207e?source=rss-3a0c53e3d37f------2</link>
            <guid isPermaLink="false">https://medium.com/p/512e45d8207e</guid>
            <category><![CDATA[less]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[nuxtjs]]></category>
            <category><![CDATA[custom-theme]]></category>
            <category><![CDATA[ant-design]]></category>
            <dc:creator><![CDATA[kitani_Islam]]></dc:creator>
            <pubDate>Fri, 17 Jul 2020 03:54:17 GMT</pubDate>
            <atom:updated>2020-07-17T04:18:59.238Z</atom:updated>
            <content:encoded><![CDATA[<h3>Customize Theme — Ant Design with Nuxt.js</h3><h4>Replace ant-d default style with Custom Values to feet your design.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*59HZck79AbuNCAo7" /><figcaption>Photo by <a href="https://unsplash.com/@emp_creative?utm_source=medium&amp;utm_medium=referral">Sherman Yang</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>😕 Why we do that ?</h3><p>By default <strong>UI Libraries</strong> such <a href="https://www.antdv.com/">ant-design</a> use universal or a standard colors, fonts or even border radius , that feet almost trends design in a professional way.</p><p>at some point you need to be consistent in your project from buttons color to Titles even the links color and more . There’s a better way to set your custom theme then go through every component and every element and change it manually .</p><h4>Assumptions:</h4><p>👉 let assume you already have ant-d-v installed in your project, if not :</p><pre>$ npm i ant-design-vue</pre><p>👉 and let assume is already configured as plugin to use it everywhere without the need to import every time you need it, if not:</p><p>go to <strong>Plugins</strong> Folder and create file <strong>antd-ui.js </strong>and copy past the following</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3a85ab3faceed00992affda1f034d65a/href">https://medium.com/media/3a85ab3faceed00992affda1f034d65a/href</a></iframe><p>then go to <strong>nuxt.config.js</strong> file to add the plugin and css in each place like that</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d299f371def3b7d8194f6364fe0dd8e/href">https://medium.com/media/5d299f371def3b7d8194f6364fe0dd8e/href</a></iframe><p>👌 now we’re at the same picture so we can directly use any component from ant-design library like that :<br>e.g: a button in home page</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e14d50d1a79457e25fde14eba51d9a2/href">https://medium.com/media/4e14d50d1a79457e25fde14eba51d9a2/href</a></iframe><h3>😎 Do the Real work.</h3><p>the idea is instead of getting the css from ant-design directly, we make Nuxt build for use the new css style using the original style but we change some variables.</p><p>you can find the list for all variables that you can change here :</p><p><a href="https://github.com/vueComponent/ant-design-vue/blob/master/components/style/themes/default.less">vueComponent/ant-design-vue</a></p><h4>Dependency</h4><p>install first less to load the ant-d less file that contain style properties</p><pre>$ npm i less less-loader --save-dev</pre><h4>Structure</h4><p>go to <strong>assets</strong> folder from the root directory and create New folder we call it <strong>ant</strong> , inside that folder create New File call it <strong>main.less</strong>. this file will contain our new Values. so we get structure like that:</p><pre>~ assets/ant/main.less</pre><p>e.g: i will change the ‘ primary color ‘ from the original to my custom , but we need to include the original style before my new ones , so the new will replace the old.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f658e0184f0b6d6617ea3296ab9594c6/href">https://medium.com/media/f658e0184f0b6d6617ea3296ab9594c6/href</a></iframe><h4>💄 Last Tweaks</h4><p>Now almost done , we need to change the target css in <strong>nuxt.config.js</strong> file from the original css to our less file inside /assets/ant/main.less</p><pre>old<br>-  css: [&#39;ant-design-vue/dist/antd.css&#39;]</pre><pre>New<br>+  css: [&#39;~/assets/ant/main.less&#39;]</pre><p>Now our css pointing to the custom style , if you run</p><pre>$ npm run dev</pre><p>you will get error right ? yes expected we need to allow the JavaScript for less in options , so again in <strong>nuxt.config.js </strong>file<strong> </strong>in build section we need to give the permission</p><p>so the 3 section of css, plugins and build will looks like that</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/afa24ede7f2d7bb77d7352f7a3ac2365/href">https://medium.com/media/afa24ede7f2d7bb77d7352f7a3ac2365/href</a></iframe><p>🎉 congratulation 🎉 now you can run project with you custom style !!</p><p>Made with ❤️ by <a href="https://www.instagram.com/kitani_islam/">Kitani Islam</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=512e45d8207e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning by Doing Is a Super Power]]></title>
            <link>https://medium.com/better-programming/the-super-power-of-learning-by-doing-5016112b12cc?source=rss-3a0c53e3d37f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5016112b12cc</guid>
            <category><![CDATA[life]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[kitani_Islam]]></dc:creator>
            <pubDate>Fri, 20 Mar 2020 16:37:12 GMT</pubDate>
            <atom:updated>2020-03-23T01:41:10.392Z</atom:updated>
            <content:encoded><![CDATA[<h4>Research and development as a lifestyle</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lNLeQPCw0PYF7H3iZlQZ4w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jplenio?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Johannes Plenio</a> on <a href="https://unsplash.com/s/photos/super-power?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>School! Let’s Talk About That</h3><p>I’m pretty sure you are here because you are like me — I was never one for sitting quietly in class and taking notes.</p><p>I think, in my first year of university, I did almost everything except studying “what they wanted us to learn.” They were kind of boring, outdated programs.</p><p>Deep down, I felt like this is not what I wanted to learn, that this would not make me a better developer, and that I was not ready to spend one year in classes taking courses I could take by myself in only one month!</p><p>Well, to be honest, “theory” it’s important, but years of theory isn’t my cup of tea.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nwFOF6v1NthpfQSt" /><figcaption>Photo by <a href="https://unsplash.com/@rizsam?utm_source=medium&amp;utm_medium=referral">Muhammad Rizwan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>I agree, but I need a degree</h4><p>You don’t need a college degree, you need an education</p><p>I’m not eliminating college. Another way I would like to say it: it’s better to combine theory and practical knowledge, because a college degree is simply a certification.</p><p>In basic terms, a degree is simply a piece of paper and doesn’t always pay well or guarantee a job.</p><h4>Where do I invest my time?</h4><p>Making stuff every week is terrifying. The important thing isn’t to make something perfect, it’s to make something, and often. Eventually, you’ll start to make it more awesome.</p><p>You need marketable skills, that’s not a path for a lazy person. You need continuous work and continuous growth, because life is like an ocean and you can’t stop the waves but you can surf and your board is your knowledge.</p><h3>People Have Different Learning Styles</h3><h4>I have been there</h4><p>When I started learning to program, to be more specific, it wasn’t easy for me. I didn’t know about a lot of things or a lot of technologies and languages.</p><p>Then you start to hear about frameworks and libraries. It’s been months and I’m still not sure about the path I want to follow. I started coding in Java and JavaScript and found some differences.</p><p>Java is an OOP language run in a virtual machine or web browser, and the code is compiled. Whereas JavaScript is an OOP scripting language running on a web browser and the code is in text and on a web page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-b0sAW-UC2y4wJi2uV2jLg.jpeg" /></figure><p>Then, my next step was to figure out what’s the best JavaScript framework.<strong> </strong>I<strong> </strong>heard about React<strong> </strong>and Vue, and then other keywords started showing up, such as components, lifecycle, and state management…</p><p>I even tested different languages like Python, C, C#… and different frameworks like <a href="https://laravel.com/">Laravel</a> and <a href="https://www.djangoproject.com/">Django</a>.</p><h3>Believe in Yourself</h3><p>I’m sure that while you’re learning you get many offers, and that voice appears, telling you: “Don’t think about it, you will screw it up.” “You’re not ready.”</p><p>Yeah, right. Maybe you are not ready for a large project, but when do you decide that what you write, what you draw, or even what you’ve just built deserves to hit the market?</p><p>Is it better to take every chance you have and let the community decide and evaluate your work, and take all the feedback that helps you to improve your piece of art?</p><p>One day, a friend called me and said: “Hey, we are starting a startup and we’re building a team, we need a cloud developer,” then he mentions: “<a href="https://aws.amazon.com/">AWS</a>.”</p><p>He mentioned also embedded systems, IOT, gateways, BLE, and intelligent transportation systems. It was my first time hearing about that world. I said: “Yeah, I’m in!”</p><p>It was a crazy first three months. Not easy, I won’t lie to you, lots of extra effort and sleepless nights.</p><p>You know how it’s hard to make things work quickly. Especially when it’s your first time trying to get IOT Core and Lambda and RDS working perfectly, and taking care of the database, APIs, and making web and mobile apps to consume those APIs for demo cases, road maps, or even tools for us.</p><p>We were only four in the team, two of us purely embedded system engineers, the CEO, and confused me. No need to mention the pressure…</p><p>With a rule of “search, learn, implement, and test until we get the perfect result,” after two years of hard work we built <a href="https://www.adsumnetworks.com/">Adsum Networks</a>.</p><p><a href="https://www.adsumnetworks.com/">Adsum Networks | Smart Parking IoT Sensor System</a></p><p>It’s an honor to be a part of that.</p><p>It was an infinite loop of learning and hours in front of the screen up to now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*2hEGgSmA3V_STZe354OQYA.jpeg" /></figure><h3>Conclusion</h3><p>Whatever your background, whatever the field you’re working in, trust yourself and take all the chances life gives you.</p><p>It is better to surround yourself with people who believe in your work, not necessarily in you, because in the end, you need to evaluate your work and accept the feedback.</p><p>Track your progress. Think about continuous work, continuous growth. You have to keep learning and be inspired by others.</p><p>Don’t let the degree decide who you are, your habits will decide. Your everyday determination decides.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5016112b12cc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/the-super-power-of-learning-by-doing-5016112b12cc">Learning by Doing Is a Super Power</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding git for real]]></title>
            <link>https://slmkitani.medium.com/understanding-git-for-real-205b98c0beb8?source=rss-3a0c53e3d37f------2</link>
            <guid isPermaLink="false">https://medium.com/p/205b98c0beb8</guid>
            <category><![CDATA[devtools]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[distributed]]></category>
            <dc:creator><![CDATA[kitani_Islam]]></dc:creator>
            <pubDate>Mon, 16 Mar 2020 19:00:05 GMT</pubDate>
            <atom:updated>2020-03-16T19:00:05.393Z</atom:updated>
            <content:encoded><![CDATA[<h4>All what you need to know to start using git efficiently</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qeMLMcmSucCxa1qg9nDK6g.jpeg" /></figure><p><a href="https://git-scm.com/"><strong>Git</strong></a><strong> </strong>is a free and open source distributed version control system. designed to handle everything from small to very large projects. Allow you to :</p><p>. Track changes<br>. Easily Swap Versions<br>. Undo changes<br>. Ideal for Teams</p><figure><img alt="The difference between Git and GitHub" src="https://cdn-images-1.medium.com/max/882/1*N5wXZ3cnOb4PPkE6HPOL3g.jpeg" /><figcaption><strong>The difference between Git and GitHub.</strong></figcaption></figure><p>Many people get confused when they first learn about Git and Github, thinking that they are the same thing, however Github is just a website where developer can store their projects for other developer to access.</p><h3>😕 Why a Version Control System like git is needed</h3><h4>Personal need</h4><p>Imagine the scenario like you’re working on a project, you just finish writing all the code and you start making some changes to support new future to find out that something you did broke everything.<br>Without <strong>Git </strong>you would have to resort to trying to remember what you changed since the previous version, and trust me it’s really hard.</p><h4>Large Scale</h4><p>Real life projects generally have multiple developers working in parallel. So Git is needed to ensure there are no code conflicts between the developers because the code change often.</p><h3>📦 Requirement</h3><p>We assume you already have git installed on your machine , Verify with the following command in the command prompt:</p><pre>$ git --version</pre><p>expect something like that :</p><pre>$ git version 2.21.*.*.*</pre><p>Otherwise go download 👉 <a href="https://git-scm.com/downloads">here</a>.</p><h3>Create your local Git repository.</h3><p>Open your command prompt and cd to your work directory and run the following command</p><pre>$ git init</pre><p>The git init command adds a local Git repository to the project to track all the changes you make.</p><h3>✋ Things you should know about git</h3><h4>git structure:</h4><p>git track changes through three stages :</p><ul><li>Working Directory</li><li>Index</li><li>Head</li></ul><p>Working directory is all files in the local repository in their current state none of the changes in Working directory are tracked by git till add them to index which is commonly referred to as <strong>Staging</strong> this can be done by using</p><pre>$ git add .</pre><p>That tells git we want to track all the changes that we have made in our Working directory and the .means “ all ”, this still does not make these changes in official version of your code that you can change between them.</p><p>in order to add these changes as an official version we need to get git to commit these changes from the index to the final stage Head, that make the changes as final and require a message for this commit, this can be done by using:</p><pre>$ git commit -m &quot;your message&quot;</pre><p>Making changes and stage them then commit often, will create a time line for different version of your code here The Head refer to the most recently committed version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Y-eZPC1ILUSsXi1ZwpzybA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*RimpaBW7upDyaoKOuoeHRQ.png" /></figure><p>You can display all versions of your code by running</p><pre>$ git log</pre><p>this will Show you all your commits with the message you pass with the git commit command also in wish commit the HEAD is pointing . <br>Press “q” to quit the log section.</p><h3>You want to Rollback to previous version ?</h3><p>You will face in your project the case when you make multiple commits then you just realize like you can do those last 2 to 3 changes in a single commit to keep your git history prettier organized with a useful messages , <br>here you need to reset to a certain point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*SpIuDaFu1W9MWzt2FuHeiA.png" /></figure><p>and the most important is to keep those changes , you can do that by running the following command :</p><pre>$ git reset &lt;your commit&gt;</pre><p>replace &lt;your commit&gt;with the commit id we can said, and you can get that id after log all commits “just check the command prompt picture” and take the first 7 characters after “commit” key word will be sufficient, <br>e.g : if i want to go back to the second previous commit i will run simply</p><pre>$ git reset 8075f6</pre><p>Now all the in between commits are gone, and your files not committed, they just reset to this point so you have to stage and commit them with a good message</p><h4>Other Commands :</h4><ul><li>Undo uncommitted changes</li></ul><pre>$ git checkout -- &lt;file name&gt;</pre><p>This command allow you to undo all your changes in uncommitted changes, or you can undo all changes in all <strong>Tracked files</strong> by running :</p><pre>$ git checkout -- . </pre><p>The . means all files.</p><ul><li>Undo and delete changes</li></ul><pre>$ git reset --hard &lt;your commit&gt;</pre><p>This one will undo all changes and delete the in between files.</p><p>For a better understanding about Resetting, Checking Out &amp; Reverting 👇</p><p><a href="https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting">Resetting, Checking Out &amp; Reverting | Atlassian Git Tutorial</a></p><h3>Git Branches</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MzdzZ1KxfolwMfLSFCzRYw.png" /></figure><p>Let’s assume you’re working on a huge project and want to add an experimental feature. You’re not sure if it’ll work or will be accepted, you can <strong>branch</strong> off your main <strong>tree</strong> by creating a new branch by running :</p><pre>$ git branch &lt;branch name&gt;<br># create new branch</pre><p>and working on that branch instead. and to switch to the new branch having the same copy of your code just by running :</p><pre>$ git checkout &lt;branch name&gt;<br># switch branch</pre><p>or you can combine between creating and switch by :</p><pre>$ git checkout -b &lt;branch name&gt;</pre><p>Think of it hypothetically as how a tree has branches, but when you branch off from the main branch “The master branch” however, you can be satisfied with the experimental features and decide to <strong>merge</strong> the two branches.<br>but to do that you have first to switch to the branch you want to merge to<br><strong>e.g</strong> : you create a little_future branch and you want to merge it with the master, so you have to :</p><pre>$ git checkout master<br># switch to master</pre><pre>$ git merge little_future<br># apply little_future changes on master files</pre><p>and you can create branches as many you want.</p><p>Now you have all the basic knowledge to start using git in all your projects and make your coding experience more powerful and more organized.</p><h4>🎁 Resources</h4><ul><li>cool git commands explorer 👉 <a href="https://gitexplorer.com/">Git Explorer</a></li></ul><p>Made with ❤️ by <a href="https://twitter.com/kitani_islam">kitani islam</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=205b98c0beb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Passing Custom Headers Through “Amazon API Gateway” To an “AWS Lambda Function”]]></title>
            <link>https://slmkitani.medium.com/passing-custom-headers-through-amazon-api-gateway-to-an-aws-lambda-function-f3a1cfdc0e29?source=rss-3a0c53e3d37f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3a1cfdc0e29</guid>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[aws-api-gateway]]></category>
            <category><![CDATA[lambda-function]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[axios]]></category>
            <dc:creator><![CDATA[kitani_Islam]]></dc:creator>
            <pubDate>Tue, 29 Jan 2019 12:41:57 GMT</pubDate>
            <atom:updated>2019-01-29T12:49:46.868Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*Tv6O3_ZEH6lukEIiLrdMsQ.png" /></figure><p>By default, a Lambda function only ingests the request body received by an API created in the API Gateway. Using a body “Mapping Template” help to extract any custom headers added to the message.</p><h3>In this quick guide we are going to cover :</h3><p>1. Adding the template to “ Mapping Templates ”.</p><p>2. Receive the passing param inside the lambda function.</p><p>3. Testing the flow with “axios”.</p><h3>1. Adding the template to “ Mapping Templates”</h3><p><strong><em>step 1.</em></strong> Select your method (<strong>E.G</strong> /enduser/baystate )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gd7KgtuoQmBkNusubal8-w.png" /></figure><p><strong><em>step 2</em></strong>. Go to Integration Request &amp; select “Mapping Templates” and create the content-type name it “application/json”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GKHnSc_rtx5Ej5Hdatn3Pw.png" /></figure><p><strong><em>step 3. </em></strong>Add the following to the input section:</p><pre>{<br>    &quot;method&quot;: &quot;$context.httpMethod&quot;,<br>    &quot;body&quot; : $input.json(&#39;$&#39;),<br>    &quot;headers&quot;: {<br>        #foreach($param in $input.params().header.keySet())<br>        &quot;$param&quot;: &quot;$util.escapeJavaScript($input.params().header.get($param))&quot;<br>        #if($foreach.hasNext),#end<br>        #end<br>    }<br>}</pre><p><strong><em>step 4. </em></strong>Choose Save and From the Actions menu, choose Deploy API to your stage and now you have a ready link to invoke .</p><h3>2. Receive the passing param inside the lambda function.</h3><p><strong><em>step 1. </em></strong>inside your lambda function replace the code in “index.js” with the following:</p><pre>exports.handler = (event, context, callback) =&gt; {<br>// TODO implement<br>callback(null, &quot;Your message header :&quot;+event.headers[&quot;header1&quot;]+&quot; was processed by Amazon &quot;);<br>};</pre><p>Choose Save.</p><h3>3. Testing the flow with “axios”.</h3><pre>axios.get(&quot;https://YourEndPoint.amazonaws.com/prod/enduser&quot;,    {&quot;header1&quot;: &quot;happy coding day&quot;})<br>.then( res =&gt; {<br>console.log(res.data)<br>})<br>.catch(err =&gt; {<br>console.log(err)<br>})</pre><p>If this process is successful, you’ll see the following output:</p><pre>&quot;Your message header : happy coding day was processed by Amazon &quot;</pre><h4>Hopefully that will save you time ! Happy Coding Day</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3a1cfdc0e29" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>