<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://kennyalmendral.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://kennyalmendral.github.io/" rel="alternate" type="text/html" /><updated>2024-08-31T17:16:45+00:00</updated><id>https://kennyalmendral.github.io/feed.xml</id><title type="html">Kenny Almendral</title><subtitle>Web/Mobile App Developer</subtitle><entry><title type="html">Loading JavaScript using async and defer</title><link href="https://kennyalmendral.github.io/loading-javascript-async-defer/" rel="alternate" type="text/html" title="Loading JavaScript using async and defer" /><published>2020-03-14T00:00:00+00:00</published><updated>2020-03-14T00:00:00+00:00</updated><id>https://kennyalmendral.github.io/loading-javascript-async-defer</id><content type="html" xml:base="https://kennyalmendral.github.io/loading-javascript-async-defer/"><![CDATA[<p>Inline scripts and links to external JavaScript files are commonly placed before the closing <code class="language-plaintext highlighter-rouge">&lt;/body&gt;</code> tag so that they will be loaded and executed only after the HTML is parsed.</p>

<p>For the links to external JavaScript files, however, the <code class="language-plaintext highlighter-rouge">defer</code> and <code class="language-plaintext highlighter-rouge">async</code> attributes can be added. If either attribute is added to the opening <code class="language-plaintext highlighter-rouge">&lt;script&gt;</code> tag, e.g., <code class="language-plaintext highlighter-rouge">&lt;script defer&gt;</code> or <code class="language-plaintext highlighter-rouge">&lt;script async&gt;</code>, the script tag should be placed inside the <code class="language-plaintext highlighter-rouge">&lt;head&gt;&lt;/head&gt;</code> section and not before the closing <code class="language-plaintext highlighter-rouge">&lt;/body&gt;</code> tag. Otherwise, either attribute will not work.</p>

<h2 id="defer">defer</h2>

<p>The <code class="language-plaintext highlighter-rouge">defer</code> attribute will load the script asynchronously while the HTML is being parsed. After the HTML is parsed, the script will then execute. This is like placing the script tag before the closing <code class="language-plaintext highlighter-rouge">&lt;/body&gt;</code> tag (as mentioned before) but a little bit faster since the script is already loaded when the HTML is parsed and all it has to do is execute.</p>

<p><img src="https://raw.githubusercontent.com/kennyalmendral/kennyalmendral.github.io/master/images/defer.png" alt="defer" title="defer" /></p>

<h2 id="async">async</h2>

<p>The <code class="language-plaintext highlighter-rouge">async</code> attribute will load the script asynchronously while the HTML is being parsed and when the script is ready, the HTML parsing is paused for the script to execute. When the execution is done, the HTML parsing is resumed.</p>

<p><img src="https://raw.githubusercontent.com/kennyalmendral/kennyalmendral.github.io/master/images/async.png" alt="async" title="async" /></p>

<h2 id="notes">Notes</h2>

<ul>
  <li>
    <p>Scripts with the <code class="language-plaintext highlighter-rouge">defer</code> attribute are executed in the order which they are defined in the HTML markup while scripts with the <code class="language-plaintext highlighter-rouge">async</code> attribute are executed in an irregular order, when they become available.</p>
  </li>
  <li>
    <p>The <code class="language-plaintext highlighter-rouge">async</code> attribute blocks the parsing of the page while the <code class="language-plaintext highlighter-rouge">defer</code> attribute does not and if you add both to a script tag that points to the same external JavaScript file, e.g.,</p>

    <div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="nt">&lt;script </span><span class="na">src=</span><span class="s">"app.js"</span> <span class="na">async</span><span class="nt">&gt;&lt;/script&gt;</span>
  <span class="nt">&lt;script </span><span class="na">src=</span><span class="s">"app.js"</span> <span class="na">defer</span><span class="nt">&gt;&lt;/script&gt;</span>
</code></pre></div>    </div>

    <p>The script tag with the <code class="language-plaintext highlighter-rouge">async</code> attribute will take precedence on modern browsers while older browsers will fall back to <code class="language-plaintext highlighter-rouge">defer</code>.</p>
  </li>
</ul>]]></content><author><name></name></author><summary type="html"><![CDATA[Inline scripts and links to external JavaScript files are commonly placed before the closing &lt;/body&gt; tag so that they will be loaded and executed only after the HTML is parsed.]]></summary></entry><entry><title type="html">Configure HeidiSQL to Access Remote Database via SSH Tunnel</title><link href="https://kennyalmendral.github.io/configure-heidisql-remote-database-ssh-tunnel/" rel="alternate" type="text/html" title="Configure HeidiSQL to Access Remote Database via SSH Tunnel" /><published>2019-07-17T00:00:00+00:00</published><updated>2019-07-17T00:00:00+00:00</updated><id>https://kennyalmendral.github.io/configure-heidisql-remote-database-ssh-tunnel</id><content type="html" xml:base="https://kennyalmendral.github.io/configure-heidisql-remote-database-ssh-tunnel/"><![CDATA[<p>Here’s a quick guide on how to access a remote database in HeidiSQL using <a href="https://www.ssh.com/ssh/tunneling/example" target="_blank">SSH Tunnel</a>, which is a mechanism in <a href="https://www.ssh.com/ssh/" target="_blank">SSH</a> for tunneling application ports from the client machine to the server machine and vice versa.</p>

<p>Suppose HeidiSQL is already running, click on an existing session or create a new one by clicking the <strong>New</strong> button.</p>

<h2 id="basic-settings">Basic Settings</h2>

<p>Under the <strong>Settings</strong> tab, do the following:</p>

<ul>
  <li>Set the <strong>Network type</strong> to <code class="language-plaintext highlighter-rouge">MariaDB or MySQL (SSH tunnel)</code></li>
  <li>Set the <strong>Hostname / IP</strong> to <code class="language-plaintext highlighter-rouge">127.0.0.1</code></li>
  <li>Set the <strong>Port</strong> to <code class="language-plaintext highlighter-rouge">3306</code></li>
  <li>Enter the database username and password credentials.</li>
  <li>Select the remote database that you want to access. Leave it empty if you want to access all the databases on the remote server.</li>
</ul>

<h2 id="ssh-tunnel-settings">SSH Tunnel Settings</h2>

<p>Before continuing, make sure that you already have a <code class="language-plaintext highlighter-rouge">.ssh</code> folder in your home directory. If you don’t, open your terminal or command line and run the following command:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
</code></pre></div></div>

<p>That command will create a <code class="language-plaintext highlighter-rouge">.ssh</code> folder in your home directory and inside it, a new public/private SSH key pair will be created as well using the provided email address as a label.</p>

<p>When you’re prompted to “Enter a file in which to save the key”, just press <code class="language-plaintext highlighter-rouge">ENTER</code> to accept the default location which is your home directory. Afterwards, you’ll be prompted to set a passphrase which is optional. Just hit <code class="language-plaintext highlighter-rouge">ENTER</code> if you don’t want to set a passphrase.</p>

<p>Under the <strong>SSH tunnel</strong> tab, do the following:</p>

<ul>
  <li>Set the <strong>plink.exe location</strong> to the path of the <code class="language-plaintext highlighter-rouge">plink.exe</code> executable file. You can download it <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html" target="_blank">here</a> if you don’t have the file yet. It can be found under the <strong>Alternative binary files</strong> section.</li>
  <li>Set the <strong>SSH host + port</strong> to <code class="language-plaintext highlighter-rouge">192.168.123.0</code> as the host and <code class="language-plaintext highlighter-rouge">22</code> as the port. The <code class="language-plaintext highlighter-rouge">192.168.123.0</code> host IP address is just a placeholder, replace it with an actual one.</li>
  <li>Set the <strong>Local port</strong> to <code class="language-plaintext highlighter-rouge">3307</code></li>
  <li>Enter the database username and password credentials.</li>
  <li>Increase or decrease the <strong>plink.exe timeout</strong> value or just leave the default value.</li>
  <li>
    <p>Set the <strong>Private key file</strong> to the path of the <code class="language-plaintext highlighter-rouge">id_rsa.ppk</code> file. If you currently don’t have one, download <code class="language-plaintext highlighter-rouge">puttygen.exe</code> <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html" target="_blank">here</a> in order to generate one. The executable file can be found under the <strong>Alternative binary files</strong> section.</p>

    <p>Run <code class="language-plaintext highlighter-rouge">puttygen.exe</code> and click the <strong>Conversions</strong> menu item and then click <strong>Import key</strong> and then select the <code class="language-plaintext highlighter-rouge">id_rsa</code> private key file. Afterwards, make sure that the <strong>Type of key to generate</strong> is set to <code class="language-plaintext highlighter-rouge">RSA</code> and also, you can enter a <strong>Key passphrase</strong> if you want. Click the <strong>Generate</strong> button when you’re done.</p>
  </li>
</ul>

<p>Don’t forget to click the <strong>Save</strong> button before you click <strong>Open</strong>, otherwise, you’ll be repeating the process once you close and run HeidiSQL again.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Here’s a quick guide on how to access a remote database in HeidiSQL using SSH Tunnel, which is a mechanism in SSH for tunneling application ports from the client machine to the server machine and vice versa.]]></summary></entry><entry><title type="html">PHP Standards Recommendation Reference</title><link href="https://kennyalmendral.github.io/psr-reference/" rel="alternate" type="text/html" title="PHP Standards Recommendation Reference" /><published>2019-06-19T00:00:00+00:00</published><updated>2019-06-19T00:00:00+00:00</updated><id>https://kennyalmendral.github.io/psr-reference</id><content type="html" xml:base="https://kennyalmendral.github.io/psr-reference/"><![CDATA[<p>The PHP Standards Recommendation, also known as “PSR”, is about how you should write your PHP code so that it’ll be easily readable and usable by others. It covers coding style, file organization, autoloading and standardizes various interfaces.</p>

<h2 id="psr-1-basic-coding-standard">PSR-1: Basic Coding Standard</h2>

<ul>
  <li>Files must only use <code class="language-plaintext highlighter-rouge">&lt;?php</code> and <code class="language-plaintext highlighter-rouge">&lt;?=</code> tags.</li>
  <li>File must only use UTF-8 without BOM for PHP code.</li>
  <li>Files should either declare symbols or cause side-effects but should not do both.</li>
  <li>Namespaces and classes must follow an “autoloading” PSR (PSR-0, PSR-4).</li>
  <li>Class names must be declared in <code class="language-plaintext highlighter-rouge">StudlyCaps</code>.</li>
  <li>Class constants must be declared in all uppercase with underscore separators.</li>
  <li>Method names must be declared in <code class="language-plaintext highlighter-rouge">camelCase</code>.</li>
</ul>

<h2 id="psr-2-coding-style-guide">PSR-2: Coding Style Guide</h2>

<ul>
  <li>Code must follow a “coding style guide” PSR (PSR-1).</li>
  <li>Code must use 4 spaces for indentation, not tabs.</li>
  <li>There must not be a hard limit on line length; the soft limit must be 120 characters; lines should be 80 characters or less.</li>
  <li>There must be one blank line after the namespace declaration, and there must be one blank line after the block of use declarations.</li>
  <li>Opening braces for classes must go on the next line, and closing braces must go on the next line after the body.</li>
  <li>Opening braces for methods must go on the next line, and closing braces must go on the next line after the body.</li>
  <li>Visibility must be declared on all properties and methods; abstract and final must be declared before the visibility; static must be declared after the visibility.</li>
  <li>Control structure keywords must have one space after them; method and function calls must not.</li>
  <li>Opening braces for control structures must go on the same line, and closing braces must go on the next line after the body.</li>
  <li>Opening parentheses for control structures must not have a space after them, and closing parentheses for control structures must not have a space before.</li>
</ul>

<h2 id="psr-3-logger-interface">PSR-3: Logger Interface</h2>

<p>The main goal is to allow libraries to receive a <code class="language-plaintext highlighter-rouge">Psr\Log\LoggerInterface</code> object and write logs to it in a simple and universal way. Frameworks and CMSs that you have custom needs may extend the interface for their own purpose, but should remain compatible with this reference. This ensures that the third-party libraries an application uses can write to the centralized application logs.</p>

<h2 id="psr-4-autoloader">PSR-4: Autoloader</h2>

<p>This PSR describes a specification for autoloading classes from file paths. It is fully interoperable, and can be used in addition to any other autoloading specification, including PSR-0 and also describes where to place files that will be autoloaded according to the specification.</p>

<h2 id="psr-6-caching-interface">PSR-6: Caching Interface</h2>

<p>Cache-aware libraries that can be integrated into existing frameworks and systems without the need for custom development.</p>

<h2 id="psr-7-http-message-interfaces">PSR-7: HTTP Message Interfaces</h2>

<p>The first line of a request is the “request line” and contains the following (in order):</p>

<ul>
  <li>The HTTP request method</li>
  <li>The request target (usually either an absolute URI or a path on the web server)</li>
  <li>The HTTP protocol version</li>
</ul>

<p>Followed by one or more HTTP headers, an empty line and the message body.</p>

<h2 id="psr-11-container-interface">PSR-11: Container Interface</h2>

<p>Standardize how frameworks and libraries make use of a container to obtain objects and parameters.</p>

<h2 id="psr-13-link-definition-interfaces">PSR-13: Link Definition Interfaces</h2>

<p>Serialize a response with hypermedia links into one or more wire formats independent of the process of deciding what those links should be.</p>

<h2 id="psr-16-common-interface-for-caching-libraries">PSR-16: Common Interface for Caching Libraries</h2>

<p>Libraries can drop their own caching implementations and easily rely on the one given to them by the framework or another dedicated cache library. It is independent of PSR-6 but has been designed to make compatibility with PSR-6 as straightforward as possible.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[The PHP Standards Recommendation, also known as “PSR”, is about how you should write your PHP code so that it’ll be easily readable and usable by others. It covers coding style, file organization, autoloading and standardizes various interfaces.]]></summary></entry><entry><title type="html">Fix Multiple Chart Issue in Chart.js</title><link href="https://kennyalmendral.github.io/chartjs-multiple-chart-issue-fix/" rel="alternate" type="text/html" title="Fix Multiple Chart Issue in Chart.js" /><published>2019-06-10T00:00:00+00:00</published><updated>2019-06-10T00:00:00+00:00</updated><id>https://kennyalmendral.github.io/chartjs-multiple-chart-issue-fix</id><content type="html" xml:base="https://kennyalmendral.github.io/chartjs-multiple-chart-issue-fix/"><![CDATA[<p>This multiple chart issue usually happens when you hover the mouse to a coordinate that already contains existing data that was just replaced by another data returned from an asynchronous request.</p>

<h2 id="the-workaround">The Workaround</h2>

<p>Suppose you have an instance of a pie chart for example:</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">new</span> <span class="nx">Chart</span><span class="p">(</span><span class="nx">context</span><span class="p">).</span><span class="nx">Pie</span><span class="p">(</span><span class="nx">data</span><span class="p">);</span>
</code></pre></div></div>

<p>Assign that instance to a variable and specify that variable as a property of the <code class="language-plaintext highlighter-rouge">window</code> object like so:</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">window</span><span class="p">.</span><span class="nx">pieChart</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Chart</span><span class="p">(</span><span class="nx">context</span><span class="p">).</span><span class="nx">Pie</span><span class="p">(</span><span class="nx">data</span><span class="p">);</span>
</code></pre></div></div>

<p>Afterwards, add an <code class="language-plaintext highlighter-rouge">if</code> condition before it that checks if <code class="language-plaintext highlighter-rouge">window.pieChart</code> already exists and if so, remove it like so:</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">pieChart</span> <span class="o">!==</span> <span class="kc">undefined</span><span class="p">)</span> <span class="p">{</span>
  <span class="nb">window</span><span class="p">.</span><span class="nx">pieChart</span><span class="p">.</span><span class="nx">destroy</span><span class="p">();</span>
<span class="p">}</span>

<span class="nb">window</span><span class="p">.</span><span class="nx">pieChart</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Chart</span><span class="p">(</span><span class="nx">context</span><span class="p">).</span><span class="nx">Pie</span><span class="p">(</span><span class="nx">data</span><span class="p">);</span>
</code></pre></div></div>]]></content><author><name></name></author><summary type="html"><![CDATA[This multiple chart issue usually happens when you hover the mouse to a coordinate that already contains existing data that was just replaced by another data returned from an asynchronous request.]]></summary></entry><entry><title type="html">Integrate AngularFire2 with Ionic 3</title><link href="https://kennyalmendral.github.io/ionic3-angularfire2-integration/" rel="alternate" type="text/html" title="Integrate AngularFire2 with Ionic 3" /><published>2019-03-29T00:00:00+00:00</published><updated>2019-03-29T00:00:00+00:00</updated><id>https://kennyalmendral.github.io/ionic3-angularfire2-integration</id><content type="html" xml:base="https://kennyalmendral.github.io/ionic3-angularfire2-integration/"><![CDATA[<p>Here’s a step by step process on how to integrate AngularFire2 into an Ionic 3 project.</p>

<h2 id="installation">Installation</h2>

<p>You can create an Ionic 3 project via the Ionic CLI if you don’t already have one using the following command:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ionic start project_name blank --type=ionic-angular
</code></pre></div></div>

<p>Go to the project root and run the following commands to install AngularFire2 properly:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>npm install angularfire2 firebase promise-polyfill --save
npm i rxjs@6 rxjs-compat@6 promise-polyfill --save
npm install -g typescript@latest
</code></pre></div></div>

<h2 id="integration">Integration</h2>

<p>Inside the <code class="language-plaintext highlighter-rouge">app.module.ts</code> file, make the following changes:</p>

<p>Add the following import declarations:</p>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="p">{</span> <span class="nx">AngularFireModule</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">@angular/fire</span><span class="dl">'</span><span class="p">;</span>
<span class="k">import</span> <span class="p">{</span> <span class="nx">AngularFireDatabaseModule</span><span class="p">,</span> <span class="nx">AngularFireDatabase</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">@angular/fire/database</span><span class="dl">'</span><span class="p">;</span>
<span class="k">import</span> <span class="p">{</span> <span class="nx">AngularFireAuthModule</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">@angular/fire/auth</span><span class="dl">'</span><span class="p">;</span>
</code></pre></div></div>

<p>Then add those three to the <code class="language-plaintext highlighter-rouge">imports</code> array.</p>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">imports</span><span class="p">:</span> <span class="p">[</span>
  <span class="nx">AngularFireModule</span><span class="p">.</span><span class="nx">initializeApp</span><span class="p">(</span><span class="nx">firebaseConfig</span><span class="p">),</span>
  <span class="nx">AngularFireDatabaseModule</span><span class="p">,</span>
  <span class="nx">AngularFireAuthModule</span>
<span class="p">],</span>
</code></pre></div></div>

<p>Under the <code class="language-plaintext highlighter-rouge">AngularFireModule.initializeApp</code>, you may have noticed that you have to pass the firebase configuration object as an argument that looks something like this:</p>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">firebaseConfig</span> <span class="o">=</span> <span class="p">{</span>
  <span class="na">apiKey</span><span class="p">:</span> <span class="dl">"</span><span class="s2">AIzaSyA01NrGxzckRwE6sf_vL3cc7ueGMGXntRA</span><span class="dl">"</span><span class="p">,</span>
  <span class="na">authDomain</span><span class="p">:</span> <span class="dl">"</span><span class="s2">sample-project-825a8.firebaseapp.com</span><span class="dl">"</span><span class="p">,</span>
  <span class="na">databaseURL</span><span class="p">:</span> <span class="dl">"</span><span class="s2">https://sample-project-825a8.firebaseio.com</span><span class="dl">"</span><span class="p">,</span>
  <span class="na">projectId</span><span class="p">:</span> <span class="dl">"</span><span class="s2">sample-project-825a8</span><span class="dl">"</span><span class="p">,</span>
  <span class="na">storageBucket</span><span class="p">:</span> <span class="dl">"</span><span class="s2">sample-project-825a8.appspot.com</span><span class="dl">"</span><span class="p">,</span>
  <span class="na">messagingSenderId</span><span class="p">:</span> <span class="dl">"</span><span class="s2">117752906836</span><span class="dl">"</span>
<span class="p">};</span>
</code></pre></div></div>

<p>Lastly, add the <code class="language-plaintext highlighter-rouge">AngularFireDatabase</code> to the <code class="language-plaintext highlighter-rouge">providers</code> array.</p>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">providers</span><span class="p">:</span> <span class="p">[</span>
  <span class="nx">AngularFireDatabase</span>
<span class="p">]</span>
</code></pre></div></div>

<h2 id="usage">Usage</h2>

<p>Inside a component, add the following to the import declarations:</p>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="p">{</span> <span class="nx">AngularFireDatabase</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">@angular/fire/database</span><span class="dl">'</span><span class="p">;</span>
<span class="k">import</span> <span class="p">{</span> <span class="nx">Observable</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">rxjs</span><span class="dl">'</span><span class="p">;</span>
</code></pre></div></div>

<p>You can now use firebase features in your project like so:</p>
<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">this</span><span class="p">.</span><span class="nx">db</span><span class="p">.</span><span class="nx">list</span><span class="p">(</span><span class="dl">'</span><span class="s1">/messages</span><span class="dl">'</span><span class="p">).</span><span class="nx">push</span><span class="p">({</span>
  <span class="na">message</span><span class="p">:</span> <span class="dl">"</span><span class="s2">Hello world!</span><span class="dl">"</span>
<span class="p">});</span>

<span class="k">this</span><span class="p">.</span><span class="nx">db</span><span class="p">.</span><span class="nx">list</span><span class="p">(</span><span class="dl">'</span><span class="s1">/messages</span><span class="dl">'</span><span class="p">).</span><span class="nx">valueChanges</span><span class="p">().</span><span class="nx">subscribe</span><span class="p">((</span><span class="nx">response</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
  <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">response</span><span class="p">);</span>
<span class="p">},</span> <span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
  <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">error</span><span class="p">);</span>
<span class="p">});</span>
</code></pre></div></div>]]></content><author><name></name></author><summary type="html"><![CDATA[Here’s a step by step process on how to integrate AngularFire2 into an Ionic 3 project.]]></summary></entry><entry><title type="html">Clear Commit History of a Git Repository</title><link href="https://kennyalmendral.github.io/clear-git-commit-history/" rel="alternate" type="text/html" title="Clear Commit History of a Git Repository" /><published>2019-03-19T00:00:00+00:00</published><updated>2019-03-19T00:00:00+00:00</updated><id>https://kennyalmendral.github.io/clear-git-commit-history</id><content type="html" xml:base="https://kennyalmendral.github.io/clear-git-commit-history/"><![CDATA[<p>Here’s how you can clear a cluttered commit history in a Git repository.</p>

<p>Open your bash terminal, clone the repository and inside that repository, run the following commands:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rm -rf .git
	
git init
git add .
git commit -m "Initial commit"

git remote add origin &lt;repository_url&gt;
git push -u --force origin master
</code></pre></div></div>]]></content><author><name></name></author><summary type="html"><![CDATA[Here’s how you can clear a cluttered commit history in a Git repository.]]></summary></entry><entry><title type="html">Integrate Bootstrap with Angular</title><link href="https://kennyalmendral.github.io/integrate-bootstrap-angular/" rel="alternate" type="text/html" title="Integrate Bootstrap with Angular" /><published>2019-03-08T00:00:00+00:00</published><updated>2019-03-08T00:00:00+00:00</updated><id>https://kennyalmendral.github.io/integrate-bootstrap-angular</id><content type="html" xml:base="https://kennyalmendral.github.io/integrate-bootstrap-angular/"><![CDATA[<p>Here’s a step by step process on how you can install and integrate Bootstrap into your Angular project.</p>

<h2 id="installation">Installation</h2>

<p>Go to your project root (if you’re not currently there) and run <code class="language-plaintext highlighter-rouge">npm install bootstrap</code> which installs the latest Bootstrap version which at the time of this writing is 4.3.1.</p>

<p>If you want to add Bootstrap in your <code class="language-plaintext highlighter-rouge">package.json</code> dependencies, add the <code class="language-plaintext highlighter-rouge">--save</code> flag to the command like so: <code class="language-plaintext highlighter-rouge">npm install bootstrap --save</code>.</p>

<p>If you have to install an older version, just specify it using <code class="language-plaintext highlighter-rouge">npm install &lt;package_name&gt;@&lt;version_number&gt;</code>, for example, <code class="language-plaintext highlighter-rouge">npm install bootstrap@3.3.7</code> to install Bootstrap version 3.3.7.</p>

<p>If you’re not sure what versions are available out there, you can use <code class="language-plaintext highlighter-rouge">npm view bootstrap versions</code> which at the time of this writing will show the following:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[ '0.0.1',        
  '0.0.2',        
  '3.1.1',        
  '3.2.0',        
  '3.3.0',        
  '3.3.1',        
  '3.3.2',        
  '3.3.4',        
  '3.3.5',        
  '3.3.6',        
  '3.3.7',        
  '3.4.0',        
  '3.4.1',        
  '4.0.0-alpha.2',
  '4.0.0-alpha.3',
  '4.0.0-alpha.4',
  '4.0.0-alpha.5',
  '4.0.0-alpha.6',
  '4.0.0-beta',   
  '4.0.0-beta.2', 
  '4.0.0-beta.3', 
  '4.0.0',        
  '4.1.0',        
  '4.1.1',        
  '4.1.2',        
  '4.1.3',        
  '4.2.1',        
  '4.3.0',        
  '4.3.1' ]
</code></pre></div></div>

<h2 id="integration">Integration</h2>

<p>In your project root, open the <code class="language-plaintext highlighter-rouge">angular.json</code> file in your code editor and look for the <code class="language-plaintext highlighter-rouge">"styles"</code> array under the <code class="language-plaintext highlighter-rouge">"architect.build"</code> object and add <code class="language-plaintext highlighter-rouge">node_modules/bootstrap/dist/css/bootstrap.min.css</code> like so:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>"styles": [
  "node_modules/bootstrap/dist/css/bootstrap.min.css"
]
</code></pre></div></div>

<p>Afterwards, run <code class="language-plaintext highlighter-rouge">ng serve</code> to compile the changes or if <code class="language-plaintext highlighter-rouge">ng serve</code> is already running, terminate it using <code class="language-plaintext highlighter-rouge">Ctrl + C</code> or <code class="language-plaintext highlighter-rouge">Cmd + C</code> if you’re on a Mac and run <code class="language-plaintext highlighter-rouge">ng serve</code> again.</p>

<p>That’s basically it! You can now use Bootstrap in your Angular project with all its glory.</p>

<hr />]]></content><author><name></name></author><summary type="html"><![CDATA[Here’s a step by step process on how you can install and integrate Bootstrap into your Angular project.]]></summary></entry><entry><title type="html">WordPress Snippets</title><link href="https://kennyalmendral.github.io/wordpress-snippets/" rel="alternate" type="text/html" title="WordPress Snippets" /><published>2019-03-07T00:00:00+00:00</published><updated>2019-03-07T00:00:00+00:00</updated><id>https://kennyalmendral.github.io/wordpress-snippets</id><content type="html" xml:base="https://kennyalmendral.github.io/wordpress-snippets/"><![CDATA[<p>An ongoing collection of short but useful WordPress snippets.</p>

<h3 id="disable-the-admin-bar">Disable the Admin Bar</h3>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nf">add_filter</span><span class="p">(</span><span class="s1">'show_admin_bar'</span><span class="p">,</span> <span class="s1">'__return_false'</span><span class="p">);</span>
</code></pre></div></div>

<h3 id="get-the-current-page-slug">Get the Current Page Slug</h3>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">global</span> <span class="nv">$wp</span><span class="p">;</span>
<span class="nv">$current_page_slug</span> <span class="o">=</span> <span class="nf">add_query_arg</span><span class="p">(</span><span class="k">array</span><span class="p">(),</span> <span class="nv">$wp</span><span class="o">-&gt;</span><span class="n">request</span><span class="p">);</span>
</code></pre></div></div>

<h3 id="retrieve-the-currently-queried-object">Retrieve the Currently Queried Object</h3>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$current_obj</span> <span class="o">=</span> <span class="nf">get_queried_object</span><span class="p">();</span>
</code></pre></div></div>

<h3 id="get-an-html-image-element-representing-an-image-attachment">Get an HTML Image Element Representing an Image Attachment</h3>
<p><a href="https://developer.wordpress.org/reference/functions/wp_get_attachment_image/" target="_blank">https://developer.wordpress.org/reference/functions/wp_get_attachment_image</a></p>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nf">wp_get_attachment_image</span><span class="p">(</span><span class="nf">get_the_ID</span><span class="p">(),</span> <span class="s1">'thumbnail'</span><span class="p">,</span> <span class="kc">false</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s1">'class'</span> <span class="o">=&gt;</span> <span class="s1">'img-responsive'</span><span class="p">));</span>
</code></pre></div></div>

<h3 id="display-numbered-pagination-links">Display Numbered Pagination Links</h3>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">global</span> <span class="nv">$wp_query</span><span class="p">;</span>
<span class="nv">$total</span> <span class="o">=</span> <span class="nv">$wp_query</span><span class="o">-&gt;</span><span class="n">max_num_pages</span><span class="p">;</span>

<span class="k">if</span> <span class="p">(</span><span class="nv">$total</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">)</span>  <span class="p">{</span>
  <span class="k">if</span> <span class="p">(</span> <span class="o">!</span> <span class="nv">$current_page</span> <span class="o">=</span> <span class="nf">get_query_var</span><span class="p">(</span><span class="s1">'paged'</span><span class="p">))</span>
    <span class="nv">$current_page</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>

  <span class="nv">$format</span> <span class="o">=</span> <span class="k">empty</span><span class="p">(</span><span class="nf">get_option</span><span class="p">(</span><span class="s1">'permalink_structure'</span><span class="p">))</span> <span class="o">?</span> <span class="s1">'&amp;page=%#%'</span> <span class="o">:</span> <span class="s1">'page/%#%/'</span><span class="p">;</span>
  
  <span class="k">echo</span> <span class="nf">paginate_links</span><span class="p">(</span><span class="k">array</span><span class="p">(</span>
    <span class="s1">'base'</span> <span class="o">=&gt;</span> <span class="nf">get_pagenum_link</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="mf">.</span> <span class="s1">'%_%'</span><span class="p">,</span>
    <span class="s1">'format'</span> <span class="o">=&gt;</span> <span class="nv">$format</span><span class="p">,</span>
    <span class="s1">'current'</span> <span class="o">=&gt;</span> <span class="nv">$current_page</span><span class="p">,</span>
    <span class="s1">'total'</span> <span class="o">=&gt;</span> <span class="nv">$total</span><span class="p">,</span>
    <span class="s1">'mid_size'</span> <span class="o">=&gt;</span> <span class="mi">4</span><span class="p">,</span>
    <span class="s1">'type'</span> <span class="o">=&gt;</span> <span class="s1">'list'</span>
  <span class="p">));</span>
<span class="p">}</span>
</code></pre></div></div>

<h3 id="customize-excerpt-length">Customize Excerpt Length</h3>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">function</span> <span class="n">custom_excerpt_length</span><span class="p">(</span><span class="nv">$length</span><span class="p">)</span> <span class="p">{</span>
  <span class="k">return</span> <span class="mi">40</span><span class="p">;</span>
<span class="p">}</span>

<span class="nf">add_filter</span><span class="p">(</span><span class="s1">'excerpt_length'</span><span class="p">,</span> <span class="s1">'custom_excerpt_length'</span><span class="p">,</span> <span class="mi">999</span><span class="p">);</span>
</code></pre></div></div>

<h3 id="allow-additional-formats-in-the-media-library">Allow Additional Formats in the Media Library</h3>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">function</span> <span class="n">add_custom_mime_types</span><span class="p">(</span><span class="nv">$mimes</span><span class="p">)</span> <span class="p">{</span>
  <span class="nv">$new_mime_types</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
    <span class="s1">'zip'</span> <span class="o">=&gt;</span> <span class="s1">'application/zip'</span><span class="p">,</span>
    <span class="s1">'pdf'</span> <span class="o">=&gt;</span> <span class="s1">'application/pdf'</span>
  <span class="p">);</span>
  
  <span class="k">return</span> <span class="nb">array_merge</span><span class="p">(</span><span class="nv">$mimes</span><span class="p">,</span> <span class="nv">$new_mime_types</span><span class="p">);</span>
<span class="p">}</span>

<span class="nf">add_filter</span><span class="p">(</span><span class="s1">'upload_mimes'</span><span class="p">,</span> <span class="s1">'add_custom_mime_types'</span><span class="p">);</span>
</code></pre></div></div>

<h3 id="create-custom-shortcode">Create Custom Shortcode</h3>
<p>Create a shortcode that can accept a series of arguments which can be used in a template file.</p>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">function</span> <span class="n">posts_shortcode</span><span class="p">(</span><span class="nv">$atts</span><span class="p">)</span> <span class="p">{</span>
  <span class="nb">ob_start</span><span class="p">();</span>
  
  <span class="nv">$a</span> <span class="o">=</span> <span class="nf">shortcode_atts</span><span class="p">(</span><span class="k">array</span><span class="p">(</span>
    <span class="s1">'type'</span> <span class="o">=&gt;</span> <span class="s1">'post'</span>
  <span class="p">),</span> <span class="nv">$atts</span><span class="p">);</span>

  <span class="k">include</span><span class="p">(</span><span class="nf">locate_template</span><span class="p">(</span><span class="s1">'front-page.php'</span><span class="p">,</span> <span class="kc">false</span><span class="p">,</span> <span class="kc">false</span><span class="p">));</span>
  
  <span class="k">return</span> <span class="nb">ob_get_clean</span><span class="p">();</span>
<span class="p">}</span>

<span class="nf">add_shortcode</span><span class="p">(</span><span class="s1">'posts'</span><span class="p">,</span> <span class="s1">'posts_shortcode'</span><span class="p">);</span>
</code></pre></div></div>

<h3 id="customize-wp-login-logo">Customize WP Login Logo</h3>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">function</span> <span class="n">custom_login_logo</span><span class="p">()</span> <span class="p">{</span>
  <span class="k">echo</span> <span class="s1">'&lt;style&gt;'</span><span class="p">;</span>
  <span class="k">echo</span> <span class="s1">'#login h1 a, .login h1 a {'</span><span class="p">;</span>
  <span class="k">echo</span> <span class="s1">'background-image: url('</span> <span class="mf">.</span> <span class="nf">get_stylesheet_directory_uri</span><span class="p">()</span> <span class="mf">.</span> <span class="s1">'/images/logo.png'</span><span class="p">);</span><span class="s1">';
  echo '</span><span class="p">}</span><span class="s1">';
  echo '</span><span class="o">&lt;/</span><span class="n">style</span><span class="o">&gt;</span><span class="s1">';
}

add_action('</span><span class="n">login_enqueue_scripts</span><span class="s1">', '</span><span class="n">custom_login_logo</span><span class="err">'</span><span class="p">);</span>
</code></pre></div></div>

<h3 id="wp-admin-ajax-url">WP Admin AJAX URL</h3>
<p>Store the WordPress admin AJAX URL to a JavaScript variable for frontend AJAX request purposes.</p>
<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">function</span> <span class="n">add_ajax_url</span><span class="p">()</span> <span class="p">{</span>
  <span class="nv">$ajax_url_html</span> <span class="o">=</span> <span class="s1">'&lt;script&gt;'</span><span class="p">;</span>
  <span class="nv">$ajax_url_html</span> <span class="mf">.</span><span class="o">=</span> <span class="s1">'var ajaxUrl="'</span> <span class="mf">.</span> <span class="nf">admin_url</span><span class="p">(</span><span class="s1">'admin-ajax.php'</span><span class="p">)</span> <span class="mf">.</span> <span class="s1">'";'</span><span class="p">;</span>
  <span class="nv">$ajax_url_html</span> <span class="mf">.</span><span class="o">=</span> <span class="s1">'&lt;/script&gt;'</span><span class="p">;</span>
  
  <span class="k">echo</span> <span class="nv">$ajax_url_html</span><span class="p">;</span>
<span class="p">}</span>

<span class="nf">add_action</span><span class="p">(</span><span class="s1">'wp_head'</span><span class="p">,</span> <span class="s1">'add_ajax_url'</span><span class="p">);</span>
</code></pre></div></div>

<h4 id="contributor">Contributor</h4>
<ul>
  <li><a href="https://github.com/dannamariegarcia" target="_blank">Danna Garcia</a></li>
</ul>

<hr />]]></content><author><name></name></author><summary type="html"><![CDATA[An ongoing collection of short but useful WordPress snippets.]]></summary></entry><entry><title type="html">Terminal and Git Cheatsheet</title><link href="https://kennyalmendral.github.io/terminal-git-cheatsheet/" rel="alternate" type="text/html" title="Terminal and Git Cheatsheet" /><published>2019-03-06T00:00:00+00:00</published><updated>2019-03-06T00:00:00+00:00</updated><id>https://kennyalmendral.github.io/terminal-git-cheatsheet</id><content type="html" xml:base="https://kennyalmendral.github.io/terminal-git-cheatsheet/"><![CDATA[<p>Just another terminal and git cheatsheet.</p>

<h2 id="terminal-commands">Terminal Commands</h2>

<p><strong>cd</strong> - Change directory, e.g. <code class="language-plaintext highlighter-rouge">cd ~/Desktop</code> where <code class="language-plaintext highlighter-rouge">~</code> simply means the current user’s home directory followed by a trailing slash <code class="language-plaintext highlighter-rouge">/</code> and then go to the <code class="language-plaintext highlighter-rouge">Desktop</code> folder.</p>

<ul>
  <li>Both <code class="language-plaintext highlighter-rouge">cd</code> and <code class="language-plaintext highlighter-rouge">cd ~</code> goes to the current user’s home directory.</li>
  <li><code class="language-plaintext highlighter-rouge">cd -</code> goes back to the previous directory.</li>
  <li><code class="language-plaintext highlighter-rouge">cd /</code> goes to the root directory of the drive.</li>
  <li><code class="language-plaintext highlighter-rouge">cd ../</code> goes to the parent directory of the current directory.</li>
</ul>

<p><strong>ls</strong> - List directory, e.g. <code class="language-plaintext highlighter-rouge">ls ~/Desktop</code> which lists all the files and folders inside the <code class="language-plaintext highlighter-rouge">Desktop</code> folder.</p>

<ul>
  <li>Both <code class="language-plaintext highlighter-rouge">ls</code> and <code class="language-plaintext highlighter-rouge">ls .</code> lists the contents of the current directory. The <code class="language-plaintext highlighter-rouge">.</code> refers to the current directory.</li>
  <li><code class="language-plaintext highlighter-rouge">ls -l</code> lists the contents of a directory in a more readable format.</li>
  <li><code class="language-plaintext highlighter-rouge">ls -a</code> lists the contents of a directory including hidden files and folders.</li>
  <li><code class="language-plaintext highlighter-rouge">ls -la</code> lists the contents of a directory in a more readable format including hidden files and folders.</li>
</ul>

<p><strong>clear</strong> - Clears the terminal screen. Another way is by pressing <code class="language-plaintext highlighter-rouge">Ctrl + l</code>.</p>

<p><strong>pwd</strong> - Prints the absolute path of the current working directory to the terminal screen.</p>

<p><strong>open</strong> - Opens a file, e.g. <code class="language-plaintext highlighter-rouge">open index.html</code> where <code class="language-plaintext highlighter-rouge">index.html</code> is the name of the file.</p>

<p><strong>cat</strong> - Outputs the contents of file, e.g. <code class="language-plaintext highlighter-rouge">cat index.html</code> to the terminal screen.</p>

<p><strong>touch</strong> - Creates a new file, e.g. <code class="language-plaintext highlighter-rouge">touch index.html</code> where <code class="language-plaintext highlighter-rouge">index.html</code> is the name of the file.</p>

<p><strong>mkdir</strong> - Creates a new folder, e.g. <code class="language-plaintext highlighter-rouge">mkdir assets</code> where <code class="language-plaintext highlighter-rouge">assets</code> is the name of the folder.</p>

<p><strong>rm</strong> - Removes a file, e.g. <code class="language-plaintext highlighter-rouge">rm index.html</code> where <code class="language-plaintext highlighter-rouge">index.html</code> is the the name of the file.</p>

<p><strong>rm -r</strong> - Removes a folder and it’s contents, e.g. <code class="language-plaintext highlighter-rouge">rm -r assets</code> where <code class="language-plaintext highlighter-rouge">assets</code> is the the name of the folder.</p>

<p><strong>cp</strong> - Copy file to file, e.g. <code class="language-plaintext highlighter-rouge">cp ~/Downloads/index.html ~/Desktop/index.html</code> where the <code class="language-plaintext highlighter-rouge">~/Downloads/index.html</code> is the source file and the <code class="language-plaintext highlighter-rouge">~/Desktop/index.html</code> is the destination file.</p>

<ul>
  <li>To copy a file to a directory, use <code class="language-plaintext highlighter-rouge">cp index.html ~/Desktop</code> where <code class="language-plaintext highlighter-rouge">index.html</code> is the source file and the <code class="language-plaintext highlighter-rouge">~/Desktop</code> is the destination folder.</li>
  <li>The destination file can be renamed, e.g. <code class="language-plaintext highlighter-rouge">cp ~/Downloads/index.html ~/Desktop/about.html</code> where the <code class="language-plaintext highlighter-rouge">~/Downloads/index.html</code> is the source file and the <code class="language-plaintext highlighter-rouge">~/Desktop/about.html</code> is the destination file but with a different file name.</li>
</ul>

<p><strong>cp -R</strong> - Copy folder to folder, e.g. <code class="language-plaintext highlighter-rouge">cp ~/Downloads/assets ~/Desktop/assets</code> where the <code class="language-plaintext highlighter-rouge">~/Downloads/assets</code> is the source folder and the <code class="language-plaintext highlighter-rouge">~/Desktop/assets</code> is the destination folder.</p>

<ul>
  <li>The destination folder can be renamed, e.g. <code class="language-plaintext highlighter-rouge">cp ~/Downloads/assets ~/Desktop/images</code> where the <code class="language-plaintext highlighter-rouge">~/Downloads/assets</code> is the source folder and the <code class="language-plaintext highlighter-rouge">~/Desktop/images</code> is the destination folder but with a different folder name.</li>
</ul>

<p><strong>mv</strong> - Same with the <code class="language-plaintext highlighter-rouge">cp</code> command, the only difference is that it moves/cuts a file instead of copying.</p>

<p><strong>mv -R</strong> - Same with the <code class="language-plaintext highlighter-rouge">cp -R</code> command, the only difference is that it moves/cuts a folder instead of copying.</p>

<p><strong>grep</strong> - Searches the contents of a file using a “search string”, e.g. <code class="language-plaintext highlighter-rouge">grep 'Hello World' index.html</code> where <code class="language-plaintext highlighter-rouge">'Hello World'</code> is the search string and <code class="language-plaintext highlighter-rouge">index.html</code> is the file being searched.</p>

<p><strong>grep -r</strong> - Searches the contents of a folder using a “search string”, e.g. <code class="language-plaintext highlighter-rouge">grep -r '.heading' assets</code> where <code class="language-plaintext highlighter-rouge">'.heading'</code> is the search string and <code class="language-plaintext highlighter-rouge">assets</code> is the folder being searched.</p>

<ul>
  <li>To search the contents of the current directory, use <code class="language-plaintext highlighter-rouge">grep -r 'Hello World' .</code> where <code class="language-plaintext highlighter-rouge">'Hello World'</code> is the search string and the <code class="language-plaintext highlighter-rouge">.</code> <em>(which points to the current directory)</em> is the folder being searched.</li>
</ul>

<h2 id="git-commands">Git Commands</h2>

<p><strong>git clone</strong> - Clones an existing repository to the current directory, e.g. <code class="language-plaintext highlighter-rouge">git clone https://bitbucket.org/user/repo/</code> where <code class="language-plaintext highlighter-rouge">https://bitbucket.org/user/repo/</code> is the remote repository source URL.</p>

<ul>
  <li>To clone a remote repository to a different directory, use <code class="language-plaintext highlighter-rouge">git clone https://bitbucket.org/user/repo/ ~/Desktop</code> where <code class="language-plaintext highlighter-rouge">~/Desktop</code> is the folder name.</li>
</ul>

<p><strong>git init</strong> - Creates a local repository inside a folder.</p>

<ul>
  <li>This folder will be called as the “working directory”.</li>
  <li>The working directory is basically where the unstaged changes resides.</li>
</ul>

<p><strong>git status</strong> - Checks the status of a local repository if there are uncommitted changes or if there aren’t.</p>

<p><strong>git add</strong> - Adds a modified file or folder to the next commit, e.g. <code class="language-plaintext highlighter-rouge">git add index.html</code> or <code class="language-plaintext highlighter-rouge">git add assets</code> where <code class="language-plaintext highlighter-rouge">index.html</code> is the modified file and <code class="language-plaintext highlighter-rouge">assets</code> is the modified folder.</p>

<ul>
  <li>
    <p>Use <code class="language-plaintext highlighter-rouge">git add .</code> to add all the changes to the next commit.</p>
  </li>
  <li>
    <p>Every added files/folders are moved to the “staging area”.</p>
  </li>
</ul>

<p><strong>git commit</strong> - Commits the added changes with a commit message using the <code class="language-plaintext highlighter-rouge">-m</code> flag, e.g. <code class="language-plaintext highlighter-rouge">git commit -m "Initial commit"</code> to the local repository.</p>

<ul>
  <li>Every commit creates a “commit hash” which is basically a unique ID for a particular commit.</li>
</ul>

<p><strong>git log</strong> - Lists all the commits in a local repository.</p>

<ul>
  <li>Use <code class="language-plaintext highlighter-rouge">git log --oneline</code> to list all the commits in a compact format.</li>
</ul>

<p><strong>git remote -v</strong> - Lists the remote repository URL that your local repository is currently pointing to.</p>

<ul>
  <li>If there’s no remote repository found, use <code class="language-plaintext highlighter-rouge">git remote add "https://bitbucket.org/user/repo/"</code> where <code class="language-plaintext highlighter-rouge">https://bitbucket.org/user/repo/</code> is the remote repository URL.</li>
</ul>

<p><strong>git push</strong> - Push local repository changes/commits to the remote repository.</p>

<ul>
  <li>To push without needing to log in every time, enter the following on the terminal: <code class="language-plaintext highlighter-rouge">git config --global user.name "user"</code> and <code class="language-plaintext highlighter-rouge">git config --global user.email "user@gmail.com"</code>. Replace the <code class="language-plaintext highlighter-rouge">"user"</code> and <code class="language-plaintext highlighter-rouge">"user@gmail.com"</code> with your username and email of course.</li>
</ul>

<p><strong>git pull</strong> - Download changes/commits from the remote repository to the local repository.</p>

<ul>
  <li>To pull without needing to log in every time, enter the following on the terminal: <code class="language-plaintext highlighter-rouge">git config --global user.name "user"</code> and <code class="language-plaintext highlighter-rouge">git config --global user.email "user@gmail.com"</code>. Replace the <code class="language-plaintext highlighter-rouge">"user"</code> and <code class="language-plaintext highlighter-rouge">"user@gmail.com"</code> with your username and email of course.</li>
</ul>

<p><strong>git reset</strong> - Discard local changes.</p>

<ul>
  <li>Use <code class="language-plaintext highlighter-rouge">git reset --hard HEAD</code> to discard all local changes in your working directory.</li>
  <li>Use <code class="language-plaintext highlighter-rouge">git reset --hard</code> to reset your HEAD pointer to a previous commit and discard all the changes since then, e.g. <code class="language-plaintext highlighter-rouge">git reset --hard d53fea1</code> where <code class="language-plaintext highlighter-rouge">d53fea1</code> is the commit hash.</li>
  <li>To discard local changes in a specific file, use <code class="language-plaintext highlighter-rouge">git checkout HEAD</code> followed by the file name instead, e.g. <code class="language-plaintext highlighter-rouge">git checkout HEAD index.html</code> where <code class="language-plaintext highlighter-rouge">index.html</code> is the name of the file.</li>
  <li>The <em>HEAD</em> is a pointer that refers to the currently active commit.</li>
</ul>

<h4 id="notes">Notes</h4>

<ul>
  <li>
    <p>Press the <code class="language-plaintext highlighter-rouge">Tab</code> key to auto-complete file and folder names.</p>
  </li>
  <li>
    <p>Try to make every commit message descriptive af. Use present tense if possible, e.g. <code class="language-plaintext highlighter-rouge">git commit -m "Add index.html"</code>.</p>
  </li>
</ul>

<hr />]]></content><author><name></name></author><summary type="html"><![CDATA[Just another terminal and git cheatsheet.]]></summary></entry><entry><title type="html">Language Code Cheatsheet</title><link href="https://kennyalmendral.github.io/language-code-cheatsheet/" rel="alternate" type="text/html" title="Language Code Cheatsheet" /><published>2019-03-05T00:00:00+00:00</published><updated>2019-03-05T00:00:00+00:00</updated><id>https://kennyalmendral.github.io/language-code-cheatsheet</id><content type="html" xml:base="https://kennyalmendral.github.io/language-code-cheatsheet/"><![CDATA[<p>Just another language code reference.</p>

<table>
  <thead>
    <tr>
      <th style="text-align: center">Language</th>
      <th style="text-align: center">Language Code</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: center">Abkhazian</td>
      <td style="text-align: center">ab</td>
    </tr>
    <tr>
      <td style="text-align: center">Afar</td>
      <td style="text-align: center">aa</td>
    </tr>
    <tr>
      <td style="text-align: center">Afrikaans</td>
      <td style="text-align: center">af_ZA</td>
    </tr>
    <tr>
      <td style="text-align: center">Albanian</td>
      <td style="text-align: center">sq_AL</td>
    </tr>
    <tr>
      <td style="text-align: center">Amharic</td>
      <td style="text-align: center">am</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic</td>
      <td style="text-align: center">ar</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Algeria)</td>
      <td style="text-align: center">ar_DZ</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Bahrain)</td>
      <td style="text-align: center">ar_BH</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Egypt)</td>
      <td style="text-align: center">ar_EG</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Iraq)</td>
      <td style="text-align: center">ar_IQ</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Jordan)</td>
      <td style="text-align: center">ar_JO</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Kuwait)</td>
      <td style="text-align: center">ar_KW</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Lebanon)</td>
      <td style="text-align: center">ar_LB</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Libya)</td>
      <td style="text-align: center">ar_LY</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Morocco)</td>
      <td style="text-align: center">ar_MA</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Oman)</td>
      <td style="text-align: center">ar_OM</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Qatar)</td>
      <td style="text-align: center">ar_QA</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Saudi Arabia)</td>
      <td style="text-align: center">ar_SA</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Sudan)</td>
      <td style="text-align: center">ar_SD</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Syria)</td>
      <td style="text-align: center">ar_SY</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Tunisia)</td>
      <td style="text-align: center">ar_TN</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Uae)</td>
      <td style="text-align: center">ar_AE</td>
    </tr>
    <tr>
      <td style="text-align: center">Arabic (Yemen)</td>
      <td style="text-align: center">ar_YE</td>
    </tr>
    <tr>
      <td style="text-align: center">Armenian</td>
      <td style="text-align: center">hy</td>
    </tr>
    <tr>
      <td style="text-align: center">Assamese</td>
      <td style="text-align: center">as</td>
    </tr>
    <tr>
      <td style="text-align: center">Aymara</td>
      <td style="text-align: center">ay</td>
    </tr>
    <tr>
      <td style="text-align: center">Azeri</td>
      <td style="text-align: center">az</td>
    </tr>
    <tr>
      <td style="text-align: center">Azeri (Cyrillic)</td>
      <td style="text-align: center">az</td>
    </tr>
    <tr>
      <td style="text-align: center">Azeri (Latin)</td>
      <td style="text-align: center">az</td>
    </tr>
    <tr>
      <td style="text-align: center">Bashkir</td>
      <td style="text-align: center">ba</td>
    </tr>
    <tr>
      <td style="text-align: center">Basque</td>
      <td style="text-align: center">eu_ES</td>
    </tr>
    <tr>
      <td style="text-align: center">Belarusian</td>
      <td style="text-align: center">be_BY</td>
    </tr>
    <tr>
      <td style="text-align: center">Bengali</td>
      <td style="text-align: center">bn</td>
    </tr>
    <tr>
      <td style="text-align: center">Bhutani</td>
      <td style="text-align: center">dz</td>
    </tr>
    <tr>
      <td style="text-align: center">Bihari</td>
      <td style="text-align: center">bh</td>
    </tr>
    <tr>
      <td style="text-align: center">Bislama</td>
      <td style="text-align: center">bi</td>
    </tr>
    <tr>
      <td style="text-align: center">Breton</td>
      <td style="text-align: center">br</td>
    </tr>
    <tr>
      <td style="text-align: center">Bulgarian</td>
      <td style="text-align: center">bg_BG</td>
    </tr>
    <tr>
      <td style="text-align: center">Burmese</td>
      <td style="text-align: center">my</td>
    </tr>
    <tr>
      <td style="text-align: center">Cambodian</td>
      <td style="text-align: center">km</td>
    </tr>
    <tr>
      <td style="text-align: center">Catalan</td>
      <td style="text-align: center">ca_ES</td>
    </tr>
    <tr>
      <td style="text-align: center">Chinese</td>
      <td style="text-align: center">zh_TW</td>
    </tr>
    <tr>
      <td style="text-align: center">Chinese (Hongkong)</td>
      <td style="text-align: center">zh_HK</td>
    </tr>
    <tr>
      <td style="text-align: center">Chinese (Macau)</td>
      <td style="text-align: center">zh_MO</td>
    </tr>
    <tr>
      <td style="text-align: center">Chinese (Simplified)</td>
      <td style="text-align: center">zh_CN</td>
    </tr>
    <tr>
      <td style="text-align: center">Chinese (Singapore)</td>
      <td style="text-align: center">zh_SG</td>
    </tr>
    <tr>
      <td style="text-align: center">Chinese (Taiwan)</td>
      <td style="text-align: center">zh_TW</td>
    </tr>
    <tr>
      <td style="text-align: center">Chinese (Traditional)</td>
      <td style="text-align: center">zh_TW</td>
    </tr>
    <tr>
      <td style="text-align: center">Corsican</td>
      <td style="text-align: center">co</td>
    </tr>
    <tr>
      <td style="text-align: center">Croatian</td>
      <td style="text-align: center">hr_HR</td>
    </tr>
    <tr>
      <td style="text-align: center">Czech</td>
      <td style="text-align: center">cs_CZ</td>
    </tr>
    <tr>
      <td style="text-align: center">Danish</td>
      <td style="text-align: center">da_DK</td>
    </tr>
    <tr>
      <td style="text-align: center">Dutch</td>
      <td style="text-align: center">nl_NL</td>
    </tr>
    <tr>
      <td style="text-align: center">Dutch (Belgian)</td>
      <td style="text-align: center">nl_BE</td>
    </tr>
    <tr>
      <td style="text-align: center">English</td>
      <td style="text-align: center">en_GB</td>
    </tr>
    <tr>
      <td style="text-align: center">English (Australia)</td>
      <td style="text-align: center">en_AU</td>
    </tr>
    <tr>
      <td style="text-align: center">English (Belize)</td>
      <td style="text-align: center">en_BZ</td>
    </tr>
    <tr>
      <td style="text-align: center">English (Botswana)</td>
      <td style="text-align: center">en_BW</td>
    </tr>
    <tr>
      <td style="text-align: center">English (Canada)</td>
      <td style="text-align: center">en_CA</td>
    </tr>
    <tr>
      <td style="text-align: center">English (Caribbean)</td>
      <td style="text-align: center">en_CB</td>
    </tr>
    <tr>
      <td style="text-align: center">English (Denmark)</td>
      <td style="text-align: center">en_DK</td>
    </tr>
    <tr>
      <td style="text-align: center">English (Eire)</td>
      <td style="text-align: center">en_IE</td>
    </tr>
    <tr>
      <td style="text-align: center">English (Jamaica)</td>
      <td style="text-align: center">en_JM</td>
    </tr>
    <tr>
      <td style="text-align: center">English (New Zealand)</td>
      <td style="text-align: center">en_NZ</td>
    </tr>
    <tr>
      <td style="text-align: center">English (Philippines)</td>
      <td style="text-align: center">en_PH</td>
    </tr>
    <tr>
      <td style="text-align: center">English (South Africa)</td>
      <td style="text-align: center">en_ZA</td>
    </tr>
    <tr>
      <td style="text-align: center">English (Trinidad)</td>
      <td style="text-align: center">en_TT</td>
    </tr>
    <tr>
      <td style="text-align: center">English (U.K.)</td>
      <td style="text-align: center">en_GB</td>
    </tr>
    <tr>
      <td style="text-align: center">English (U.S.)</td>
      <td style="text-align: center">en_US</td>
    </tr>
    <tr>
      <td style="text-align: center">English (Zimbabwe)</td>
      <td style="text-align: center">en_ZW</td>
    </tr>
    <tr>
      <td style="text-align: center">Esperanto</td>
      <td style="text-align: center">eo</td>
    </tr>
    <tr>
      <td style="text-align: center">Estonian</td>
      <td style="text-align: center">et_EE</td>
    </tr>
    <tr>
      <td style="text-align: center">Faeroese</td>
      <td style="text-align: center">fo_FO</td>
    </tr>
    <tr>
      <td style="text-align: center">Farsi</td>
      <td style="text-align: center">fa_IR</td>
    </tr>
    <tr>
      <td style="text-align: center">Fiji</td>
      <td style="text-align: center">fj</td>
    </tr>
    <tr>
      <td style="text-align: center">Finnish</td>
      <td style="text-align: center">fi_FI</td>
    </tr>
    <tr>
      <td style="text-align: center">French</td>
      <td style="text-align: center">fr_FR</td>
    </tr>
    <tr>
      <td style="text-align: center">French (Belgian)</td>
      <td style="text-align: center">fr_BE</td>
    </tr>
    <tr>
      <td style="text-align: center">French (Canadian)</td>
      <td style="text-align: center">fr_CA</td>
    </tr>
    <tr>
      <td style="text-align: center">French (Luxembourg)</td>
      <td style="text-align: center">fr_LU</td>
    </tr>
    <tr>
      <td style="text-align: center">French (Monaco)</td>
      <td style="text-align: center">fr_MC</td>
    </tr>
    <tr>
      <td style="text-align: center">French (Swiss)</td>
      <td style="text-align: center">fr_CH</td>
    </tr>
    <tr>
      <td style="text-align: center">Frisian</td>
      <td style="text-align: center">fy</td>
    </tr>
    <tr>
      <td style="text-align: center">Galician</td>
      <td style="text-align: center">gl_ES</td>
    </tr>
    <tr>
      <td style="text-align: center">Georgian</td>
      <td style="text-align: center">ka_GE</td>
    </tr>
    <tr>
      <td style="text-align: center">German</td>
      <td style="text-align: center">de_DE</td>
    </tr>
    <tr>
      <td style="text-align: center">German (Austrian)</td>
      <td style="text-align: center">de_AT</td>
    </tr>
    <tr>
      <td style="text-align: center">German (Belgium)</td>
      <td style="text-align: center">de_BE</td>
    </tr>
    <tr>
      <td style="text-align: center">German (Liechtenstein)</td>
      <td style="text-align: center">de_LI</td>
    </tr>
    <tr>
      <td style="text-align: center">German (Luxembourg)</td>
      <td style="text-align: center">de_LU</td>
    </tr>
    <tr>
      <td style="text-align: center">German (Swiss)</td>
      <td style="text-align: center">de_CH</td>
    </tr>
    <tr>
      <td style="text-align: center">Greek</td>
      <td style="text-align: center">el_GR</td>
    </tr>
    <tr>
      <td style="text-align: center">Greenlandic</td>
      <td style="text-align: center">kl_GL</td>
    </tr>
    <tr>
      <td style="text-align: center">Guarani</td>
      <td style="text-align: center">gn</td>
    </tr>
    <tr>
      <td style="text-align: center">Gujarati</td>
      <td style="text-align: center">gu</td>
    </tr>
    <tr>
      <td style="text-align: center">Hausa</td>
      <td style="text-align: center">ha</td>
    </tr>
    <tr>
      <td style="text-align: center">Hebrew</td>
      <td style="text-align: center">he_IL</td>
    </tr>
    <tr>
      <td style="text-align: center">Hindi</td>
      <td style="text-align: center">hi_IN</td>
    </tr>
    <tr>
      <td style="text-align: center">Hungarian</td>
      <td style="text-align: center">hu_HU</td>
    </tr>
    <tr>
      <td style="text-align: center">Icelandic</td>
      <td style="text-align: center">is_IS</td>
    </tr>
    <tr>
      <td style="text-align: center">Indonesian</td>
      <td style="text-align: center">id_ID</td>
    </tr>
    <tr>
      <td style="text-align: center">Interlingua</td>
      <td style="text-align: center">ia</td>
    </tr>
    <tr>
      <td style="text-align: center">Interlingue</td>
      <td style="text-align: center">ie</td>
    </tr>
    <tr>
      <td style="text-align: center">Inuktitut</td>
      <td style="text-align: center">iu</td>
    </tr>
    <tr>
      <td style="text-align: center">Inupiak</td>
      <td style="text-align: center">ik</td>
    </tr>
    <tr>
      <td style="text-align: center">Irish</td>
      <td style="text-align: center">ga_IE</td>
    </tr>
    <tr>
      <td style="text-align: center">Italian</td>
      <td style="text-align: center">it_IT</td>
    </tr>
    <tr>
      <td style="text-align: center">Italian (Swiss)</td>
      <td style="text-align: center">it_CH</td>
    </tr>
    <tr>
      <td style="text-align: center">Japanese</td>
      <td style="text-align: center">ja_JP</td>
    </tr>
    <tr>
      <td style="text-align: center">Javanese</td>
      <td style="text-align: center">jw</td>
    </tr>
    <tr>
      <td style="text-align: center">Kannada</td>
      <td style="text-align: center">kn</td>
    </tr>
    <tr>
      <td style="text-align: center">Kashmiri</td>
      <td style="text-align: center">ks</td>
    </tr>
    <tr>
      <td style="text-align: center">Kashmiri (India)</td>
      <td style="text-align: center">ks_IN</td>
    </tr>
    <tr>
      <td style="text-align: center">Kazakh</td>
      <td style="text-align: center">kk</td>
    </tr>
    <tr>
      <td style="text-align: center">Kernewek</td>
      <td style="text-align: center">kw_GB</td>
    </tr>
    <tr>
      <td style="text-align: center">Kinyarwanda</td>
      <td style="text-align: center">rw</td>
    </tr>
    <tr>
      <td style="text-align: center">Kirghiz</td>
      <td style="text-align: center">ky</td>
    </tr>
    <tr>
      <td style="text-align: center">Kirundi</td>
      <td style="text-align: center">rn</td>
    </tr>
    <tr>
      <td style="text-align: center">Korean</td>
      <td style="text-align: center">ko_KR</td>
    </tr>
    <tr>
      <td style="text-align: center">Kurdish</td>
      <td style="text-align: center">ku_TR</td>
    </tr>
    <tr>
      <td style="text-align: center">Laothian</td>
      <td style="text-align: center">lo</td>
    </tr>
    <tr>
      <td style="text-align: center">Latin</td>
      <td style="text-align: center">la</td>
    </tr>
    <tr>
      <td style="text-align: center">Latvian</td>
      <td style="text-align: center">lv_LV</td>
    </tr>
    <tr>
      <td style="text-align: center">Lingala</td>
      <td style="text-align: center">ln</td>
    </tr>
    <tr>
      <td style="text-align: center">Lithuanian</td>
      <td style="text-align: center">lt_LT</td>
    </tr>
    <tr>
      <td style="text-align: center">Macedonian</td>
      <td style="text-align: center">mk_MK</td>
    </tr>
    <tr>
      <td style="text-align: center">Malagasy</td>
      <td style="text-align: center">mg</td>
    </tr>
    <tr>
      <td style="text-align: center">Malay</td>
      <td style="text-align: center">ms_MY</td>
    </tr>
    <tr>
      <td style="text-align: center">Malayalam</td>
      <td style="text-align: center">ml</td>
    </tr>
    <tr>
      <td style="text-align: center">Malay (Brunei Darussalam)</td>
      <td style="text-align: center">ms_BN</td>
    </tr>
    <tr>
      <td style="text-align: center">Malay (Malaysia)</td>
      <td style="text-align: center">ms_MY</td>
    </tr>
    <tr>
      <td style="text-align: center">Maltese</td>
      <td style="text-align: center">mt_MT</td>
    </tr>
    <tr>
      <td style="text-align: center">Maori</td>
      <td style="text-align: center">mi</td>
    </tr>
    <tr>
      <td style="text-align: center">Marathi</td>
      <td style="text-align: center">mr_IN</td>
    </tr>
    <tr>
      <td style="text-align: center">Moldavian</td>
      <td style="text-align: center">mo</td>
    </tr>
    <tr>
      <td style="text-align: center">Mongolian</td>
      <td style="text-align: center">mn</td>
    </tr>
    <tr>
      <td style="text-align: center">Nauru</td>
      <td style="text-align: center">na</td>
    </tr>
    <tr>
      <td style="text-align: center">Nepali</td>
      <td style="text-align: center">ne_NP</td>
    </tr>
    <tr>
      <td style="text-align: center">Nepali (India)</td>
      <td style="text-align: center">ne_IN</td>
    </tr>
    <tr>
      <td style="text-align: center">Norwegian (Bokmal)</td>
      <td style="text-align: center">nb_NO</td>
    </tr>
    <tr>
      <td style="text-align: center">Norwegian (Nynorsk)</td>
      <td style="text-align: center">nn_NO</td>
    </tr>
    <tr>
      <td style="text-align: center">Occitan</td>
      <td style="text-align: center">oc</td>
    </tr>
    <tr>
      <td style="text-align: center">Oriya</td>
      <td style="text-align: center">or</td>
    </tr>
    <tr>
      <td style="text-align: center">(Afan) Oromo</td>
      <td style="text-align: center">om</td>
    </tr>
    <tr>
      <td style="text-align: center">Pashto, Pushto</td>
      <td style="text-align: center">ps</td>
    </tr>
    <tr>
      <td style="text-align: center">Polish</td>
      <td style="text-align: center">pl_PL</td>
    </tr>
    <tr>
      <td style="text-align: center">Portuguese</td>
      <td style="text-align: center">pt_PT</td>
    </tr>
    <tr>
      <td style="text-align: center">Portuguese (Brazilian)</td>
      <td style="text-align: center">pt_BR</td>
    </tr>
    <tr>
      <td style="text-align: center">Punjabi</td>
      <td style="text-align: center">pa</td>
    </tr>
    <tr>
      <td style="text-align: center">Quechua</td>
      <td style="text-align: center">qu</td>
    </tr>
    <tr>
      <td style="text-align: center">Rhaeto-Romance</td>
      <td style="text-align: center">rm</td>
    </tr>
    <tr>
      <td style="text-align: center">Romanian</td>
      <td style="text-align: center">ro_RO</td>
    </tr>
    <tr>
      <td style="text-align: center">Russian</td>
      <td style="text-align: center">ru_RU</td>
    </tr>
    <tr>
      <td style="text-align: center">Russian (Ukraine)</td>
      <td style="text-align: center">ru_UA</td>
    </tr>
    <tr>
      <td style="text-align: center">Northern Sami</td>
      <td style="text-align: center">se_NO</td>
    </tr>
    <tr>
      <td style="text-align: center">Samoan</td>
      <td style="text-align: center">sm</td>
    </tr>
    <tr>
      <td style="text-align: center">Sangho</td>
      <td style="text-align: center">sg</td>
    </tr>
    <tr>
      <td style="text-align: center">Sanskrit</td>
      <td style="text-align: center">sa</td>
    </tr>
    <tr>
      <td style="text-align: center">Scots Gaelic</td>
      <td style="text-align: center">gd</td>
    </tr>
    <tr>
      <td style="text-align: center">Serbian</td>
      <td style="text-align: center">sr_SR</td>
    </tr>
    <tr>
      <td style="text-align: center">Serbian (Cyrillic)</td>
      <td style="text-align: center">sr_SR</td>
    </tr>
    <tr>
      <td style="text-align: center">Serbian (Latin)</td>
      <td style="text-align: center">sr_SR@latin</td>
    </tr>
    <tr>
      <td style="text-align: center">Serbo-Croatian</td>
      <td style="text-align: center">sh</td>
    </tr>
    <tr>
      <td style="text-align: center">Sesotho</td>
      <td style="text-align: center">st</td>
    </tr>
    <tr>
      <td style="text-align: center">Setswana</td>
      <td style="text-align: center">tn</td>
    </tr>
    <tr>
      <td style="text-align: center">Shona</td>
      <td style="text-align: center">sn</td>
    </tr>
    <tr>
      <td style="text-align: center">Sindhi</td>
      <td style="text-align: center">sd</td>
    </tr>
    <tr>
      <td style="text-align: center">Sinhalese</td>
      <td style="text-align: center">si</td>
    </tr>
    <tr>
      <td style="text-align: center">Siswati</td>
      <td style="text-align: center">ss</td>
    </tr>
    <tr>
      <td style="text-align: center">Slovak</td>
      <td style="text-align: center">sk_SK</td>
    </tr>
    <tr>
      <td style="text-align: center">Slovenian</td>
      <td style="text-align: center">sl_SI</td>
    </tr>
    <tr>
      <td style="text-align: center">Somali</td>
      <td style="text-align: center">so</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish</td>
      <td style="text-align: center">es_ES</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Argentina)</td>
      <td style="text-align: center">es_AR</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Bolivia)</td>
      <td style="text-align: center">es_BO</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Chile)</td>
      <td style="text-align: center">es_CL</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Colombia)</td>
      <td style="text-align: center">es_CO</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Costa Rica)</td>
      <td style="text-align: center">es_CR</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Dominican republic)</td>
      <td style="text-align: center">es_DO</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Ecuador)</td>
      <td style="text-align: center">es_EC</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (El Salvador)</td>
      <td style="text-align: center">es_SV</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Guatemala)</td>
      <td style="text-align: center">es_GT</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Honduras)</td>
      <td style="text-align: center">es_HN</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Mexican)</td>
      <td style="text-align: center">es_MX</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Modern)</td>
      <td style="text-align: center">es_ES</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Nicaragua)</td>
      <td style="text-align: center">es_NI</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Panama)</td>
      <td style="text-align: center">es_PA</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Paraguay)</td>
      <td style="text-align: center">es_PY</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Peru)</td>
      <td style="text-align: center">es_PE</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Puerto Rico)</td>
      <td style="text-align: center">es_PR</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Uruguay)</td>
      <td style="text-align: center">es_UY</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (U.S.)</td>
      <td style="text-align: center">es_US</td>
    </tr>
    <tr>
      <td style="text-align: center">Spanish (Venezuela)</td>
      <td style="text-align: center">es_VE</td>
    </tr>
    <tr>
      <td style="text-align: center">Sundanese</td>
      <td style="text-align: center">su</td>
    </tr>
    <tr>
      <td style="text-align: center">Swahili</td>
      <td style="text-align: center">sw_KE</td>
    </tr>
    <tr>
      <td style="text-align: center">Swedish</td>
      <td style="text-align: center">sv_SE</td>
    </tr>
    <tr>
      <td style="text-align: center">Swedish (Finland)</td>
      <td style="text-align: center">sv_FI</td>
    </tr>
    <tr>
      <td style="text-align: center">Tagalog</td>
      <td style="text-align: center">tl_PH</td>
    </tr>
    <tr>
      <td style="text-align: center">Tajik</td>
      <td style="text-align: center">tg</td>
    </tr>
    <tr>
      <td style="text-align: center">Tamil</td>
      <td style="text-align: center">ta</td>
    </tr>
    <tr>
      <td style="text-align: center">Tatar</td>
      <td style="text-align: center">tt</td>
    </tr>
    <tr>
      <td style="text-align: center">Telugu</td>
      <td style="text-align: center">te</td>
    </tr>
    <tr>
      <td style="text-align: center">Thai</td>
      <td style="text-align: center">th_TH</td>
    </tr>
    <tr>
      <td style="text-align: center">Tibetan</td>
      <td style="text-align: center">bo</td>
    </tr>
    <tr>
      <td style="text-align: center">Tigrinya</td>
      <td style="text-align: center">ti</td>
    </tr>
    <tr>
      <td style="text-align: center">Tonga</td>
      <td style="text-align: center">to</td>
    </tr>
    <tr>
      <td style="text-align: center">Tsonga</td>
      <td style="text-align: center">ts</td>
    </tr>
    <tr>
      <td style="text-align: center">Turkish</td>
      <td style="text-align: center">tr_TR</td>
    </tr>
    <tr>
      <td style="text-align: center">Turkmen</td>
      <td style="text-align: center">tk</td>
    </tr>
    <tr>
      <td style="text-align: center">Twi</td>
      <td style="text-align: center">tw</td>
    </tr>
    <tr>
      <td style="text-align: center">Uighur</td>
      <td style="text-align: center">ug</td>
    </tr>
    <tr>
      <td style="text-align: center">Ukrainian</td>
      <td style="text-align: center">uk_UA</td>
    </tr>
    <tr>
      <td style="text-align: center">Urdu</td>
      <td style="text-align: center">ur</td>
    </tr>
    <tr>
      <td style="text-align: center">Urdu (India)</td>
      <td style="text-align: center">ur_IN</td>
    </tr>
    <tr>
      <td style="text-align: center">Urdu (Pakistan)</td>
      <td style="text-align: center">ur_PK</td>
    </tr>
    <tr>
      <td style="text-align: center">Uzbek</td>
      <td style="text-align: center">uz</td>
    </tr>
    <tr>
      <td style="text-align: center">Uzbek (Cyrillic)</td>
      <td style="text-align: center">uz</td>
    </tr>
    <tr>
      <td style="text-align: center">Uzbek (Latin)</td>
      <td style="text-align: center">uz</td>
    </tr>
    <tr>
      <td style="text-align: center">Valencian</td>
      <td style="text-align: center">ca_ES@valencia</td>
    </tr>
    <tr>
      <td style="text-align: center">Vietnamese</td>
      <td style="text-align: center">vi_VN</td>
    </tr>
    <tr>
      <td style="text-align: center">Volapuk</td>
      <td style="text-align: center">vo</td>
    </tr>
    <tr>
      <td style="text-align: center">Welsh</td>
      <td style="text-align: center">cy</td>
    </tr>
    <tr>
      <td style="text-align: center">Wolof</td>
      <td style="text-align: center">wo</td>
    </tr>
    <tr>
      <td style="text-align: center">Xhosa</td>
      <td style="text-align: center">xh</td>
    </tr>
    <tr>
      <td style="text-align: center">Yiddish</td>
      <td style="text-align: center">yi</td>
    </tr>
    <tr>
      <td style="text-align: center">Yoruba</td>
      <td style="text-align: center">yo</td>
    </tr>
    <tr>
      <td style="text-align: center">Zhuang</td>
      <td style="text-align: center">za</td>
    </tr>
    <tr>
      <td style="text-align: center">Zulu</td>
      <td style="text-align: center">zu</td>
    </tr>
  </tbody>
</table>]]></content><author><name></name></author><summary type="html"><![CDATA[Just another language code reference.]]></summary></entry></feed>