<?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: Arnaldo Gabriel</title>
    <description>The latest articles on DEV Community by Arnaldo Gabriel (@agmm).</description>
    <link>https://dev.to/agmm</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%2F122157%2F442558e7-f2e1-4db2-8409-acfc7d9ae459.jpeg</url>
      <title>DEV Community: Arnaldo Gabriel</title>
      <link>https://dev.to/agmm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/agmm"/>
    <language>en</language>
    <item>
      <title>A Quick Way of Minifying an HTML File</title>
      <dc:creator>Arnaldo Gabriel</dc:creator>
      <pubDate>Thu, 23 May 2019 20:47:01 +0000</pubDate>
      <link>https://dev.to/agmm/a-quick-way-of-minifying-an-html-file-9k9</link>
      <guid>https://dev.to/agmm/a-quick-way-of-minifying-an-html-file-9k9</guid>
      <description>&lt;p&gt;&lt;em&gt;Note to self&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A quick way of minifying an HTML file including the &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags within it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Start by installing the HTML minifier with:&lt;br&gt;
&lt;code&gt;npm install html-minifier -g&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Execute the minifier command:&lt;br&gt;
&lt;code&gt;html-minifier --minify-css true --minify-js true input.htm -o output.htm&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Additional options:&lt;br&gt;
&lt;code&gt;--collapse-whitespace&lt;br&gt;
--remove-comments&lt;br&gt;
--remove-optional-tags&lt;br&gt;
--remove-redundant-attributes&lt;br&gt;
--remove-script-type-attributes&lt;br&gt;
--remove-tag-whitespace&lt;br&gt;
--use-short-doctype&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

</description>
      <category>commandline</category>
      <category>notetoself</category>
    </item>
    <item>
      <title>One-liner to reset the password associated with git</title>
      <dc:creator>Arnaldo Gabriel</dc:creator>
      <pubDate>Sun, 28 Apr 2019 16:15:47 +0000</pubDate>
      <link>https://dev.to/agmm/one-liner-to-reset-the-password-associated-with-git-55h8</link>
      <guid>https://dev.to/agmm/one-liner-to-reset-the-password-associated-with-git-55h8</guid>
      <description>&lt;p&gt;&lt;em&gt;Note to self&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;One-liner to reset the password associated with git. Once it is run git will prompt the user to re-enter the password before making a push. Useful for those times when you change the GitHub password.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global --unset user.password
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>git</category>
      <category>commandline</category>
      <category>oneliner</category>
      <category>notetoself</category>
    </item>
    <item>
      <title>Simple way of modifying Ant Design default theme</title>
      <dc:creator>Arnaldo Gabriel</dc:creator>
      <pubDate>Sun, 28 Apr 2019 13:55:09 +0000</pubDate>
      <link>https://dev.to/agmm/simple-way-of-modifying-ant-design-default-theme-3g4h</link>
      <guid>https://dev.to/agmm/simple-way-of-modifying-ant-design-default-theme-3g4h</guid>
      <description>&lt;p&gt;&lt;em&gt;Note to self&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Start by installing lessc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;less &lt;span class="nt"&gt;-g&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Move into the 'dist' directory inside the antd package.&lt;/p&gt;

&lt;p&gt;Create a file with the following content and name it 'my-theme.less'&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;"./antd.less"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;Import&lt;/span&gt; &lt;span class="nt"&gt;Ant&lt;/span&gt; &lt;span class="nt"&gt;Design&lt;/span&gt; &lt;span class="nt"&gt;styles&lt;/span&gt; &lt;span class="nt"&gt;by&lt;/span&gt; &lt;span class="nt"&gt;less&lt;/span&gt; &lt;span class="nt"&gt;entry&lt;/span&gt;

&lt;span class="k"&gt;@primary-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#d228e9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                         &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;primary&lt;/span&gt; &lt;span class="nt"&gt;color&lt;/span&gt; &lt;span class="nt"&gt;for&lt;/span&gt; &lt;span class="nt"&gt;all&lt;/span&gt; &lt;span class="nt"&gt;components&lt;/span&gt;
&lt;span class="k"&gt;@link-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#1890ff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                            &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;link&lt;/span&gt; &lt;span class="nt"&gt;color&lt;/span&gt;
&lt;span class="k"&gt;@success-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#52c41a&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                         &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;success&lt;/span&gt; &lt;span class="nt"&gt;state&lt;/span&gt; &lt;span class="nt"&gt;color&lt;/span&gt;
&lt;span class="k"&gt;@warning-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#faad14&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                         &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;warning&lt;/span&gt; &lt;span class="nt"&gt;state&lt;/span&gt; &lt;span class="nt"&gt;color&lt;/span&gt;
&lt;span class="k"&gt;@error-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#f5222d&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                           &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;error&lt;/span&gt; &lt;span class="nt"&gt;state&lt;/span&gt; &lt;span class="nt"&gt;color&lt;/span&gt;
&lt;span class="k"&gt;@font-size-base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;40px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                           &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;major&lt;/span&gt; &lt;span class="nt"&gt;text&lt;/span&gt; &lt;span class="nt"&gt;font&lt;/span&gt; &lt;span class="nt"&gt;size&lt;/span&gt;
&lt;span class="k"&gt;@heading-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;.85&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;              &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;heading&lt;/span&gt; &lt;span class="nt"&gt;text&lt;/span&gt; &lt;span class="nt"&gt;color&lt;/span&gt;
&lt;span class="k"&gt;@text-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;.65&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;                 &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;major&lt;/span&gt; &lt;span class="nt"&gt;text&lt;/span&gt; &lt;span class="nt"&gt;color&lt;/span&gt;
&lt;span class="k"&gt;@text-color-secondary&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;.45&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;      &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;secondary&lt;/span&gt; &lt;span class="nt"&gt;text&lt;/span&gt; &lt;span class="nt"&gt;color&lt;/span&gt;
&lt;span class="k"&gt;@disabled-color&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;.25&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;            &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;disable&lt;/span&gt; &lt;span class="nt"&gt;state&lt;/span&gt; &lt;span class="nt"&gt;color&lt;/span&gt;
&lt;span class="k"&gt;@border-radius-base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                        &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;major&lt;/span&gt; &lt;span class="nt"&gt;border&lt;/span&gt; &lt;span class="nt"&gt;radius&lt;/span&gt;
&lt;span class="k"&gt;@border-color-base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#d9d9d9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                     &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;major&lt;/span&gt; &lt;span class="nt"&gt;border&lt;/span&gt; &lt;span class="nt"&gt;color&lt;/span&gt;
&lt;span class="k"&gt;@box-shadow-base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;.15&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;major&lt;/span&gt; &lt;span class="nt"&gt;shadow&lt;/span&gt; &lt;span class="nt"&gt;for&lt;/span&gt; &lt;span class="nt"&gt;layers&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Execute the following command in the terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lessc &lt;span class="nt"&gt;--js&lt;/span&gt; my-theme.less result.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example to compile it inside the project styles folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lessc &lt;span class="nt"&gt;--js&lt;/span&gt; my-theme.less ../../../src/style/custom-antd.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now import the resulting CSS into your project.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>One-liner to prevent accidental pushes to public repositories</title>
      <dc:creator>Arnaldo Gabriel</dc:creator>
      <pubDate>Sun, 28 Apr 2019 13:43:45 +0000</pubDate>
      <link>https://dev.to/agmm/one-liner-to-prevent-pushes-to-public-repositories-4e97</link>
      <guid>https://dev.to/agmm/one-liner-to-prevent-pushes-to-public-repositories-4e97</guid>
      <description>&lt;p&gt;&lt;em&gt;Note to self&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;One-liner to disable remote pushing. Useful to prevent accidental pushes to public repositories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote set-url --push origin no_push
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>git</category>
      <category>commandline</category>
      <category>oneliner</category>
      <category>notetoself</category>
    </item>
    <item>
      <title>NPM Package Creation - µGuide</title>
      <dc:creator>Arnaldo Gabriel</dc:creator>
      <pubDate>Sun, 28 Apr 2019 00:28:59 +0000</pubDate>
      <link>https://dev.to/agmm/npm-package-creation-guide-5fa9</link>
      <guid>https://dev.to/agmm/npm-package-creation-guide-5fa9</guid>
      <description>&lt;p&gt;&lt;em&gt;Note to self.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Publish
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create an NPM account&lt;/li&gt;
&lt;li&gt;Create GitHub repo&lt;/li&gt;
&lt;li&gt;Clone repo with &lt;code&gt;git clone &amp;lt;url&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Inside the repo run: &lt;code&gt;npm init&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Fill the required fields&lt;/li&gt;
&lt;li&gt;Push to Github:  &lt;code&gt;git push origin master&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Publish publicly: &lt;code&gt;npm publish&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Basic Commands
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;To publish a new version of the package: &lt;code&gt;npm version 1.0.0 &amp;amp;&amp;amp; npm publish&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;To see the current profile: &lt;code&gt;npm profile get&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;To change a property: &lt;code&gt;npm profile set &amp;lt;property&amp;gt; &amp;lt;value&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;To get current local version: &lt;code&gt;npm version&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;To update a specific package: &lt;code&gt;npm install package@latest&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;To update if the version change is minor:  &lt;code&gt;npm update package&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Whitelisting Specific Directories
&lt;/h3&gt;

&lt;p&gt;This is useful to minimize the size of the package by not including unnecessary files present in the repo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&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;package-name&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;main&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;./lib/index.js&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;files&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;/allowed-directory&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;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>npm</category>
      <category>node</category>
      <category>javascript</category>
      <category>notetoself</category>
    </item>
  </channel>
</rss>
