<?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 Vanderson Ramos on Medium]]></title>
        <description><![CDATA[Stories by Vanderson Ramos on Medium]]></description>
        <link>https://medium.com/@vandersonramos?source=rss-c04c20c58530------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*A05AQL3vicJ4YFkx8dlodA.jpeg</url>
            <title>Stories by Vanderson Ramos on Medium</title>
            <link>https://medium.com/@vandersonramos?source=rss-c04c20c58530------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 00:07:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vandersonramos/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[How to delete remote branches in Git]]></title>
            <link>https://medium.com/@vandersonramos/how-to-delete-remote-branches-in-git-8c340da78c25?source=rss-c04c20c58530------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c340da78c25</guid>
            <category><![CDATA[version-control-system]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[branch]]></category>
            <dc:creator><![CDATA[Vanderson Ramos]]></dc:creator>
            <pubDate>Thu, 12 Dec 2019 18:06:31 GMT</pubDate>
            <atom:updated>2019-12-12T18:07:08.255Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to delete branches in Git (local / remote)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*mWbys9ZZF9FgUcVLWWBNJw.png" /></figure><h4><strong>Deleting local branches</strong></h4><blockquote>Firstly we need to list all branches (local and remote), use the command: <br><strong><em>git branch -a<br></em></strong>The <strong>-a</strong> flag means all</blockquote><p>To delete the local branch, run the git branch command with the <strong>-d (delete) </strong>flag, followed by the branch name that you want to remove.</p><blockquote>git branch -d branch-name</blockquote><p>You can also run <strong>-D</strong> flag which is synonymous with <strong>— delete — force</strong> instead of <strong>-d </strong>only.</p><h4>Deleting remote branches</h4><p>To delete a remote branch, you can use the git push command with <strong>— delete </strong>flag, followed by the name of the branch that you want to delete.</p><blockquote>git push origin — delete branch-name</blockquote><p>Branch-name is the remote branch name that you want to delete.</p><p>That all folks.</p><p>References:</p><p>— <a href="https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches">https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches</a><br> — <a href="https://git-scm.com/docs/git-branch">https://git-scm.com/docs/git-branch</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c340da78c25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Virtualbox on Mac 10.14 Mojave failed with kernel install error]]></title>
            <link>https://medium.com/@vandersonramos/virtualbox-on-mac-10-14-mojave-failed-with-kernel-install-error-cab351fc434e?source=rss-c04c20c58530------2</link>
            <guid isPermaLink="false">https://medium.com/p/cab351fc434e</guid>
            <category><![CDATA[virtualbox]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[mojave]]></category>
            <category><![CDATA[vagrant]]></category>
            <dc:creator><![CDATA[Vanderson Ramos]]></dc:creator>
            <pubDate>Fri, 07 Jun 2019 17:41:39 GMT</pubDate>
            <atom:updated>2022-04-25T17:53:27.187Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p9mHaxTvpT9Yl39F7N6qng.png" /></figure><p>Trying to install Virtualbox on macOS 10.14, I read this <a href="https://medium.com/@DMeechan/fixing-the-installation-failed-virtualbox-error-on-mac-high-sierra-7c421362b5b5"><strong>post</strong></a><strong>.</strong> However, that button never appears for me. Searching deeper I found <a href="https://stackoverflow.com/questions/55004803/install-virtualbox-6-on-mac-10-14-mojave-failed-with-kernel-install-error">this solution</a> and it worked for me.</p><p>Basically you need to do this:</p><blockquote>1. Restart your mac in recovery mode (cmd + R)<br>2. Then open a terminal and enter : <strong>spctl kext-consent add VB5E2TV963</strong><br>3. Restart your mac</blockquote><p>VB5E2TV963 is Oracles developer id.</p><p>If you want to have a better understanding about all this, <a href="https://ilgthegeek.wordpress.com/2018/01/27/macos-install-oracle-virtualbox-on-10-13/"><strong>read this article</strong></a><strong>.</strong></p><p>:)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cab351fc434e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[kill all nginx, php, mysql or any kind of processes you need]]></title>
            <link>https://medium.com/@vandersonramos/kill-all-nginx-php-mysql-or-any-kind-of-processes-you-need-f5622d02d367?source=rss-c04c20c58530------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5622d02d367</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[process]]></category>
            <dc:creator><![CDATA[Vanderson Ramos]]></dc:creator>
            <pubDate>Fri, 01 Mar 2019 13:43:15 GMT</pubDate>
            <atom:updated>2019-03-01T13:43:15.553Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*e8Ht5cDVZscwnTwnB1ZoXg.png" /></figure><p>Sometimes we have an emergency and need to kill all php process for example. Here are some example how you can do it.</p><p><strong>Important</strong>: This should only be used in an emergency. :)</p><p>You only need one line of code.</p><h3>To kill all MySQL Processes:</h3><blockquote>kill $(ps aux | grep ‘[m]ysql’ | awk ‘{print $2}’)</blockquote><h3>To kill all Nginx Processes:</h3><blockquote>kill $(ps aux | grep ‘[n]ginx’ | awk ‘{print $2}’)</blockquote><h3>To kill all PHP Processes:</h3><blockquote>kill $(ps aux | grep ‘[p]hp’ | awk ‘{print $2}’)</blockquote><p>You can kill any other type of process, just keep the first letter in bracket and follow the code above replacing ‘[p]hp’ for example by the process name.</p><p><em>To learn more about the commands:</em></p><ul><li><a href="https://www.computerhope.com/unix/ukill.htm">Linux kill command help and examples</a></li><li><a href="https://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/">How To Use grep Command In Linux / UNIX With Practical Examples</a></li><li><a href="https://www.lifewire.com/write-awk-commands-and-scripts-2200573">A Quick Guide to Writing &quot;AWK&quot; Commands and Scripts</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5622d02d367" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MySQL — How to get the size of the tables?]]></title>
            <link>https://medium.com/@vandersonramos/mysql-how-to-get-the-size-of-the-tables-2490997c0b93?source=rss-c04c20c58530------2</link>
            <guid isPermaLink="false">https://medium.com/p/2490997c0b93</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[terminal]]></category>
            <dc:creator><![CDATA[Vanderson Ramos]]></dc:creator>
            <pubDate>Thu, 07 Feb 2019 12:08:10 GMT</pubDate>
            <atom:updated>2019-02-07T12:10:41.299Z</atom:updated>
            <content:encoded><![CDATA[<h3>MySQL— How to get the size of the tables?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*TTM5AleQfFJ-mItttJROdg.jpeg" /></figure><p>If you need to get the size of the tables in MySQL using the terminal for example, just use the following code.</p><blockquote>SELECT <br> table_name AS ‘Table’, <br> round(((data_length + index_length) / 1024 / 1024), 2) ‘Size in MB’ <br>FROM information_schema.TABLES <br>WHERE table_schema = ‘database_name’<br> AND table_name = ‘table_name’;</blockquote><p>Change the ‘database_name’ for your database name and the table_name for the table name that you want to see the size.</p><p>That’s all :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2490997c0b93" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving the first item to the last position in the array JavaScript]]></title>
            <link>https://medium.com/@vandersonramos/moving-the-first-item-to-the-last-position-in-the-array-javascript-c8ba435efee3?source=rss-c04c20c58530------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8ba435efee3</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[es6]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[array-methods]]></category>
            <dc:creator><![CDATA[Vanderson Ramos]]></dc:creator>
            <pubDate>Sun, 25 Nov 2018 19:13:16 GMT</pubDate>
            <atom:updated>2018-11-25T19:13:16.229Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*2o6DH78qQ14YxbWhvlvF3g.jpeg" /></figure><p>When you need to move the first element in an array to the last position, follow this tip.</p><p>You can use the returned function <strong>array.shift()</strong> as input to the function <strong>array.push()</strong>. See bellow.</p><p>const array = [1, 2, 3, 4, 5];</p><p>array.push(array.shift());</p><p>console.log(array); // [2, 3, 4, 5, 1];</p><p>Now, if you need to move the last item to the first position, just use the return function <strong>array.pop() </strong>as input to the function <strong>array.unshift()</strong>.</p><p>const array = [1, 2, 3, 4, 5];</p><p>array.unshift(array.pop());</p><p>console.log(array); // [5, 1, 2, 3, 4]</p><p>That’s all :)</p><p>References:</p><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift"><strong>array.shift()</strong></a></p><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push"><strong>array.push()</strong></a></p><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop"><strong>array.pop()</strong></a></p><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift"><strong>array.unshift()</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8ba435efee3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to show Mac HD in Finder sidebar]]></title>
            <link>https://medium.com/@vandersonramos/how-to-show-mac-hd-in-finder-sidebar-4c25f1cca56e?source=rss-c04c20c58530------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c25f1cca56e</guid>
            <category><![CDATA[tıp]]></category>
            <category><![CDATA[high-sierra]]></category>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[Vanderson Ramos]]></dc:creator>
            <pubDate>Tue, 12 Jun 2018 03:08:46 GMT</pubDate>
            <atom:updated>2018-06-12T12:33:27.000Z</atom:updated>
            <content:encoded><![CDATA[<p>By default macOS High Sierra may not show you the Macintosh HD folder anywhere in Finder, so here’s how you can do this:</p><ol><li>On your Mac launch Finder.</li><li>Click on the Finder option from the menu bar and click on ‘Preferences’.</li><li>On the Finder Preferences click on the ‘Sidebar’ tab.</li><li>Under ‘Show these items in the sidebar’ click on ‘Hard disks’ option under the devices label.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*liqyQF4g4nMZgMHD6nTlzQ.gif" /></figure><p>As you can see, you also have the ability to show shared items and other external devices.</p><p>That’s all folks ☺</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c25f1cca56e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTMLSelectElement.setCustomValidity()]]></title>
            <link>https://medium.com/@vandersonramos/htmlselectelement-setcustomvalidity-cc0debad5478?source=rss-c04c20c58530------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc0debad5478</guid>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[html5-development]]></category>
            <category><![CDATA[js]]></category>
            <dc:creator><![CDATA[Vanderson Ramos]]></dc:creator>
            <pubDate>Tue, 05 Jun 2018 16:30:01 GMT</pubDate>
            <atom:updated>2022-04-25T18:07:01.111Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/255/1*VJQbp6S1qGgKNUlo54IELg.png" /></figure><p>When we add the required attribute on a form field, we are defining that this field needs to be filled. By default, a tooltip is shown with a default message.<br>To change the default message we use the method setCustomValidity(string) where the string parameter is the new message.<br>Combining with the oninvalid property that execute a JavaScript function when a field is invalid, we will have this:</p><blockquote>&lt;input type=”text” oninvalid=”this.setCustomValidity(‘New Message’)” required&gt;</blockquote><p>and using the property oninput that execute a JavaScript function when the field is filled we can remove the message or add a new one.</p><p>For the select field, the method to use is onchange.</p><blockquote>onchange=”this.setCustomValidity(“”)</blockquote><p>I had this problem using the <a href="https://select2.org/">select2</a>, after validating, even selecting an option, the message was still showing.<br>I was using the oninput method rather than onchange method.</p><p><strong>References:</strong></p><p><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/setCustomValidity"><strong>HTMLSelectElement.setCustomValidity()</strong></a><strong><br></strong><a href="https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/GlobalEventHandlers.oninvalid"><strong>GlobalEventHandlers.oninvalid</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc0debad5478" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript sort() Method]]></title>
            <link>https://medium.com/@vandersonramos/javascript-sort-method-aaa9a26d6038?source=rss-c04c20c58530------2</link>
            <guid isPermaLink="false">https://medium.com/p/aaa9a26d6038</guid>
            <category><![CDATA[sorting-algorithms]]></category>
            <category><![CDATA[es6]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Vanderson Ramos]]></dc:creator>
            <pubDate>Fri, 25 May 2018 19:44:11 GMT</pubDate>
            <atom:updated>2022-04-25T17:58:44.359Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*NKbujgNC12dPefYS4r99Cw.jpeg" /></figure><p>The sort() method sorts the items of an array. Look this example:</p><blockquote>let fruits = [“Banana”, “Orange”, “Apple”, “Mango”];<br> fruits.sort();</blockquote><p>The above code returns an ordered list:</p><blockquote>[Apple, Banana, Mango, Orange]</blockquote><p>Now, using numbers:</p><blockquote>let numbers = [10, 1, 5, 9, 8, 12, 15];<br>numbers.sort();</blockquote><blockquote>[1, 10, 12, 15, 5, 8, 9]</blockquote><p>The above code returns an ordered list, but…we have a problem!<br>You can fix this by providing a “compare function”</p><blockquote>numbers.sort((a, b) =&gt; a — b);</blockquote><p>Is returning an ordered list:</p><blockquote>[1, 5, 8, 9, 10, 12, 15]</blockquote><p>That happens because the sort function by default use the alphabetical order<br>based on the Unicode table. It is documented <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort">here</a></p><p>The sort method receives an optional compare function that given two values<br>must return an int number.</p><p>If is 0 indicates that they are the same.<br>If is -1 indicates that the first value is less.<br>If is 1 indicates that the second value is less.</p><p>That’s all folks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aaa9a26d6038" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to ignore mode changes in Git]]></title>
            <link>https://medium.com/@vandersonramos/how-to-ignore-mode-changes-in-git-89f0d2a098d1?source=rss-c04c20c58530------2</link>
            <guid isPermaLink="false">https://medium.com/p/89f0d2a098d1</guid>
            <category><![CDATA[permission]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Vanderson Ramos]]></dc:creator>
            <pubDate>Sun, 18 Mar 2018 03:45:42 GMT</pubDate>
            <atom:updated>2022-04-25T18:03:30.790Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NZw05fnJfhj4AHyUHT_3QQ.png" /></figure><p>Sometimes you need to change permission on several files on your local environment.<br>The Git shows it as a file change, but in reality, it was a permission change.<br>So, to ignore these changes, open the terminal, go to the repository folder and type it:</p><p>git config core.filemode false</p><p>Adding the --global flag will make it be the default behavior for the logged in user.</p><p>git config --global core.filemode false</p><p>Now on git will ignore any filemode changes.</p><p>That’s all folks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89f0d2a098d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to add git branch to bash prompt?]]></title>
            <link>https://medium.com/@vandersonramos/how-to-add-git-branch-to-bash-prompt-192bddaf9111?source=rss-c04c20c58530------2</link>
            <guid isPermaLink="false">https://medium.com/p/192bddaf9111</guid>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[tips-and-tricks]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[shell]]></category>
            <dc:creator><![CDATA[Vanderson Ramos]]></dc:creator>
            <pubDate>Sun, 01 Oct 2017 19:10:20 GMT</pubDate>
            <atom:updated>2017-10-01T19:10:20.951Z</atom:updated>
            <content:encoded><![CDATA[<p>First, we needed to edit the <strong>PS1</strong> variable in the <strong>~/.bash_profile</strong> file.</p><h4>About the <strong>~/.bash_profile</strong></h4><p>This file resides in the user’s home directory. It’s execured by shells that use authentication. .bash_profile contains commands that are executed for the user at the time of login. If it does not exists, create it.</p><h4>What is PS1</h4><p>PS1 denotes <strong>Prompt String 1. </strong>It’s the one of the prompt available in *Unix shell. When you open your terminal it will display the content defined in the PS1 variable in your terminal.</p><h4><strong>Display git branch name</strong></h4><p>Add the code below to your .bash_profile</p><blockquote>parse_git_branch() {<br> git branch 2&gt; /dev/null | sed -e ‘/^[^*]/d’ -e ‘s/* \(.*\)/ (\1)/’<br>}<br>export PS1=”\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ “</blockquote><p>In above, we defined following properties<br> * \u@\h \[\033[32m\] - user, host name and its displaying color<br> * \w\[\033[33m\] - current working directory and its displaying color<br> * \$(parse_git_branch)\[\033[00m\] - git branch name and its displaying color</p><blockquote>Don’t forget to update the file. Use the following command:</blockquote><blockquote>source ~/.bash_profile</blockquote><p>Now, when you open your terminal and go to the git repository, you can see the git branch name.</p><p>That’s all folks, bye.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=192bddaf9111" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>