<?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:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[HuyNQ's Corner]]></title><description><![CDATA[Thoughts, stories and ideas.]]></description><link>https://huynq.net/</link><image><url>https://huynq.net/favicon.png</url><title>HuyNQ&apos;s Corner</title><link>https://huynq.net/</link></image><generator>Ghost 5.16</generator><lastBuildDate>Wed, 15 Apr 2026 13:07:26 GMT</lastBuildDate><atom:link href="https://huynq.net/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Fix blank Dock widget issue on Pock 0.8.1-5]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>If you are having this issue with latest <em>Pock</em> (0.8.1-5), you can follow instructions in this post to resolve it.</p>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2021/02/pock-dock-blank.png" class="kg-image" alt loading="lazy" width="2000" height="1250" srcset="https://huynq.net/content/images/size/w600/2021/02/pock-dock-blank.png 600w, https://huynq.net/content/images/size/w1000/2021/02/pock-dock-blank.png 1000w, https://huynq.net/content/images/size/w1600/2021/02/pock-dock-blank.png 1600w, https://huynq.net/content/images/size/w2400/2021/02/pock-dock-blank.png 2400w" sizes="(min-width: 720px) 720px"></figure><!--kg-card-begin: markdown--><p><strong>TL;DR:</strong> Downgrade the Dock widget to default version, drag it to Touch Bar and upgrade it to latest.</p>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><h2 id="downgradethedockwidget">Downgrade the Dock widget</h2>
<ul>
<li>Download the default version of</li></ul>]]></description><link>https://huynq.net/fix-dock-widget-blank-on-pock/</link><guid isPermaLink="false">602dcd5005033e087febe704</guid><category><![CDATA[macos]]></category><category><![CDATA[tips]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Thu, 18 Feb 2021 03:08:26 GMT</pubDate><media:content url="https://huynq.net/content/images/2021/05/web-icon-white.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://huynq.net/content/images/2021/05/web-icon-white.png" alt="Fix blank Dock widget issue on Pock 0.8.1-5"><p>If you are having this issue with latest <em>Pock</em> (0.8.1-5), you can follow instructions in this post to resolve it.</p>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2021/02/pock-dock-blank.png" class="kg-image" alt="Fix blank Dock widget issue on Pock 0.8.1-5" loading="lazy" width="2000" height="1250" srcset="https://huynq.net/content/images/size/w600/2021/02/pock-dock-blank.png 600w, https://huynq.net/content/images/size/w1000/2021/02/pock-dock-blank.png 1000w, https://huynq.net/content/images/size/w1600/2021/02/pock-dock-blank.png 1600w, https://huynq.net/content/images/size/w2400/2021/02/pock-dock-blank.png 2400w" sizes="(min-width: 720px) 720px"></figure><!--kg-card-begin: markdown--><p><strong>TL;DR:</strong> Downgrade the Dock widget to default version, drag it to Touch Bar and upgrade it to latest.</p>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><h2 id="downgradethedockwidget">Downgrade the Dock widget</h2>
<ul>
<li>Download the default version of Dock widget <a href="https://pock.dev/widgets/defaults/Dock.pock.zip">here</a>.</li>
<li>Unzip &amp; Drag it to <em>Install Widget</em> popup from <em>Pock</em>.</li>
</ul>
<p><img src="https://huynq.net/content/images/2021/02/Screen-Shot-2021-02-18-at-09.33.49.png" alt="Fix blank Dock widget issue on Pock 0.8.1-5" loading="lazy"></p>
<h2 id="dragthedockwidgettotouchbar">Drag the Dock widget to Touch Bar</h2>
<p><img src="https://huynq.net/content/images/2021/02/Screen-Shot-2021-02-18-at-09.35.29.png" alt="Fix blank Dock widget issue on Pock 0.8.1-5" loading="lazy"></p>
<h2 id="upgradethedockwidgettolatest">Upgrade the Dock widget to latest</h2>
<p><img src="https://huynq.net/content/images/2021/02/Screen-Shot-2021-02-18-at-09.54.13.png" alt="Fix blank Dock widget issue on Pock 0.8.1-5" loading="lazy"></p>
<p>Get <strong><a href="https://github.com/pock/pock">Pock</a></strong></p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[My neovim's configs]]></title><description><![CDATA[<p>For macOS only</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://gist.github.com/hnq90/fa44f6ab81a39933bfe1b3572a33b74e"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Neovim&#x2019;s Config</div><div class="kg-bookmark-description">Neovim&#x2019;s Config. GitHub Gist: instantly share code, notes, and snippets.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.githubassets.com/favicons/favicon.svg"><span class="kg-bookmark-author">Gist</span><span class="kg-bookmark-publisher">262588213843476</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://github.githubassets.com/images/modules/gists/gist-og-image.png"></div></a></figure><!--kg-card-begin: html--><script src="https://gist.github.com/hnq90/fa44f6ab81a39933bfe1b3572a33b74e.js"></script><!--kg-card-end: html-->]]></description><link>https://huynq.net/my-neovims-configs/</link><guid isPermaLink="false">602a960255844933251088f8</guid><category><![CDATA[vim]]></category><category><![CDATA[neovim]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Mon, 15 Feb 2021 15:48:21 GMT</pubDate><media:content url="https://huynq.net/content/images/2021/02/neovim-logo.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://huynq.net/content/images/2021/02/neovim-logo.jpg" alt="My neovim&apos;s configs"><p>For macOS only</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://gist.github.com/hnq90/fa44f6ab81a39933bfe1b3572a33b74e"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Neovim&#x2019;s Config</div><div class="kg-bookmark-description">Neovim&#x2019;s Config. GitHub Gist: instantly share code, notes, and snippets.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.githubassets.com/favicons/favicon.svg" alt="My neovim&apos;s configs"><span class="kg-bookmark-author">Gist</span><span class="kg-bookmark-publisher">262588213843476</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://github.githubassets.com/images/modules/gists/gist-og-image.png" alt="My neovim&apos;s configs"></div></a></figure><!--kg-card-begin: html--><script src="https://gist.github.com/hnq90/fa44f6ab81a39933bfe1b3572a33b74e.js"></script><!--kg-card-end: html-->]]></content:encoded></item><item><title><![CDATA[Free Grand Theft Auto V - Premium Edition]]></title><description><![CDATA[<p>EpicGames &#x111;ang cho l&#x1EA5;y free Grand Theft Auto V - Premium Edition (gi&#xE1; g&#x1ED1;c l&#xE0; 24.99$). Anh em n&#xE0;o th&#xED;ch ch&#x1A1;i GTA 5 m&#xE0; ch&#x1B0;a c&#xF3; &#x111;i&#x1EC1;u ki&#x1EC7;</p>]]></description><link>https://huynq.net/free-gta-5/</link><guid isPermaLink="false">5ebe4299c898a46b9b202f52</guid><category><![CDATA[game]]></category><category><![CDATA[free]]></category><category><![CDATA[fun]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Fri, 15 May 2020 07:26:14 GMT</pubDate><media:content url="https://huynq.net/content/images/2020/05/Screen-Shot-2020-05-15-at-2.19.01-PM.png" medium="image"/><content:encoded><![CDATA[<img src="https://huynq.net/content/images/2020/05/Screen-Shot-2020-05-15-at-2.19.01-PM.png" alt="Free Grand Theft Auto V - Premium Edition"><p>EpicGames &#x111;ang cho l&#x1EA5;y free Grand Theft Auto V - Premium Edition (gi&#xE1; g&#x1ED1;c l&#xE0; 24.99$). Anh em n&#xE0;o th&#xED;ch ch&#x1A1;i GTA 5 m&#xE0; ch&#x1B0;a c&#xF3; &#x111;i&#x1EC1;u ki&#x1EC7;n mua th&#xEC; l&#xE0;m theo c&#xE1;c b&#x1B0;&#x1EDB;c d&#x1B0;&#x1EDB;i &#x111;&#xE2;y.</p><ul><li>&#x110;&#x103;ng k&#xFD; t&#xE0;i kho&#x1EA3;n <a href="https://www.epicgames.com/store/en-US/">EpicGames Store</a> n&#x1EBF;u ch&#x1B0;a c&#xF3;.</li><li>B&#x1EAD;t b&#x1EA3;o m&#x1EAD;t 2 l&#x1EDB;p (2FA) cho account.</li><li>V&#xE0;o link d&#x1B0;&#x1EDB;i &#x111;&#x1EC3; add game v&#xE0;o account c&#x1EE7;a m&#xEC;nh.</li></ul><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://bit.ly/gta5-free-2020"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Grand Theft Auto V - Grand Theft Auto V: Premium Edition</div><div class="kg-bookmark-description">The Grand Theft Auto V: Premium Edition includes the complete GTAV story, Grand Theft Auto Online and all existing gameplay upgrades and content. You&#x2019;ll also get the Criminal Enterprise Starter Pack, the fastest way to jumpstart your criminal empire in GTA Online.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://static-assets-prod.epicgames.com/epic-store/static/favicon.ico" alt="Free Grand Theft Auto V - Premium Edition"><span class="kg-bookmark-author">Epic Games Store</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://cdn2.unrealengine.com/Diesel%2Fproductv2%2Fgrand-theft-auto-v%2Fhome%2FGTAV_EGS_Artwork_1280x720_V04-1280x720-31e7e0e50fda38709553f5313027ba5b76bd10b6.jpg" alt="Free Grand Theft Auto V - Premium Edition"></div></a></figure><p><strong>Ch&#xFA; &#xFD;: </strong>H&#x1EA1;n cu&#x1ED1;i c&#xF9;ng &#x111;&#x1EC3; l&#x1EA5;y game free l&#xE0; ng&#xE0;y<strong> 21/05</strong>.</p>]]></content:encoded></item><item><title><![CDATA[Ghost 3.0 ra mắt]]></title><description><![CDATA[<p>Nhi&#x1EC1;u thay &#x111;&#x1ED5;i qu&#xE1; :D</p><!--kg-card-begin: markdown--><h3 id="newfeatures">New features</h3>
<ul>
<li><a href="https://ghost.org/members/">Memberships &amp; subscriptions</a></li>
<li><a href="https://wordpress.org/plugins/ghost/">New Wordpress Importer Plugin</a></li>
<li><a href="https://ghost.org/blog/image-galleries/">Support Image Galleries</a></li>
<li><a href="https://ghost.org/blog/bookmark-cards/">Bookmark Card</a></li>
<li><a href="https://demo.ghost.io/">Casper 3.0</a></li>
<li><a href="https://ghost.org/blog/free-ghost-themes/">More free themes + Starter Theme for development</a></li>
<li><a href="https://ghost.org/blog/ghost-admin-updates/">Refreshed Ghost Admin</a></li>
<li><a href="https://github.com/marketplace/actions/deploy-ghost-theme">Continuous Integration with Github Actions</a></li>
</ul>
<p>Read more: <a href="https://ghost.org/3/">Ghost 3</a></p>
<!--kg-card-end: markdown-->]]></description><link>https://huynq.net/ghost-3-0-ra-mat/</link><guid isPermaLink="false">5dafa95da729d8159e96003f</guid><category><![CDATA[ghost]]></category><category><![CDATA[release]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Wed, 23 Oct 2019 01:23:21 GMT</pubDate><media:content url="https://huynq.net/content/images/2019/10/3.0-blog-feature-img.jpeg" medium="image"/><content:encoded><![CDATA[<img src="https://huynq.net/content/images/2019/10/3.0-blog-feature-img.jpeg" alt="Ghost 3.0 ra m&#x1EAF;t"><p>Nhi&#x1EC1;u thay &#x111;&#x1ED5;i qu&#xE1; :D</p><!--kg-card-begin: markdown--><h3 id="newfeatures">New features</h3>
<ul>
<li><a href="https://ghost.org/members/">Memberships &amp; subscriptions</a></li>
<li><a href="https://wordpress.org/plugins/ghost/">New Wordpress Importer Plugin</a></li>
<li><a href="https://ghost.org/blog/image-galleries/">Support Image Galleries</a></li>
<li><a href="https://ghost.org/blog/bookmark-cards/">Bookmark Card</a></li>
<li><a href="https://demo.ghost.io/">Casper 3.0</a></li>
<li><a href="https://ghost.org/blog/free-ghost-themes/">More free themes + Starter Theme for development</a></li>
<li><a href="https://ghost.org/blog/ghost-admin-updates/">Refreshed Ghost Admin</a></li>
<li><a href="https://github.com/marketplace/actions/deploy-ghost-theme">Continuous Integration with Github Actions</a></li>
</ul>
<p>Read more: <a href="https://ghost.org/3/">Ghost 3</a></p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Git Bisect]]></title><description><![CDATA[<p>V&#xE0;o m&#x1ED9;t bu&#x1ED5;i s&#xE1;ng &#x111;&#x1EB9;p tr&#x1EDD;i ng&#xE0;y n&#x1ECD;, m&#xEC;nh &#x111;&#x1EBF;n c&#xF4;ng ty v&#xE0;o l&#xFA;c 7h30, nhai t&#x1EA1;m c&#xE1;i b&#xE1;nh</p>]]></description><link>https://huynq.net/git-bisect/</link><guid isPermaLink="false">596983ed8613a77f21c388b0</guid><category><![CDATA[git]]></category><category><![CDATA[fun]]></category><category><![CDATA[linux]]></category><category><![CDATA[tips]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Sat, 09 Feb 2019 17:14:58 GMT</pubDate><media:content url="https://huynq.net/content/images/2019/02/git-bisect.png" medium="image"/><content:encoded><![CDATA[<img src="https://huynq.net/content/images/2019/02/git-bisect.png" alt="Git Bisect"><p>V&#xE0;o m&#x1ED9;t bu&#x1ED5;i s&#xE1;ng &#x111;&#x1EB9;p tr&#x1EDD;i ng&#xE0;y n&#x1ECD;, m&#xEC;nh &#x111;&#x1EBF;n c&#xF4;ng ty v&#xE0;o l&#xFA;c 7h30, nhai t&#x1EA1;m c&#xE1;i b&#xE1;nh m&#xEC; que mua &#x1EDF; tr&#xEA;n &#x111;&#x1B0;&#x1EDD;ng &#x111;i l&#xE0;m, th&#x1EA3;nh th&#x1A1;i pha th&#xEA;m c&#x1ED1;c cafe cho t&#x1EC9;nh h&#x1EB3;n ng&#x1EE7;. Tranh th&#x1EE7; m&#x1EDF; Slack ra check ch&#x1EE3;t th&#x1EA5;y kh&#xE1;ch h&#xE0;ng k&#xEA;u g&#xE0;o t&#x1EEB; h&#x1A1;n 1 ti&#x1EBF;ng tr&#x1B0;&#x1EDB;c, nguy&#xEA;n nh&#xE2;n l&#xE0; end user ph&#xE1;t hi&#x1EC7;n ra 1 l&#x1ED7;i li&#xEA;n quan &#x111;&#x1EBF;n ph&#x1EA7;n &#x111;i&#x1EC1;n th&#xF4;ng tin v&#x1EAD;n chuy&#x1EC3;n trong m&#xE0;n h&#xEC;nh thanh to&#xE1;n. V&#x1EE9;t c&#xE1;i b&#xE1;nh m&#xEC; g&#x1EB7;m d&#x1EDF; sang 1 b&#xEA;n, m&#xEC;nh v&#xE2;ng v&#xE2;ng d&#x1EA1; d&#x1EA1; v&#x1EDB;i KH r&#x1ED3;i b&#x1EAF;t &#x111;&#x1EA7;u m&#x1EDF; server l&#xEA;n t&#xE1;i hi&#x1EC7;n l&#x1EA1;i th&#xEC; th&#x1EA5;y c&#xF3; bug &#x111;&#xF3; th&#x1EAD;t.</p><p>Trong b&#x1EE5;ng l&#xFA;c &#x111;&#xF3; ngh&#x129;: &quot;L&#x1EA1; v&#xE3;i, ch&#x1EE9;c n&#x103;ng n&#xE0;y m&#xEC;nh l&#xE0;m c&#x169;ng g&#x1EA7;n n&#x1EED;a n&#x103;m r&#x1ED3;i, l&#xFA;c &#x111;&#xF3; c&#x1EA3; KH c&#x169;ng test xong r&#x1ED3;i m&#x1EDB;i delivery m&#xE0; gi&#x1EDD; l&#x1EA1;i &#x111;&#x1EBB; ra bug :-s&quot;. V&#x1EAD;y ch&#x1EC9; c&#xF3; th&#x1EC3; l&#xE0; c&#xF3; &#xF4;ng n&#xE0;o &#x111;&#xF3; s&#x1EED;a m&#x1EA5;t h&#xE0;m d&#xF9;ng chung r&#x1ED3;i kh&#xF4;ng test k&#x129; l&#x1EA1;i r&#x1ED3;i. D&#x1EF1; &#xE1;n n&#xE0;y m&#xEC;nh l&#xE0;m v&#x1EDB;i kho&#x1EA3;ng h&#x1A1;n 10 ng&#x1B0;&#x1EDD;i n&#x1EEF;a n&#xEA;n ch&#x1EAF;c &#x111;i&#x1EC1;u &#x111;&#xF3; l&#xE0; &#x111;i&#x1EC1;u kh&#xF4;ng th&#x1EC3; tr&#xE1;nh kh&#x1ECF;i. T&#xF3;m l&#x1EA1;i l&#xE0; ph&#x1EA3;i t&#xEC;m ra v&#xE0; fix c&#xE0;ng nhanh c&#xE0;ng t&#x1ED1;t sau &#x111;&#xF3; release hotfix &#x111;&#x1EC3; tr&#xE1;nh &#x1EA3;nh h&#x1B0;&#x1EDF;ng &#x111;&#x1EBF;n end user.</p><p>M&#x1EDF; <em>gitk</em> ra xem t&#x1EEB; l&#x1EA7;n release ch&#x1EE9;c n&#x103;ng c&#x1EE7;a m&#xEC;nh c&#xF3; ai s&#x1EED;a file g&#xEC; li&#xEA;n quan kh&#xF4;ng th&#xEC; th&#x1EA5;y g&#x1EA7;n 200 commit li&#xEA;n quan &#x1F633; WTF. Gi&#x1EDD; m&#xE0; ng&#x1ED3;i d&#xF2; t&#x1EEB;ng commit ki&#x1EC3;u checkout r&#x1ED3;i t&#xE1;i hi&#x1EC7;n l&#x1EA1;i c&#x169;ng h&#x1EBF;t c&#x1EA3; h&#x1A1;i &#x1F976;</p><p>Th&#x1EED; checkout v&#xE0;i commit g&#x1EA7;n &#x111;&#xE2;y nh&#x1EA5;t &#x111;&#x1EC3; check th&#xEC; th&#x1EA5;y bug &#x111;&#xE3; c&#xF3; r&#x1ED3;i, c&#xF3; ngh&#x129;a l&#xE0; c&#x1EA7;n ph&#x1EA3;i check th&#xEA;m nh&#x1EEF;ng commit c&#x169; h&#x1A1;n n&#x1EEF;a. Ngh&#x129; t&#x1EDB;i vi&#x1EC7;c ng&#x1ED3;i checkout l&#x1EA7;n l&#x1B0;&#x1EE3;t 200 commit &#x111;&#x1EC3; test l&#xE0;m m&#xEC;nh to&#xE1;t m&#x1ED3; h&#xF4;i h&#x1ED9;t, th&#xF4;i th&#xEC; ngh&#x129; th&#x1EED; xem c&#xF3; c&#xE1;ch n&#xE0;o l&#x1B0;&#x1EDD;i &#x111;&#x1B0;&#x1EE3;c kh&#xF4;ng? C&#xE1;i kh&#xF3; l&#xF3; c&#xE1;i kh&#xF4;n, hay l&#xE0; th&#x1EED; &#xE1;p d&#x1EE5;ng t&#xEC;m ki&#x1EBF;m nh&#x1ECB; ph&#xE2;n xem, c&#x1EE9; chia &#x111;&#xF4;i ch&#x1ED7; commit t&#x1EEB; commit kh&#xF4;ng l&#x1ED7;i c&#x1EE7;a m&#xEC;nh &#x111;&#x1EBF;n commit m&#x1EDB;i nh&#x1EA5;t. Sau &#x111;&#xF3; ki&#x1EC3;m tra xem t&#x1EA1;i commit &#x111;&#xF3; c&#xF3; l&#x1ED7;i kh&#xF4;ng, n&#x1EBF;u kh&#xF4;ng c&#xF3; l&#x1ED7;i th&#xEC; m&#xEC;nh t&#xEC;m &#x1EDF; n&#x1EED;a c&#xF2;n l&#x1EA1;i, n&#x1EBF;u c&#xF3; l&#x1ED7;i th&#xEC; ti&#x1EBF;p t&#x1EE5;c chia &#x111;&#xF4;i v&#xE0; t&#xEC;m ti&#x1EBF;p.</p><p>C&#xE1;ch n&#xE0;y c&#xF3; v&#x1EBB; kh&#x1EA3; thi v&#xE0; &#x111;&#x1EE1; t&#x1ED1;n c&#xF4;ng h&#x1A1;n c&#xE1;ch tr&#x1B0;&#x1EDB;c r&#x1ED3;i, nh&#x1B0;ng c&#xF3; 1 c&#xE1;i b&#x1EA5;t ti&#x1EC7;n &#x111;&#xF3; l&#xE0; m&#xEC;nh ph&#x1EA3;i t&#x1EF1; &#x111;&#x1EBF;m v&#xE0; chia b&#x1EB1;ng tay, ng&#x1ED3;i th&#x1EED; l&#xE0;m 1 step th&#xEC; th&#x1EA5;y ng&#x1ED3;i d&#xF2; d&#xF2; r&#x1ED3;i &#x111;&#x1EBF;m t&#x1EEB;ng commit v&#x1EAB;n m&#x1EC7;t qu&#xE1; &#x1F605;Th&#x1EED; Google xem c&#xF3; c&#xE1;ch n&#xE0;o &#x111;&#x1EBF;m v&#xE0; chia commit theo ki&#x1EC3;u binary search v&#x1EDB;i keyword &quot;git binary search&quot; th&#xEC; th&#x1EA5;y k&#x1EBF;t qu&#x1EA3; &#x111;&#x1EA7;u ti&#xEA;n n&#xF3;i v&#x1EC1; <em>git bisect</em>. Click &#x111;&#x1ECD;c th&#x1EED; th&#x1EA5;y m&#x1EEB;ng qu&#xE1;, &#x111;&#xE2;y &#x111;&#xFA;ng l&#xE0; th&#x1EE9; m&#xEC;nh c&#x1EA7;n r&#x1ED3;i.</p><!--kg-card-begin: markdown--><blockquote>
<p>git-bisect - Use binary search to find the commit that introduced a bug</p>
</blockquote>
<p><code>git-bisect</code> l&#xE0; m&#x1ED9;t tool c&#xF3; s&#x1EB5;n trong package Git, n&#xF3; s&#x1EED; d&#x1EE5;ng thu&#x1EAD;t to&#xE1;n t&#xEC;m ki&#x1EBF;m nh&#x1ECB; ph&#xE2;n &#x111;&#x1EC3; t&#xEC;m ra commit &#x111;&#x1EA7;u ti&#xEA;n g&#xE2;y ra bug.</p>
<p>C&#xE1;ch s&#x1EED; d&#x1EE5;ng c&#x169;ng kh&#xE1; &#x111;&#x1A1;n gi&#x1EA3;n nh&#x1B0; sau:</p>
<ul>
<li>Ch&#x1EA1;y tool <code>git-bisect</code>.</li>
<li>B&#xE1;o v&#x1EDB;i <code>git-bisect</code> bi&#x1EBF;t commit n&#xE0;o kh&#xF4;ng bug (good), commit n&#xE0;o c&#xF3; bug (bad).</li>
<li><code>git-bisect</code> s&#x1EBD; ch&#x1EA1;y t&#x1EEB;ng b&#x1B0;&#x1EDB;c v&#xE0; checkout 1 commit, m&#xEC;nh ch&#x1EC9; vi&#x1EC7;c check l&#x1EA1;i commit &#x111;&#xF3; c&#xF3; bug hay kh&#xF4;ng b&#x1EB1;ng c&#xE1;ch n&#xF3;i v&#x1EDB;i n&#xF3; <code>good</code> ho&#x1EB7;c <code>bad</code>.</li>
<li>Sau khi ch&#x1EA1;y xong c&#xE1;c b&#x1B0;&#x1EDB;c, <code>git-bisect</code> s&#x1EBD; ch&#x1EC9; ra commit &#x111;&#x1EA7;u ti&#xEA;n m&#xE0; g&#xE2;y ra l&#x1ED7;i.</li>
</ul>
<pre><code class="language-sh"># B&#x1EAF;t &#x111;&#x1EA7;u git-bisect
git bisect start

# B&#xE1;o cho git-bisect bi&#x1EBF;t commit kh&#xF4;ng c&#xF3; bug (commit hash: abcdef)
git bisect good abcdef

# B&#xE1;o cho git-bisect bi&#x1EBF;t commit c&#xF3; bug (commit hash: fedcab)
git bisect bad fedcab

# Sau khi git-bisect ch&#x1EA1;y qua m&#x1ED7;i step, check l&#x1EA1;i bug v&#xE0; report
# Report bad n&#x1EBF;u commit hi&#x1EC7;n t&#x1EA1;i c&#xF3; bug
# Report good n&#x1EBF;u commit hi&#x1EC7;n t&#x1EA1;i kh&#xF4;ng bug
git bisect bad
git bisect good

# &#x110;&#x1EBF;n step cu&#x1ED1;i c&#xF9;ng, git-bisect s&#x1EBD; show ra commit &#x111;&#x1EA7;u ti&#xEA;n m&#xE0; g&#xE2;y ra bug.
</code></pre>
<!--kg-card-end: markdown--><p>V&#xEC; vi&#x1EC7;c show commits vi ph&#x1EA1;m an to&#xE0;n th&#xF4;ng tin cho n&#xEA;n m&#xEC;nh s&#x1EBD; kh&#xF4;ng show ra, nh&#x1B0;ng hy v&#x1ECD;ng video d&#x1B0;&#x1EDB;i &#x111;&#xE2;y s&#x1EBD; gi&#x1EA3;i th&#xED;ch &#x111;&#x1B0;&#x1EE3;c c&#x169;ng nh&#x1B0; h&#x1B0;&#x1EDB;ng d&#x1EAB;n c&#xE1;ch s&#x1EED; d&#x1EE5;ng <em>git bisect</em> cho m&#x1ECD;i ng&#x1B0;&#x1EDD;i.</p><figure class="kg-card kg-embed-card"><iframe width="480" height="270" src="https://www.youtube.com/embed/v7VCVjbAArk?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></figure><!--kg-card-begin: markdown--><p>Ngo&#xE0;i c&#xE1;ch s&#x1EED; d&#x1EE5;ng <code>git bisect</code> th&#x1EE7; c&#xF4;ng nh&#x1B0; tr&#xEA;n, m&#xEC;nh c&#xF3; th&#x1EC3; ch&#x1EA1;y <code>git bisect</code> t&#x1EF1; &#x111;&#x1ED9;ng th&#xF4;ng qua <code>git bisect run &lt;command&gt;</code>. L&#xFA;c &#x111;&#xF3;, &#x1EDF; m&#x1ED7;i step, <code>git bisect</code> s&#x1EBD; t&#x1EF1; &#x111;&#x1ED9;ng th&#x1EF1;c thi command m&#xE0; m&#xEC;nh &#x111;&#xE3; set, n&#x1EBF;u command &#x111;&#xF3; c&#xF3; exit code l&#xE0; <strong>0</strong> &#x111;&#x1ED3;ng ngh&#x129;a v&#x1EDB;i <em>good</em>, kh&#xE1;c <strong>0</strong> &#x111;&#x1ED3;ng ngh&#x129;a v&#x1EDB;i <em>bad</em>.</p>
<p>Gi&#x1EA3; s&#x1EED; m&#xEC;nh &#x111;ang c&#xF3; 1 API b&#x1ECB; l&#x1ED7;i, server tr&#x1EA3; v&#x1EC1; response kh&#xF4;ng &#x111;&#xFA;ng, m&#xEC;nh s&#x1EBD; vi&#x1EBF;t m&#x1ED9;t &#x111;o&#x1EA1;n script nh&#x1ECF; trong &#x111;&#xF3; th&#x1EF1;c hi&#x1EC7;n t&#x1EA1;o 1 request &#x111;&#x1EBF;n API &#x111;&#xF3;, n&#x1EBF;u trong response tr&#x1EA3; v&#x1EC1; &#x111;&#xFA;ng nh&#x1B0; &#xFD; mu&#x1ED1;n c&#x1EE7;a m&#xEC;nh th&#xEC; s&#x1EBD; <code>exit 0</code>, c&#xF2;n kh&#xF4;ng th&#xEC; <code>exit 1</code>. V&#xE0; ch&#x1EC9; c&#x1EA7;n nh&#x1B0; th&#x1EBF;, <code>git bisect</code> s&#x1EBD; l&#xE0;m n&#x1ED1;t ph&#x1EA7;n vi&#x1EC7;c c&#xF2;n l&#x1EA1;i cho m&#xEC;nh, m&#xEC;nh c&#xF3; th&#x1EC3; d&#xE0;nh th&#x1EDD;i gian l&#xE0;m vi&#x1EC7;c kh&#xE1;c thay v&#xEC; m&#x1EA5;t c&#xF4;ng ng&#x1ED3;i reproduce bug b&#x1EB1;ng tay.</p>
<pre><code class="language-sh">git bisect start

git bisect good abcdef
git bisect bad defabc

git bisect run python3 request.py
</code></pre>
<!--kg-card-end: markdown--><p>V&#x1EAD;y l&#xE0; sau m&#x1ED9;t h&#x1ED3;i m&#xE0;y m&#xF2; t&#xEC;m hi&#x1EC3;u, c&#x169;ng nh&#x1EDD; b&#x1EA3;n t&#xED;nh l&#x1B0;&#x1EDD;i c&#xF3; s&#x1EB5;n trong ng&#x1B0;&#x1EDD;i m&#xE0; m&#xEC;nh &#x111;&#xE3; ti&#x1EBF;t ki&#x1EC7;m &#x111;&#x1B0;&#x1EE3;c kh&#xE1; nhi&#x1EC1;u th&#x1EDD;i gian ng&#x1ED3;i &#x111;i&#x1EC1;u tra bug, n&#x1EBF;u m&#xE0; c&#x1EE9; l&#xE0;m b&#x1EB1;ng tay ki&#x1EC3;u tr&#xE2;u b&#xF2; ch&#x1EAF;c c&#x169;ng m&#x1EA5;t c&#x1EA3; ng&#xE0;y tr&#x1EDD;i &#x1F633;Sau khi fix &#x111;&#x1B0;&#x1EE3;c bug, KH c&#x169;ng r&#x1EA5;t vui m&#x1EEB;ng v&#xE0; d&#xE0;nh h&#x1EBF;t l&#x1EDD;i khen ng&#x1EE3;i tinh th&#x1EA7;n l&#xE0;m vi&#x1EC7;c c&#x169;ng nh&#x1B0; ch&#x1EA5;t l&#x1B0;&#x1EE3;ng c&#xF4;ng vi&#x1EC7;c c&#x1EE7;a m&#xEC;nh v&#x1EDB;i c&#x1EA5;p tr&#xEA;n c&#x1EE7;a m&#xEC;nh. C&#x169;ng ch&#xED;nh v&#xEC; &#x111;&#xF3; m&#xE0; cu&#x1ED1;i n&#x103;m &#x111;&#xF3; m&#xEC;nh &#x111;&#xE3; &#x111;&#x1B0;&#x1EE3;c c&#xF4;ng ty trao t&#x1EB7;ng 1 c&#xE1;i c&#xFA;p c&#x1EF1;c k&#xEC; &#xFD; ngh&#x129;a v&#x1EDB;i m&#xEC;nh &#x1F92A;</p><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2019/02/20190203_094158.jpg" class="kg-image" alt="Git Bisect" loading="lazy"></figure><p>Hy v&#x1ECD;ng b&#xE0;i vi&#x1EBF;t n&#xE0;y s&#x1EBD; c&#xF3; &#xED;ch v&#x1EDB;i m&#x1ECD;i ng&#x1B0;&#x1EDD;i. C&#xE1;i &#x111;o&#x1EA1;n tr&#xEA;n m&#xEC;nh vi&#x1EBF;t cho vui ch&#x1EE9; kh&#xF4;ng ph&#x1EA3;i th&#x1EAD;t &#x111;&#xE2;u &#x1F62C;&#x1F62C;&#x1F62C;H&#x1EB9;n m&#x1ECD;i ng&#x1B0;&#x1EDD;i &#x1EDF; b&#xE0;i vi&#x1EBF;t kh&#xE1;c nh&#xE9;.</p>]]></content:encoded></item><item><title><![CDATA[Chạy cronjob mỗi N ngày]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>V&#x1EEB;a r&#x1ED3;i m&#xEC;nh c&#xF3; l&#xE0;m <a href="https://github.com/hnq90/GitHubArchive">GitHubArchive</a>, &#x111;&#xE2;y l&#xE0; m&#x1ED9;t project m&#xE3; ngu&#x1ED3;n m&#x1EDF; c&#xF3; ch&#x1EE9;c n&#x103;ng g&#x1EED;i email th&#x1ED1;ng k&#xEA; c&#xE1;</p>]]></description><link>https://huynq.net/chay-cronjob-moi-n-ngay/</link><guid isPermaLink="false">596983ec8613a77f21c388a3</guid><category><![CDATA[shell]]></category><category><![CDATA[cronjob]]></category><category><![CDATA[bash]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Sat, 09 Feb 2019 06:15:00 GMT</pubDate><media:content url="https://huynq.net/content/images/2019/02/crontab.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://huynq.net/content/images/2019/02/crontab.png" alt="Ch&#x1EA1;y cronjob m&#x1ED7;i N ng&#xE0;y"><p>V&#x1EEB;a r&#x1ED3;i m&#xEC;nh c&#xF3; l&#xE0;m <a href="https://github.com/hnq90/GitHubArchive">GitHubArchive</a>, &#x111;&#xE2;y l&#xE0; m&#x1ED9;t project m&#xE3; ngu&#x1ED3;n m&#x1EDF; c&#xF3; ch&#x1EE9;c n&#x103;ng g&#x1EED;i email th&#x1ED1;ng k&#xEA; c&#xE1;c top c&#xE1;c repository c&#x1EE7;a GitHub trong ng&#xE0;y. C&#x1EE5; th&#x1EC3; l&#xE0; top 25 repository <strong>m&#x1EDB;i n&#x1ED5;i</strong> &#x111;&#x1B0;&#x1EE3;c nhi&#x1EC1;u ng&#x1B0;&#x1EDD;i &#x111;&#xE1;nh d&#x1EA5;u (star) nh&#x1EA5;t v&#xE0; top 25 repository &#x111;&#x1B0;&#x1EE3;c nhi&#x1EC1;u ng&#x1B0;&#x1EDD;i &#x111;&#xE1;nh d&#x1EA5;u (star) nh&#x1EA5;t trong ng&#xE0;y.<br>
B&#x1EA1;n c&#xF3; th&#x1EC3; xem qua v&#x1EC1; newsletter n&#xE0;y &#x1EDF; <a href="http://us6.campaign-archive1.com/home/?u=ecbe15df98da933fc8209cf1b&amp;id=3dcf4193be">&#x111;&#xE2;y</a>.</p>
<p>Khi l&#xE0;m xong project n&#xE0;y, m&#xEC;nh ph&#x1EA3;i ch&#x1EA1;y cronjob &#x111;&#x1EC3; l&#x1EA5;y d&#x1EEF; li&#x1EC7;u theo th&#x1EDD;i gian &#x111;&#x1ECB;nh k&#x1EF3; (<a href="http://eepurl.com/bb4EFL">1 ng&#xE0;y</a>/<a href="http://eepurl.com/bc5JV9">3 ng&#xE0;y</a>/<a href="http://eepurl.com/bc5Yn9">7 ng&#xE0;y</a>) v&#xE0;o l&#xFA;c 0h s&#xE1;ng.</p>
<p>C&#x1EA5;u tr&#xFA;c c&#x1EE7;a m&#x1ED9;t cronjob nh&#x1B0; sau:</p>
<table>
  <tr>
    <th>*</th>
    <th>*</th>
    <th>*</th>
    <th>*</th>
    <th>*</th>
    <th>script</th>
  </tr>
  <tr>
    <td>Ph&#xFA;t 0-59</td>
    <td>Gi&#x1EDD; 0-23</td>
    <td>Ng&#xE0;y trong th&#xE1;ng 1-31</td>
    <td>Th&#xE1;ng 1-12</td>
    <td>Th&#x1EE9; trong tu&#x1EA7;n 0-6 (0 = CN)</td>
    <td>script c&#x1EA7;n &#x111;&#x1B0;&#x1EE3;c ch&#x1EA1;y (Vd: echo `whoami`)</td>
  </tr>
</table>
<p>N&#x1EBF;u mu&#x1ED1;n cronjob ch&#x1EA1;y 1 ng&#xE0;y/l&#x1EA7;n l&#xFA;c 00:00 th&#xEC; ch&#x1EC9; c&#x1EA7;n d&#xF9;ng c&#x1EA5;u tr&#xFA;c: <code>0 0 * * * ruby daily.rb</code></p>
<p>Tuy nhi&#xEA;n, &#x111;&#x1EC3; ch&#x1EA1;y 3 ng&#xE0;y/l&#x1EA7;n hay n ng&#xE0;y/l&#x1EA7;n th&#xEC; kh&#xF4;ng &#x111;&#x1A1;n gi&#x1EA3;n ch&#x1EC9; d&#xF9;ng <code>0 0 */3 * *</code>. B&#x1EDF;i v&#xEC; n&#x1EBF;u th&#xE1;ng n&#xE0;o c&#xF3; 31 ng&#xE0;y th&#xEC; cronjob s&#x1EBD; ch&#x1EA1;y li&#xEA;n t&#x1EE5;c 2 ng&#xE0;y li&#xEA;n ti&#x1EBF;p 31 v&#xE0; ng&#xE0;y 1 th&#xE1;ng sau =&gt; <strong>sai</strong>.</p>
<p>B&#x1EA1;n c&#xF3; th&#x1EC3; xem th&#x1ED1;ng k&#xEA; c&#xE1;c l&#x1EA7;n ch&#x1EA1;y &#x1EDF; d&#x1B0;&#x1EDB;i &#x111;&#xE2;y: (M&#xEC;nh l&#x1EA5;y m&#x1ED1;c l&#xE0; ng&#xE0;y 2015-03-25)</p>
<script src="https://gist.github.com/hnq90/d327018fa6fc8154ff3a.js"></script>
<p>ho&#x1EB7;c <a href="http://cron.schlitt.info/index.php?cron=0+0+*%2F3+*+*&amp;iterations=50&amp;test=Test">&#x111;&#xE2;y</a></p>
<p>V&#x1EA5;n &#x111;&#x1EC1; &#x111;&#x1B0;&#x1EE3;c &#x111;&#x1EB7;t ra l&#xE0;: L&#xE0;m th&#x1EBF; n&#xE0;o &#x111;&#x1EC3; cronjob ch&#x1EA1;y &#x111;&#x1B0;&#x1EE3;c ch&#xED;nh x&#xE1;c m&#x1ED7;i <em>N</em> ng&#xE0;y x&#xE1;c &#x111;&#x1ECB;nh n&#xE0;o &#x111;&#xF3;? <em>N</em> &#x1EDF; &#x111;&#xE2;y th&#x1EAD;m ch&#xED; c&#xF3; th&#x1EC3; l&#x1EDB;n h&#x1A1;n 31?</p>
<h3 id="cch1lulilnchycuicngvcheckmikhichy">C&#xE1;ch 1: L&#x1B0;u l&#x1EA1;i l&#x1EA7;n ch&#x1EA1;y cu&#x1ED1;i c&#xF9;ng v&#xE0; check m&#x1ED7;i khi ch&#x1EA1;y.</h3>
<p>C&#xE1;ch n&#xE0;y m&#xEC;nh &#x111;&#xE3; t&#x1EEB;ng d&#xF9;ng &#x1EDF; 1 s&#x1ED1; project &#x111;&#xE3; t&#x1EEB;ng l&#xE0;m, c&#x1EE5; th&#x1EC3; nh&#x1B0; sau:</p>
<ul>
<li>Set cronjob ch&#x1EA1;y script 1 ng&#xE0;y 1 l&#x1EA7;n.</li>
<li>Sau m&#x1ED7;i l&#x1EA7;n script ch&#x1EA1;y, l&#x1B0;u l&#x1EA1;i th&#x1EDD;i gian ch&#x1EA1;y v&#xE0;o DB ho&#x1EB7;c file.</li>
<li>Tr&#x1B0;&#x1EDB;c khi script &#x111;&#x1B0;&#x1EE3;c ch&#x1EA1;y, check kho&#x1EA3;ng th&#x1EDD;i gian t&#x1EEB; l&#x1EA7;n ch&#x1EA1;y cu&#x1ED1;i c&#xF9;ng &#x111;&#x1EBF;n th&#x1EDD;i gian hi&#x1EC7;n t&#x1EA1;i, n&#x1EBF;u s&#x1ED1; ng&#xE0;y c&#xE1;ch nhau b&#x1EB1;ng <em>N</em> th&#xEC; x&#x1EED; l&#xFD; ti&#x1EBF;p, c&#xF2;n kh&#xF4;ng th&#xEC; kh&#xF4;ng x&#x1EED; l&#xFD; n&#x1EEF;a.</li>
</ul>
<pre><code class="language-sh"># crontab -e
0 0 * * * ruby 3days.rb
</code></pre>
<pre><code class="language-python">N = 3 # days
last_execution = read_file(&apos;/data/execution_logs.txt&apos;)
if day_diff(current_date, last_execution) != N:
  return
# Your logic
# Example: Send campaign email
write_file(&apos;/data/execution_logs.txt&apos;)
</code></pre>
<h3 id="cch2tnhtontrctiptunixtime">C&#xE1;ch 2: T&#xED;nh to&#xE1;n tr&#x1EF1;c ti&#x1EBF;p t&#x1EEB; Unix time.</h3>
<p><strong>Note</strong>: C&#xE1;ch n&#xE0;y s&#x1EBD; g&#x1EB7;p v&#x1EA5;n &#x111;&#x1EC1; v&#x1EDB;i DST (Daylight Saving Time) v&#xE0; c&#xE1;c m&#xFA;i gi&#x1EDD; kh&#xE1;c UTC.</p>
<p>V&#x1EDB;i nh&#x1EEF;ng ai ch&#x1B0;a bi&#x1EBF;t Unix time l&#xE0; g&#xEC; th&#xEC; &#x111;&#xE2;y l&#xE0; &#x111;&#x1ECB;nh ngh&#x129;a tr&#xEA;n Wikipedia.</p>
<blockquote>
<p>Th&#x1EDD;i gian Unix (ti&#x1EBF;ng Anh: Unix time, Epoch time hay POSIX time) l&#xE0; h&#x1EC7; th&#x1ED1;ng m&#xF4; t&#x1EA3; m&#x1ED9;t &#x111;i&#x1EC3;m trong th&#x1EDD;i gian. Th&#x1EDD;i gian Unix &#x111;&#x1B0;&#x1EE3;c &#x111;&#x1ECB;nh ngh&#x129;a b&#x1EB1;ng s&#x1ED1; gi&#xE2;y k&#x1EC3; t&#x1EEB; 00:00:00 theo gi&#x1EDD; Ph&#x1ED1;i h&#x1EE3;p Qu&#x1ED1;c t&#x1EBF; (UTC) ng&#xE0;y 1 th&#xE1;ng 1 n&#x103;m 1970, tr&#x1EEB; &#x111;i gi&#xE2;y nhu&#x1EAD;n. M&#x1ED7;i ng&#xE0;y &#x111;&#x1B0;&#x1EE3;c x&#x1EED; l&#xFD; nh&#x1B0; th&#x1EC3; n&#xF3; ch&#x1EE9;a ch&#xED;nh x&#xE1;c 86400 gi&#xE2;y, v&#xEC; v&#x1EAD;y s&#x1ED1; gi&#xE2;y nhu&#x1EAD;n s&#x1EBD; kh&#xF4;ng &#x111;&#x1B0;&#x1EE3;c t&#xED;nh.</p>
</blockquote>
<p>&#x110;&#xE2;y l&#xE0; c&#xE1;ch l&#x1EA5;y ra Unix time cho 1 s&#x1ED1; ng&#xF4;n ng&#x1EEF;, nh&#x1EEF;ng ng&#xF4;n ng&#x1EEF; kh&#xE1;c b&#x1EA1;n c&#xF3; th&#x1EC3; t&#x1EF1; t&#xEC;m hi&#x1EC3;u th&#xEA;m nh&#xE9;.</p>
<pre><code># Python
import time
int(time.time())

# PHP
strtotime(&apos;now&apos;);

# JS
# Do now() v&#xE0; getTime() tr&#x1EA3; v&#x1EC1; millisecond, kh&#xF4;ng ph&#x1EA3;i second n&#xEA;n ph&#x1EA3;i chia cho 1000
Math.floor(Date.now()/1000)
Math.floor(new Date().getTime()/1000)

# MySQL
SELECT UNIX_TIMESTAMP();

# Bash
date +%s
</code></pre>
<p>&#xDD; t&#x1B0;&#x1EDF;ng c&#x1EE7;a c&#xE1;ch n&#xE0;y ch&#xED;nh l&#xE0; chia nh&#xF3;m c&#xE1;c ng&#xE0;y k&#x1EC3; t&#x1EEB; <em>1970-01-01 00:00</em> (the Epoch) cho &#x111;&#x1EBF;n th&#x1EDD;i gian m&#xE0; b&#x1EA1;n ch&#x1ECD;n theo N ng&#xE0;y. C&#x1EE5; th&#x1EC3; l&#xE0; &#x111;&#x1ED5;i ng&#xE0;y sang Unix time &#x111;&#x1EC3; t&#xED;nh ra s&#x1ED1; ng&#xE0;y k&#x1EC3; t&#x1EEB; <em>the Epoch</em> v&#xE0; d&#xF9;ng ph&#xE9;p to&#xE1;n <a href="https://en.wikipedia.org/wiki/Modulo_operation">Modulo</a> (ph&#xE9;p to&#xE1;n chia s&#x1ED1; l&#x1EA5;y s&#x1ED1; d&#x1B0;) &#x111;&#x1EC3; l&#x1EA5;y ra nh&#x1EEF;ng ng&#xE0;y c&#xF3; s&#x1ED1; d&#x1B0; gi&#x1ED1;ng nhau khi chia cho N.</p>
<p>Gi&#x1EA3; s&#x1EED; N c&#x1EE7;a m&#xEC;nh l&#xE0; 3, v&#xE0; m&#x1ED1;c th&#x1EDD;i gian m&#xEC;nh ch&#x1ECD;n l&#xE0; <em>2019-02-19 00:00</em> th&#xEC; m&#xEC;nh s&#x1EBD; chia nh&#xF3;m nh&#x1B0; sau:</p>
<pre><code># https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC

# Group 1
1970-01-01 00:00 =&gt; 0 mod 3 = 0 (Date.UTC(1970,0,1,0,0,0,0) / 1000 / 86400 % 3 === 0)
1970-01-02 00:00 =&gt; 1 mod 3 = 1 (Date.UTC(1970,0,2,0,0,0,0) / 1000 / 86400 % 3 === 1)
1970-01-03 00:00 =&gt; 2 mod 3 = 2 (Date.UTC(1970,0,3,0,0,0,0) / 1000 / 86400 % 3 === 2)


# Group 2:
1970-01-04 00:00 =&gt; 3 mod 3 = 0 (Date.UTC(1970,0,4,0,0,0,0) / 1000 / 86400 % 3 === 0)
1970-01-05 00:00 =&gt; 4 mod 3 = 1 (Date.UTC(1970,0,5,0,0,0,0) / 1000 / 86400 % 3 === 1)
1970-01-06 00:00 =&gt; 5 mod 3 = 2 (Date.UTC(1970,0,6,0,0,0,0) / 1000 / 86400 % 3 === 2)


...


# Group ...:
...
2019-02-18 00:00 =&gt; 17945 mod 3 = 0 (Date.UTC(2019,1,18,0,0,0,0) / 1000 / 86400 % 3 === 2)
2019-02-19 00:00 =&gt; 17946 mod 3 = 0 (Date.UTC(2019,1,19,0,0,0,0) / 1000 / 86400 % 3 === 0)
2019-02-20 00:00 =&gt; 17947 mod 3 = 0 (Date.UTC(2019,1,20,0,0,0,0) / 1000 / 86400 % 3 === 1)
2019-02-21 00:00 =&gt; 17948 mod 3 = 0 (Date.UTC(2019,1,21,0,0,0,0) / 1000 / 86400 % 3 === 2)
2019-02-22 00:00 =&gt; 17949 mod 3 = 0 (Date.UTC(2019,1,22,0,0,0,0) / 1000 / 86400 % 3 === 0)
...
</code></pre>
<p>T&#x1EEB; k&#x1EBF;t qu&#x1EA3; ph&#xED;a tr&#xEA;n, c&#xF3; th&#x1EC3; nh&#x1EAD;n th&#x1EA5;y n&#x1EBF;u ch&#x1ECD;n m&#x1ED1;c l&#xE0; <em>2019-02-19 00:00</em> th&#xEC; &#x111;&#x1EC3; script c&#xF3; th&#x1EC3; ch&#x1EA1;y 3 ng&#xE0;y 1 l&#x1EA7;n li&#xEA;n t&#x1EE5;c m&#xEC;nh ch&#x1EC9; vi&#x1EC7;c cho script ch&#x1EA1;y v&#xE0;o nh&#x1EEF;ng ng&#xE0;y c&#xF3; c&#xF9;ng k&#x1EBF;t qu&#x1EA3; mod 3 b&#x1EB1;ng <strong>0</strong>.</p>
<p>Cu&#x1ED1;i c&#xF9;ng, thay v&#xEC; c&#xE1;ch 1 ph&#x1EA3;i l&#x1B0;u l&#x1EA1;i l&#x1EA7;n ch&#x1EA1;y g&#x1EA7;n nh&#x1EA5;t v&#xE0;o file ho&#x1EB7;c DB r&#x1ED3;i l&#x1EA5;y ra so s&#xE1;nh th&#xEC; ta ch&#x1EC9; c&#x1EA7;n t&#xED;nh to&#xE1;n b&#x1EB1;ng m&#x1ED9;t v&#xE0;i ph&#xE9;p to&#xE1;n &#x111;&#x1A1;n gi&#x1EA3;n nh&#x1B0; tr&#xEA;n th&#xF4;i.</p>
<pre><code class="language-sh"># crontab -e
0 0 * * * ruby 3days.rb
</code></pre>
<pre><code class="language-python">N = 3 # days
NUMBER_SECONDS_A_DAY = 86400
first_execution = &apos;2019-02-19 00:00&apos;
remainder = (unix_time(first_execution) / NUMBER_SECONDS_A_DAY) % N
# Or hard-code remainder for faster calculation
# remainder = 0

if current_unix_time % N !== remainder:
  return
# Your logic
# Example: Send campaign email
</code></pre>
<p>M&#xEC;nh th&#xEC; m&#xEC;nh kh&#xF4;ng th&#xED;ch vi&#x1EBF;t ph&#x1EA7;n &#x111;i&#x1EC1;u ki&#x1EC7;n check tr&#xEA;n trong script cho l&#x1EAF;m n&#xEA;n m&#xEC;nh th&#x1B0;&#x1EDD;ng vi&#x1EBF;t lu&#xF4;n trong file crontab nh&#x1B0; sau:</p>
<pre><code class="language-sh"># crontab -e
0 0 * * * bash -c &apos;(($(date +\%s) / 86400 \% 3 == 0)) &amp;&amp; ruby 3days.rb&apos;
</code></pre>
<!--kg-card-end: markdown--><hr><p>Tr&#xEA;n &#x111;&#xE2;y l&#xE0; 2 c&#xE1;ch m&#xE0; m&#xEC;nh bi&#x1EBF;t &#x111;&#x1EC3; x&#x1EED; l&#xFD; v&#x1EA5;n &#x111;&#x1EC1; ph&#x1ED5; bi&#x1EBF;n v&#x1EDB;i crontab &#x111;&#xF3; l&#xE0; ch&#x1EA1;y cronjob tu&#x1EA7;n t&#x1EF1; theo s&#x1ED1; ng&#xE0;y &#x111;&#x1ECB;nh s&#x1EB5;n. B&#xE0;i n&#xE0;y &#x111;&#x1B0;&#x1EE3;c b&#x1EAF;t &#x111;&#x1EA7;u vi&#x1EBF;t t&#x1EEB; &#x111;&#x1EA7;u n&#x103;m 2015 m&#xE0; gi&#x1EDD; m&#x1EDB;i vi&#x1EBF;t xong th&#x1EBF; n&#xEA;n c&#xE2;u c&#xFA; l&#x1EE7;ng c&#x1EE7;ng hay sai ch&#x1ED7; n&#xE0;o th&#xEC; comment cho m&#xEC;nh bi&#x1EBF;t v&#x1EDB;i nh&#xE9; &#x1F92A;</p><p>Hi&#x1EC7;n t&#x1EA1;i th&#xEC; project GitHubArchive c&#x1EE7;a m&#xEC;nh c&#x169;ng &#x111;&#xE3; d&#x1EEB;ng ho&#x1EA1;t &#x111;&#x1ED9;ng r&#x1ED3;i, n&#x1EBF;u b&#x1EA1;n quan t&#xE2;m t&#x1EDB;i newsletter t&#x1B0;&#x1A1;ng t&#x1EF1; nh&#x1B0; th&#x1EBF; th&#xEC; h&#xE3;y subscribe <a href="http://changelog.com/nightly">ChangelogNightly</a> nh&#xE9; &#x1F601;</p>]]></content:encoded></item><item><title><![CDATA[Free .design domain (Update 2020/04)]]></title><description><![CDATA[Nhận domain .design miễn phí]]></description><link>https://huynq.net/free-design-domain/</link><guid isPermaLink="false">5c4f1a18ea267a36c1c7499a</guid><category><![CDATA[domain]]></category><category><![CDATA[free]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Mon, 28 Jan 2019 15:17:53 GMT</pubDate><media:content url="https://huynq.net/content/images/2019/01/porkbun.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://huynq.net/content/images/2019/01/porkbun.jpg" alt="Free .design domain (Update 2020/04)"><p>Porkbun &#x111;ang li&#xEA;n k&#x1EBF;t v&#x1EDB;i CSSWeekly/SitePoint &#x111;&#x1EC3; t&#x1EB7;ng cho ng&#x1B0;&#x1EDD;i d&#xF9;ng mua domain .design mi&#x1EC5;n ph&#xED; n&#x103;m &#x111;&#x1EA7;u ti&#xEA;n. C&#xF3; v&#x1EBB; nh&#x1B0; ch&#x1B0;&#x1A1;ng tr&#xEC;nh n&#xE0;y di&#x1EC5;n ra th&#x1B0;&#x1EDD;ng ni&#xEA;n th&#xEC; ph&#x1EA3;i v&#xEC; n&#x103;m ngo&#xE1;i m&#xEC;nh c&#x169;ng &#x111;&#xE3; l&#x1EA5;y 1 c&#xE1;i r&#x1ED3;i. Ch&#xFA; &#xFD; l&#xE0; sang n&#x103;m ti&#x1EBF;p theo ph&#xED; s&#x1EBD; l&#xE0; 34.48$ nh&#xE9;.</p><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2019/01/Screen-Shot-2019-01-28-at-10.08.54-PM.png" class="kg-image" alt="Free .design domain (Update 2020/04)" loading="lazy"></figure><p>Ngo&#xE0;i &#x111;&#x1B0;&#x1EE3;c free 1 n&#x103;m domain, PorkBun c&#xF2;n cho th&#xEA;m 1 mailbox c&#xF3; gi&#xE1; tr&#x1ECB; 24$/n&#x103;m &#x111;&#x1EC3; l&#xE0;m email c&#xE1; nh&#xE2;n n&#x1EEF;a. M&#xEC;nh &#x111;ang d&#xF9;ng Google Suite n&#xEA;n c&#x169;ng kh&#xF4;ng c&#x1EA7;n l&#x1EAF;m :D</p><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2019/01/Screen-Shot-2019-01-28-at-10.13.44-PM.png" class="kg-image" alt="Free .design domain (Update 2020/04)" loading="lazy"></figure><p>Cu&#x1ED1;i c&#xF9;ng, link &#x111;&#x103;ng k&#xFD; &#x111;&#xE2;y nh&#xE9;: <a href="http://bit.ly/free_design_domain">http://bit.ly/free_design_domain</a></p><!--kg-card-begin: html--><div class="lottie-file" data-url="https://assets3.lottiefiles.com/packages/lf20_HtnbsG.json"> </div><!--kg-card-end: html--><p><strong>Update 2020/04/28: Ch&#x1B0;&#x1A1;ng tr&#xEC;nh v&#x1EAB;n c&#xF2;n anh em nh&#xE9;.</strong></p>]]></content:encoded></item><item><title><![CDATA[Photo Quote hay - P7]]></title><description><![CDATA[<p>Sau h&#x1A1;n 3 n&#x103;m k&#x1EC3; t&#x1EEB; ng&#xE0;y <a href="https://huynq.net/photo-quote-hay-p6/">ph&#x1EA7;n 6</a> ra m&#x1EAF;t, &#x111;&#x1EBF;n gi&#x1EDD; m&#xEC;nh m&#x1EDB;i c&#xF3; th&#x1EDD;i gian &#x111;&#x1EC3; ti&#x1EBF;p t&#x1EE5;c s&#x1EDF;</p>]]></description><link>https://huynq.net/photo-quote-hay-p7/</link><guid isPermaLink="false">5b894952995b7b2e22caa159</guid><category><![CDATA[music]]></category><category><![CDATA[photo quote]]></category><category><![CDATA[happy]]></category><category><![CDATA[funny]]></category><category><![CDATA[quote]]></category><category><![CDATA[photo]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Fri, 31 Aug 2018 14:25:04 GMT</pubDate><media:content url="https://huynq.net/content/images/2018/08/quote-p7-feature.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://huynq.net/content/images/2018/08/quote-p7-feature.jpg" alt="Photo Quote hay - P7"><p>Sau h&#x1A1;n 3 n&#x103;m k&#x1EC3; t&#x1EEB; ng&#xE0;y <a href="https://huynq.net/photo-quote-hay-p6/">ph&#x1EA7;n 6</a> ra m&#x1EAF;t, &#x111;&#x1EBF;n gi&#x1EDD; m&#xEC;nh m&#x1EDB;i c&#xF3; th&#x1EDD;i gian &#x111;&#x1EC3; ti&#x1EBF;p t&#x1EE5;c s&#x1EDF; th&#xED;ch s&#x1B0;u t&#x1EA7;m quote n&#xE0;y. Ph&#x1EA7;n l&#x1EDB;n c&#xE1;c &#x1EA3;nh trong post n&#xE0;y &#x111;&#x1B0;&#x1EE3;c l&#x1EA5;y t&#x1EEB; m&#x1ED9;t v&#xE0;i group nh&#x1B0;: <a href="https://www.facebook.com/groups/brtypography/">BnR Typography</a>, <a href="https://www.facebook.com/youremylumiere/?fref=tag">You&apos;re my Lumi&#xE8;re</a>, <a href="https://www.facebook.com/TumblrVN/?fref=tag">Tumblr Vietnam</a>...</p><figure class="kg-card kg-embed-card"><iframe width="100%" height="400" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?visual=true&amp;url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F412497540&amp;show_artwork=true"></iframe></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-01.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-02.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-03.png" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-04-1.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-05-1.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-06.png" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-07.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-08.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-09.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-10.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-11.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-12.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-13.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-14.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-15.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-16.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-17.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-18.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-19.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-20.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://huynq.net/content/images/2018/08/quote-p7-21.jpg" class="kg-image" alt="Photo Quote hay - P7" loading="lazy"></figure>]]></content:encoded></item><item><title><![CDATA[[Music] Peaceful]]></title><description><![CDATA[<!--kg-card-begin: markdown--><iframe src="https://open.spotify.com/embed/user/21c6fzudjk2vrqizbwgjyhera/playlist/3r4AZXdjDVB2gf9ZJmLDf4" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe><!--kg-card-end: markdown-->]]></description><link>https://huynq.net/music-peaceful/</link><guid isPermaLink="false">5abc431cc77399594bb1aab4</guid><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Thu, 29 Mar 2018 01:37:25 GMT</pubDate><media:content url="https://huynq.net/content/images/2018/08/14579266544_f1c654a80f_o.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><iframe src="https://open.spotify.com/embed/user/21c6fzudjk2vrqizbwgjyhera/playlist/3r4AZXdjDVB2gf9ZJmLDf4" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe><!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[You suck at PowerPoint]]></title><description><![CDATA[<!--kg-card-begin: markdown--><blockquote>
<p><em>B&#x1EA1;n c&#x1EA7;n 15 ph&#xFA;t &#x111;&#x1EC3; &#x111;&#x1ECD;c b&#xE0;i n&#xE0;y.</em></p>
</blockquote>
<p>T&#x1EEB; tr&#x1B0;&#x1EDB;c &#x111;&#x1EBF;n gi&#x1EDD;, m&#xEC;nh c&#x169;ng &#x111;&#xE3; d&#x1EF1; kh&#xE1; nhi&#x1EC1;u bu&#x1ED5;i</p>]]></description><link>https://huynq.net/you-suck-at-powerpoint/</link><guid isPermaLink="false">596983ec8613a77f21c388ae</guid><category><![CDATA[tips]]></category><category><![CDATA[powerpoint]]></category><category><![CDATA[slide]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Wed, 15 Nov 2017 04:07:19 GMT</pubDate><media:content url="https://huynq.net/content/images/2015/12/you-suck-at-powerpoint-by-jessedee-1-1024.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><blockquote>
<img src="https://huynq.net/content/images/2015/12/you-suck-at-powerpoint-by-jessedee-1-1024.jpg" alt="You suck at PowerPoint"><p><em>B&#x1EA1;n c&#x1EA7;n 15 ph&#xFA;t &#x111;&#x1EC3; &#x111;&#x1ECD;c b&#xE0;i n&#xE0;y.</em></p>
</blockquote>
<p>T&#x1EEB; tr&#x1B0;&#x1EDB;c &#x111;&#x1EBF;n gi&#x1EDD;, m&#xEC;nh c&#x169;ng &#x111;&#xE3; d&#x1EF1; kh&#xE1; nhi&#x1EC1;u bu&#x1ED5;i presentation, nh&#x1B0;ng th&#xFA; th&#x1EAD;t l&#xE0; kh&#xF4;ng c&#xF3; qu&#xE1; 25% slide khi&#x1EBF;n m&#xEC;nh h&#xE0;i l&#xF2;ng xD.</p>
<p>M&#xEC;nh nh&#x1EAD;n th&#x1EA5;y, h&#x1EA7;u h&#x1EBF;t m&#x1ECD;i ng&#x1B0;&#x1EDD;i khi l&#xE0;m slide th&#x1B0;&#x1EDD;ng m&#x1EAF;c 1 s&#x1ED1; l&#x1ED7;i c&#x103;n b&#x1EA3;n nh&#x1B0;:</p>
<p><strong>1. Qu&#xE1; nhi&#x1EC1;u ch&#x1EEF; trong 1 slide.</strong></p>
<p>Kho&#x1EA3;ng 95% c&#xE1;c slide d&#xED;nh l&#x1ED7;i n&#xE0;y l&#xE0; slide d&#xF9;ng gi&#x1EA3;i th&#xED;ch 1 kh&#xE1;i ni&#x1EC7;m n&#xE0;o &#x111;&#xF3;.<br>
Nh&#x1B0; m&#xEC;nh &#x111;&#xE3; t&#x1EEB;ng xem, c&#xF3; b&#x1EA1;n c&#xF2;n n&#xE9;m c&#x1EA3; 1 &#x111;o&#x1EA1;n trong Wikipedia d&#xE0;i t&#x1EA7;m 20 d&#xF2;ng, tr&#xE0;n c&#x1EA3; ch&#x1EEF; ra ngo&#xE0;i slide ch&#x1EC9; &#x111;&#x1EC3; gi&#x1EA3;i th&#xED;ch 1 thu&#x1EAD;t ng&#x1EEF; m&#xE0; &#x111;&#x1EBF;n ch&#xED;nh b&#x1EA3;n th&#xE2;n &#x111;&#x1ECD;c c&#xF2;n kh&#xF4;ng hi&#x1EC3;u.</p>
<p>&#x110;&#x1EC3; kh&#x1EAF;c ph&#x1EE5;c v&#x1EA5;n &#x111;&#x1EC1; n&#xE0;y, th&#xEC; m&#xEC;nh th&#x1B0;&#x1EDD;ng gi&#x1EA3;i quy&#x1EBF;t theo h&#x1B0;&#x1EDB;ng sau:</p>
<ul>
<li>H&#xE3;y &#x111;&#x1EC3; &#xFD; c&#xE1;c t&#x1EEB; kh&#xF3;a ch&#xED;nh, &#x111;&#x1B0;a c&#xE1;c &#xFD; ch&#xED;nh th&#xE0;nh g&#x1EA1;ch &#x111;&#x1EA7;u d&#xF2;ng.</li>
<li>Ng&#x1B0;&#x1EDD;i d&#xF9;ng s&#x1EBD; d&#x1EC5; ti&#x1EBF;p nh&#x1EAD;n th&#xF4;ng tin h&#x1A1;n n&#x1EBF;u slide ch&#x1EC9; c&#xF3; kho&#x1EA3;ng 1-2 &#xFD; v&#xE0; ch&#x1EC9; g&#xF3;i g&#x1ECD;n trong 4-6 d&#xF2;ng. N&#x1EBF;u n&#x1ED9;i dung d&#xE0;i th&#xEC; c&#xF3; th&#x1EC3; t&#xE1;ch ra l&#xE0;m 2 hay nhi&#x1EC1;u slide.</li>
</ul>
<p><strong>2. M&#xE0;u ch&#x1EEF; v&#xE0; m&#xE0;u n&#x1EC1;n kh&#xF4;ng t&#x1B0;&#x1A1;ng ph&#x1EA3;n v&#x1EDB;i nhau.</strong></p>
<ul>
<li>C&#x1ED1; g&#x1EAF;ng s&#x1EED; d&#x1EE5;ng m&#xE0;u s&#x1EAF;c t&#x1B0;&#x1A1;ng ph&#x1EA3;n nh&#x1B0;ng d&#x1EC5; &#x111;&#x1ECD;c.</li>
<li>H&#xE3;y b&#x1EAD;t slide l&#xEA;n v&#xE0; ng&#x1ED3;i xu&#x1ED1;ng c&#xE1;c v&#x1ECB; tr&#xED; c&#x1EE7;a kh&#xE1;n gi&#x1EA3; &#x111;&#x1EC3; xem tr&#x1B0;&#x1EDB;c. B&#x1EDF;i v&#xEC; c&#xF3; th&#x1EC3; m&#xE0;u s&#x1EAF;c b&#x1EA1;n s&#x1EED; d&#x1EE5;ng d&#x1EC5; &#x111;&#x1ECD;c tr&#xEA;n m&#xE0;n h&#xEC;nh m&#xE1;y vi t&#xED;nh nh&#x1B0;ng s&#x1EBD; kh&#xF3; &#x111;&#x1ECD;c khi tr&#xEC;nh chi&#x1EBF;u qua m&#xE1;y chi&#x1EBF;u.<br>
M&#x1ED9;t s&#x1ED1; link tham kh&#x1EA3;o: <a href="https://viget.com/inspire/color-contrast">https://viget.com/inspire/color-contrast</a><br>
<a href="http://contrastchecker.com/">http://contrastchecker.com/</a></li>
</ul>
<p><strong>3. D&#xF9;ng clip art, word art.</strong></p>
<p>No comment. B&#x1EA1;n xem l&#x1EA1;i &#x111;&#x1ED3;ng h&#x1ED3; xem n&#x103;m nay l&#xE0; n&#x103;m bao nhi&#xEA;u nh&#xE9;.</p>
<p><strong>4. H&#xEC;nh &#x1EA3;nh s&#x1EED; d&#x1EE5;ng trong slide ch&#x1EA5;t l&#x1B0;&#x1EE3;ng k&#xE9;m, scale sai t&#x1EC9; l&#x1EC7;.</strong></p>
<p>Tr&#x1B0;&#x1EDD;ng h&#x1EE3;p n&#xE0;y m&#xEC;nh c&#x169;ng g&#x1EB7;p kh&#xE1; l&#xE0; nhi&#x1EC1;u, &#x111;&#x1A1;n gi&#x1EA3;n v&#xEC; m&#x1ECD;i ng&#x1B0;&#x1EDD;i l&#x1B0;&#x1EDD;i t&#xEC;m &#x1EA3;nh kh&#xE1;c ch&#x1EA5;t l&#x1B0;&#x1EE3;ng cao, l&#x1B0;&#x1EDD;i crop &#x1EA3;nh.</p>
<ul>
<li>H&#xE3;y c&#x1ED1; g&#x1EAF;ng t&#xEC;m c&#xE1;c &#x1EA3;nh c&#xF3; &#x111;&#x1ED9; ph&#xE2;n gi&#x1EA3;i l&#x1EDB;n v&#xE0; &#x111;&#x1ED9; n&#xE9;t cao.</li>
<li>N&#x1EBF;u &#x1EA3;nh k&#xED;ch c&#x1EE1; kh&#xF4;ng ph&#xF9; h&#x1EE3;p, b&#x1EA1;n n&#xEA;n crop &#x1EA3;nh thay v&#xEC; scale b&#x1EB1;ng tay, l&#xE0;m nh&#x1B0; th&#x1EBF; s&#x1EBD; tr&#xF4;ng bu&#x1ED3;n c&#x1B0;&#x1EDD;i y nh&#x1B0; b&#x1EA1;n v&#xE0;o nh&#xE0; g&#x1B0;&#x1A1;ng &#xFD;.</li>
<li>B&#x1EA1;n c&#x169;ng n&#xEA;n crop &#x1EA3;nh khi c&#x1EA7;n ng&#x1B0;&#x1EDD;i xem t&#x1EAD;p trung v&#xE0;o chi ti&#x1EBF;t n&#xE0;o &#x111;&#x1EA5;y c&#x1EE7;a b&#x1EE9;c &#x1EA3;nh.</li>
</ul>
<p><strong>5. S&#x1EED; d&#x1EE5;ng nhi&#x1EC1;u font ch&#x1EEF; trong 1 slide.</strong></p>
<ul>
<li>&#x110;&#x1EEB;ng d&#xF9;ng qu&#xE1; 3 font ch&#x1EEF; trong 1 slide n&#x1EBF;u b&#x1EA1;n kh&#xF4;ng mu&#x1ED1;n l&#xE0;m ng&#x1B0;&#x1EDD;i xem hoa m&#x1EAF;t.</li>
<li>H&#xE3;y s&#x1EED; d&#x1EE5;ng c&#xE1;c font ch&#x1EEF; d&#x1EC5; nh&#xEC;n, tr&#xE1;nh m&#x1EA5;y c&#xE1;i font ki&#x1EC3;u bay b&#x1B0;&#x1EDB;m hay c&#x1ED5; &#x111;i&#x1EC3;n (tr&#x1EEB; khi slide c&#x1EE7;a b&#x1EA1;n gi&#x1EDB;i thi&#x1EC7;u v&#x1EC1; font...).</li>
</ul>
<p>Hi&#x1EC7;n t&#x1EA1;i Google c&#x169;ng c&#xF3; kh&#xE1; nhi&#x1EC1;u font free &#x1EDF; <strong><a href="https://github.com/google/fonts">&#x111;&#xE2;y</a></strong>, xem tr&#x1B0;&#x1EDB;c &#x1EDF; <strong><a href="https://www.google.com/fonts">&#x111;&#xE2;y</a></strong>. Thay v&#xEC; s&#x1EED; d&#x1EE5;ng c&#xE1;c font quen thu&#x1ED9;c nh&#x1B0; Arial, Times New Roman, Calibri... th&#xEC; b&#x1EA1;n h&#xE3;y th&#x1EED; l&#xE0;m m&#x1EDB;i slide b&#x1EB1;ng c&#xE1;c font c&#x1EE7;a Google xem.</p>
<p><strong>6. L&#x1EA1;m d&#x1EE5;ng qu&#xE1; nhi&#x1EC1;u hi&#x1EC7;u &#x1EE9;ng (animation/transition).</strong></p>
<p>Vi&#x1EC7;c th&#xEA;m hi&#x1EC7;u &#x1EE9;ng v&#xE0;o slide s&#x1EBD; l&#xE0;m ng&#x1B0;&#x1EDD;i d&#xF9;ng b&#x1EDB;t nh&#xE0;m ch&#xE1;n, tuy nhi&#xEA;n, h&#xE3;y d&#x1EEB;ng l&#x1EA1;i &#x1EDF; m&#x1EE9;c v&#x1EEB;a &#x111;&#x1EE7; v&#xE0; h&#x1EE3;p l&#xFD;.</p>
<ul>
<li>N&#xEA;n s&#x1EED; d&#x1EE5;ng c&#xF9;ng ki&#x1EC3;u transition gi&#x1EEF;a c&#xE1;c slide, t&#x1ED1;c &#x111;&#x1ED9; nhanh (0.5~1 s)</li>
<li>Kh&#xF4;ng n&#xEA;n &#x111;&#x1EB7;t th&#x1EDD;i gian th&#x1EF1;c hi&#x1EC7;n animation qu&#xE1; l&#xE2;u.</li>
<li>S&#x1EED; d&#x1EE5;ng animation ph&#xF9; h&#x1EE3;p, c&#xE1;c block kh&#xF4;ng hi&#x1EC3;n th&#x1ECB; ch&#x1ED3;ng ch&#xE9;o l&#xEA;n nhau.</li>
</ul>
<p><strong>7. B&#xE0;i presentation kh&#xF4;ng c&#xF3; c&#x1EA5;u tr&#xFA;c.</strong></p>
<p>H&#xE3;y cho ng&#x1B0;&#x1EDD;i xem bi&#x1EBF;t &#x111;&#x1B0;&#x1EE3;c b&#xE0;i presentation c&#x1EE7;a b&#x1EA1;n c&#xF3; c&#x1EA5;u tr&#xFA;c nh&#x1B0; th&#x1EBF; n&#xE0;o b&#x1EB1;ng c&#xE1;ch hi&#x1EC3;n th&#x1ECB; m&#x1EE5;c l&#x1EE5;c. Ngo&#xE0;i ra, tr&#x1B0;&#x1EDB;c khi chuy&#x1EC3;n sang thuy&#x1EBF;t tr&#xEC;nh v&#x1EC1; m&#x1ED9;t v&#x1EA5;n &#x111;&#x1EC1; m&#x1EDB;i, b&#x1EA1;n c&#x169;ng n&#xEA;n c&#xF3; 1 slide d&#xE0;nh cho vi&#x1EC7;c t&#xF3;m t&#x1EAF;t ng&#x1EAF;n g&#x1ECD;n v&#x1EA5;n &#x111;&#x1EC1; v&#x1EEB;a thuy&#x1EBF;t tr&#xEC;nh xong.</p>
<p><strong>8. Slide kh&#xF4;ng &#x103;n nh&#x1EAD;p g&#xEC; v&#x1EDB;i n&#x1ED9;i dung tr&#xEC;nh b&#xE0;y.</strong></p>
<p>&#x110;i&#x1EC1;u n&#xE0;y th&#xEC; kh&#xF4;ng ph&#x1EA3;i b&#xE0;n c&#xE3;i r&#x1ED3;i. C&#x1EA7;n tr&#xE1;nh tr&#x1B0;&#x1EDD;ng h&#x1EE3;p slide h&#xEC;nh con g&#xE0; m&#xE0; m&#xEC;nh l&#x1EA1;i n&#xF3;i v&#x1EC1; con v&#x1ECB;t (m&#x1EB7;c d&#xF9; c&#x1EA3; 2 &#x111;&#x1EC1;u l&#xE0; gia c&#x1EA7;m), tr&#x1EEB; khi b&#x1EA1;n mu&#x1ED1;n &#x1EA9;n d&#x1EE5; ki&#x1EBF;p tr&#x1B0;&#x1EDB;c c&#x1EE7;a con v&#x1ECB;t b&#x1EA1;n &#x111;ang n&#xF3;i l&#xE0; con g&#xE0; tr&#xEA;n slide.</p>
<p><strong>9. Kh&#xF4;ng ghi r&#xF5; ngu&#x1ED3;n khi s&#x1EED; d&#x1EE5;ng t&#xE0;i li&#x1EC7;u, h&#xEC;nh &#x1EA3;nh c&#x1EE7;a ng&#x1B0;&#x1EDD;i kh&#xE1;c.</strong></p>
<p>&#x102;n qu&#x1EA3; nh&#x1EDB; k&#x1EBB; tr&#x1ED3;ng c&#xE2;y. H&#xE3;y t&#xF4;n tr&#x1ECD;ng c&#xF4;ng s&#x1EE9;c c&#x1EE7;a ng&#x1B0;&#x1EDD;i kh&#xE1;c b&#x1EB1;ng c&#xE1;ch xin ph&#xE9;p ho&#x1EB7;c d&#x1EAB;n ngu&#x1ED3;n n&#x1EBF;u b&#x1EA1;n c&#xF3; s&#x1EED; d&#x1EE5;ng t&#xE0;i nguy&#xEA;n c&#x1EE7;a h&#x1ECD; trong slide c&#x1EE7;a m&#xEC;nh.</p>
<p><strong>10. &#xDD; th&#x1EE9;c c&#x1EE7;a ng&#x1B0;&#x1EDD;i l&#xE0;m slide</strong></p>
<p>&#x110;&#xE2;y l&#xE0; &#x111;i&#x1EC1;u quan tr&#x1ECD;ng nh&#x1EA5;t, h&#xE3;y t&#xF4;n tr&#x1ECD;ng kh&#xE1;n gi&#x1EA3; b&#x1EB1;ng c&#xE1;ch c&#x1ED1; g&#x1EAF;ng trau chu&#x1ED1;t n&#x1ED9;i dung slide, d&#xE0;nh th&#x1EDD;i gian &#x111;&#x1EC3; chu&#x1EA9;n b&#x1ECB; cho b&#xE0;i presentation c&#x1EE7;a m&#xEC;nh.</p>
<p><strong>K&#x1EBF;t lu&#x1EAD;n</strong><br>
Tr&#xEA;n &#x111;&#xE2;y l&#xE0; 10 &#x111;i&#x1EC1;u m&#xE0; c&#xE1; nh&#xE2;n m&#xEC;nh &#x111;&#xFA;c k&#x1EBF;t ra &#x111;&#x1B0;&#x1EE3;c sau khi &#x111;&#x1B0;&#x1EE3;c xem kh&#xE1; nhi&#x1EC1;u bu&#x1ED5;i presentation. Sau khi &#x111;&#x1ECD;c b&#xE0;i n&#xE0;y, hy v&#x1ECD;ng k&#x1EF9; n&#x103;ng l&#xE0;m slide c&#x1EE7;a b&#x1EA1;n s&#x1EBD; &#x111;&#x1B0;&#x1EE3;c c&#x1EA3;i thi&#x1EC7;n m&#x1ED9;t c&#xE1;ch &#x111;&#xE1;ng k&#x1EC3;. Ngo&#xE0;i ra, b&#x1EA1;n c&#xF3; th&#x1EC3; bi&#x1EBF;t th&#xEA;m &#x111;&#x1B0;&#x1EE3;c nh&#x1EEF;ng th&#x1EE9; kh&#xE1; hay ho kh&#xE1;c trong slide d&#x1B0;&#x1EDB;i &#x111;&#xE2;y:</p>
<p>&#x110;&#xE2;y l&#xE0; m&#x1ED9;t slide kh&#xE1; hay m&#xE0; m&#xEC;nh t&#xEC;m &#x111;&#x1B0;&#x1EE3;c (m&#xEC;nh &#x111;&#xE3; chia s&#x1EBB; t&#x1EEB; kh&#xE1; l&#xE2;u tr&#xEA;n blog n&#xE0;y r&#x1ED3;i nh&#x1B0;ng b&#xE0;i &#x111;&#xF3; b&#x1ECB; x&#xF3;a r&#x1ED3;i th&#xEC; ph&#x1EA3;i :D)</p>
<iframe src="//www.slideshare.net/slideshow/embed_code/key/5ZVv89GNL5kiE2" width="510" height="420" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="//www.slideshare.net/jessedee/you-suck-at-powerpoint" title="You Suck At PowerPoint! by @jessedee" target="_blank">You Suck At PowerPoint! by @jessedee</a> </strong> from <strong><a href="//www.slideshare.net/jessedee" target="_blank">Jesse Desjardins - @jessedee</a></strong> </div>
<blockquote>
<p>B&#xE0;i n&#xE0;y &#x111;&#x1B0;&#x1EE3;c draft t&#x1EEB; n&#x103;m 2015, n&#x1EBF;u c&#xF3; g&#xEC; l&#x1ED7;i th&#x1EDD;i mong c&#xE1;c b&#x1EA1;n b&#x1ECF; qua :o</p>
</blockquote>
<blockquote>
<p>N&#x1EBF;u b&#x1EA1;n c&#xF3; &#xFD; &#x111;&#x1ECB;nh h&#x1ECF;i c&#xE1;i th&#x1EB1;ng vi&#x1EBF;t b&#xE0;i n&#xE0;y l&#xE0;m slide c&#xF3; t&#x1ED1;t kh&#xF4;ng th&#xEC; c&#xE2;u tr&#x1EA3; l&#x1EDD;i l&#xE0;: &quot;<mark>Kh&#xF4;ng bi&#x1EBF;t</mark>&quot; nh&#xE9;. Ahihi. C&#xE2;u h&#x1ECF;i &#x111;&#xF3; &#x111;&#x1EC3; d&#xE0;nh cho kh&#xE1;n gi&#x1EA3; ch&#x1EAF;c c&#xF3; &#xFD; ngh&#x129;a h&#x1A1;n l&#xE0; t&#x1EF1; m&#xEC;nh tr&#x1EA3; l&#x1EDD;i.</p>
</blockquote>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Git Cheatsheet]]></title><description><![CDATA[Useful cheatsheet for Git]]></description><link>https://huynq.net/git-cheatsheet/</link><guid isPermaLink="false">59a8e670172644688264004d</guid><category><![CDATA[git]]></category><category><![CDATA[git cheatsheet]]></category><category><![CDATA[cheatsheet]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Fri, 01 Sep 2017 04:53:27 GMT</pubDate><media:content url="https://huynq.net/content/images/2017/09/git.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h2 id="vsquestions">&quot;vs&quot; Questions</h2>
<hr>
<ol>
<li><a href="http://stackoverflow.com/questions/804115">http://stackoverflow.com/questions/804115</a>  (<code>rebase</code> vs <code>merge</code>).</li>
<li><a href="https://www.atlassian.com/git/tutorials/merging-vs-rebasing">https://www.atlassian.com/git/tutorials/merging-vs-rebasing</a> (<code>rebase</code> vs <code>merge</code>)</li>
<li><a href="https://www.atlassian.com/git/tutorials/undoing-changes/">https://www.atlassian.com/git/tutorials/undoing-changes/</a> (<code>reset</code> vs <code>checkout</code> vs <code>revert</code>)</li>
<li><a href="http://stackoverflow.com/questions/2221658">http://stackoverflow.com/questions/2221658</a> (HEAD^ vs HEAD~) (See <code>git rev-parse</code>)</li>
<li><a href="http://stackoverflow.com/questions/292357">http://stackoverflow.com/questions/292357</a> (<code>pull</code> vs <code>fetch</code>)</li>
<li><a href="http://stackoverflow.com/questions/39651">http://stackoverflow.com/questions/39651</a> (<code>stash</code> vs <code>branch</code>)</li>
<li><a href="http://stackoverflow.com/questions/8358035">http://stackoverflow.com/questions/8358035</a> (<code>reset</code> vs <code>checkout</code> vs <code>revert</code>)</li>
<li><a href="http://stackoverflow.com/questions/5798930">http://stackoverflow.com/questions/5798930</a> (<code>git reset</code> vs <code>git rm --cached</code>)</li>
</ol>
<h2 id="generalquestions">General Questions</h2>
<hr>
<ol>
<li><a href="http://stackoverflow.com/questions/5788037">http://stackoverflow.com/questions/5788037</a> (Recover from <code>git reset --hard</code>).</li>
<li><a href="http://stackoverflow.com/questions/1146973/">http://stackoverflow.com/questions/1146973/</a> (Revert all local changes to previous state)</li>
<li><a href="http://effectif.com/git/recovering-lost-git-commits">http://effectif.com/git/recovering-lost-git-commits</a> (Recovering lost commit)</li>
<li><a href="https://stackoverflow.com/questions/79165">https://stackoverflow.com/questions/79165</a> (Migrating from SVN)</li>
<li><a href="https://davidwalsh.name/squash-commits-git">https://davidwalsh.name/squash-commits-git</a> (Combining multiple commits into one using <code>git rebase</code>).</li>
</ol>
<h2 id="websitereference">Website Reference</h2>
<hr>
<ol>
<li><a href="http://gitready.com/">http://gitready.com/</a> (Git Tips and Tricks with explanation)</li>
<li><a href="https://github.com/git-tips/tips">https://github.com/git-tips/tips</a> (Repo for most common git tips)</li>
<li><a href="http://gitimmersion.com/">http://gitimmersion.com/</a> (Small Online Book)</li>
<li><a href="http://think-like-a-git.net/">http://think-like-a-git.net/</a></li>
<li><a href="http://www.ohshitgit.com">http://www.ohshitgit.com</a> (Take a look)</li>
<li><a href="https://github.com/nvie/gitflow">https://github.com/nvie/gitflow</a> (Alternative branch model for git.)</li>
<li><a href="https://github.com/magit/magit">https://github.com/magit/magit</a> (Git GUI for Emacs).</li>
</ol>
<h2 id="fastgitreference">Fast Git Reference</h2>
<hr>
<ol start="0">
<li>First download the cheetsheat from official: <a href="http://git-scm.com">http://git-scm.com</a></li>
<li>For starters and intermediate, focus on only these commands:
<ul>
<li>Configuring : <code>config, help</code>.</li>
<li>Creating : <code>init, clone</code>.</li>
<li>Make Changes: <code>status, diff, add, commit, reset, rm, mv (not important)</code>.</li>
<li>Branching &amp; Merging: <code>branch, checkout, merge, stash</code></li>
<li>Review History: <code>log, tag, diff, show</code></li>
<li>Update and Publish: <code>fetch, pull, push, remote</code>.</li>
<li>Very Imp: <code>reflog</code> . <a href="http://effectif.com/git/recovering-lost-git-commits">http://effectif.com/git/recovering-lost-git-commits</a></li>
</ul>
</li>
<li>Commands that are not in official cheatsheet (and advanced): <code>revert, apply, cherry-pick, rebase, clean, show-ref, update-ref, ls-files</code>
<ul>
<li>Debugging Commands: <code>bisect, blame</code>.</li>
</ul>
</li>
<li><code>git stash</code> is lightweight alternative to <code>git branch</code>.</li>
<li>Git has three stages:
<ul>
<li>Committed : means data is safely stored in your local database.</li>
<li>Modified :  means you&apos;ve changed the file but not committed.</li>
<li>Staged : means you&apos;ve marked a modified file in its current version to go into your next commit snapshot.</li>
</ul>
</li>
<li>Workflow of git:
<ul>
<li>Working Directory: holds the actual files</li>
<li>Index: Acts as a staging area. That is, snapshot for next commit. Will be done by <code>git add</code> command.</li>
<li>HEAD : Points to the last commit (and current branch) you&apos;ve made.</li>
</ul>
</li>
<li>Anything that is committed in Git can almost be recovered. However files which are not committed can&apos;t be recovered.</li>
<li>Description of Update and Fetch Commands:
<ul>
<li><code>remote</code>: it only manage set of track repositories.</li>
<li><code>fetch</code>: You can fetch new work from that remote server after cloning. Not similar to <code>clone</code>. You can later merge that repo with your existing with <code>merge</code> command.</li>
<li><code>pull</code>: Automatically fetch and merge newest commit from remote server to local branch. By default, it combines fetch and merge.</li>
<li><code>push</code>: This will push to the remote server from local branch.</li>
</ul>
</li>
<li>When you do branch switching, files in your working directory will change to match that branch.</li>
<li>Using <code>git reflog</code> you can get back your destroyed commit (done via <code>git reset --hard</code>) using either
<ul>
<li><code>git checkout -b newBranchName &lt;shaViaReflog&gt;</code></li>
<li><code>git reset --hard &lt;shaViaReflog&gt;</code><br>
But use it in rare cases, because you reflog keep state via sha and it&apos;s hard to see which sha belongs to specific commit.</li>
</ul>
</li>
<li><code>git cherry-pick</code> is a low level version of <code>rebase</code>.</li>
<li>For advanced user who want to explore more, see <a href="https://github.com/nvie/gitflow">gitflow</a>. A Git extensions for creating repo operations using different branch model.</li>
</ol>
<h3 id="tipsandshortcuts">Tips and Shortcuts</h3>
<hr>
<img src="https://huynq.net/content/images/2017/09/git.jpg" alt="Git Cheatsheet"><p>Most used commands are: <code>init, clone, status, log, add, commit, reset, rm, branch, checkout, merge, stash</code></p>
<pre><code class="language-bash">    ## -- Initializing a new git repository
        $$ git init

    ## -- Useful git log commands
        $$ git log --oneline        ## print short sha in one line
        $$ git log -3               ## show only first 3 commit
        $$ git log --author=&quot;John&quot;  ## show commits only by this author


    ## -- Cloning a git repository
    ## The other protocols are: ssh, ftp, file://, http(s):// etc...
        $$ git clone git://github.com/something/foo.git

    ## -- Show the status of file
        $$ git status -s  # in short format

    ## -- Add the file to staging area.
        $$ git add foo.js bar.js   ## `--` is used to seperate files from `add` options.
        $$ git add .    # add all the files

    ## -- Show what have changed since you last commit
        $$ git diff  ## with a `--cached` option, show the changes that will go into the next commit snapshot.

    ## -- Commit the changes after you add the files to staging area
        $$ git commit -m &apos;with an inline message&apos;

    ## -- Auto-commit and track changes to modified file.
    ## NOTE: The files you&apos;ve not added doesn&apos;t track by commit with `-a` command.
        $$ git commit -a -m &apos;with an inline message&apos;

    ## -- Ammend last commit (i.e, merge to previous commit)
    ## https://nathanhoad.net/git-amend-your-last-commit
    ## After doing `git add .`
        $$ git commit --amend   # alternate is `git reset --soft HEAD~`.
        ## amend a commit without changing previous message
        $$ git commit --amend --no-edit


    ## -- Unstage file from the index only.  See `git reset` also.
    ## NOTE: `git rm` without `--cached` will simply remove the file from both index and working directory.
        $$ git rm --cached  # exact opposite of git add.

    ## -- Throw away local changes after commit (Use with caution)
        $$ git checkout &lt;file&gt;  
        # if the branch name and file name are same, then do this
        $$ git checkout -- &lt;file&gt;
        ## for all changes (it&apos;s perfect for time travel on previous commit)
        $$ git checkout -f # or `git reset --hard` (but previous one is more safer because with that you&apos;re in detached state.)


    ## Delete a single entry from git reflog. (git reflog is useful as it keeps 2 months history).
        $$ git reflog delete HEAD@{N}    ## `N`: 1,2 etc... or &lt;sha&gt;

    ## Undo the last commit, but keep the history and adds a new history
    ## http://stackoverflow.com/questions/27032850/ (for `git reset` vs `git revert` with image)
        $$ git revert

    ## -- check where HEAD is
        $$ git show-ref

    ## Remove the initial commit (git reset doesn&apos;t work here, it works only after second commit)
    ## http://stackoverflow.com/questions/6632191/how-to-revert-initial-git-commit
        $$ git update-ref -d HEAD


    ## Push a specific branch
        $$ git push origin &lt;mylocalbranch&gt;

    ## -- Detailed explaination of `git reset` (all three options). P.S. Use git checkout for time travel.
    ## http://stackoverflow.com/a/6866485/2092405
    ## NOTE: All the below three options remove log, so if you want to get back to previous state, you can pick
    ## &lt;sha&gt; from git reflog and do git reset on this.
    ## Suppose the structure is
         A-B-C
             &#x2191; (master)
    ## Then, nuke commit C and never see it again. Do this:
        $$ git reset --hard HEAD~1
        ## the result is:
             A-B
               &#x2191; (master)
       ## To undo this command, use;
           $$ git reset --hard &lt;newShaOfReflog&gt;  ## or (git reset --hard HEAD@{1})

    ## Undo the last commit, but keep your changes in working directory.
    ## It will delete the index the from git log also and show you untracked and unstaged files:
        $$ git reset HEAD~1  ## move the pointer one index back (or git reset --mixed HEAD~1)
        ## the result is:
        A-B-C
          &#x2191; (master)
        ## To undo this command, use;
            $$ git reset &lt;newShaOfReflog&gt;  ## or (git reset HEAD@{1})

    ## Undo the last commit, but don&apos;t touch the index and working directory.
    ## When you do git status, you&apos;ll see that the same files are in the index as before.
    ## In fact, right after this command, you could do `git commit` and you&apos;d be redoing the same commit you just had.
        $$ git reset --soft HEAD~1


    ## Add a changed file to old commit (not last commit). I.E., fix up old commit
    http://stackoverflow.com/a/2719659/2092405

    ## merge a specific commit from one branch to another branch.
        ## make sure you&apos;re in the branch where you want merge.
        $$ git cherry-pick &lt;commit-id-of-feature-branch&gt;

    ## Merge two specific commit together (using rebase)
    http://stackoverflow.com/questions/2563632/how-can-i-merge-two-commits-into-one

    ## Modify a specific commit in git
    http://stackoverflow.com/questions/1186535/how-to-modify-a-specified-commit-in-git
    ## if you&apos;re getting this error. Needs a single revision. See this: http://stackoverflow.com/questions/26174757/
    ## Option: 2
        $$ git checkout &lt;shaToThatCommit&gt;
        $$ touch newfile.txt
        $$ git add .
        $$ git commit --amend --no-edit
        $$ git rebase --onto HEAD &lt;shaToThatCommit&gt; master  ## it will do automatic git checkout to master branch


    ## Branching and Merging
    ## ---------------------
    ## List out all the branches
        $$ git branch
    ## Create a new branch `testing` at your last commit
        $$ git branch testing
    ## Switch to branch
        $$ git checkout testing
    ## Shortcut to create a new branch and checkout
        $$ git checkout -b newbranch
    ## Delete a branch
        $$ git branch -d testing
    ## Merge the &lt;branch&gt; on the current working branch
    ## Merge tip: If you&apos;re doing merge say, from `wip` to `live` branch and you&apos;ve edit `live` branch files
    ## then it will not undo changed file which is what we want.
    ## Also, merge conflict occurs when same file changed in both branch, you merged. You can reverse the merge conflict
    ## with `--abort` option
        $$ git merge testing    ## this will merge `testing` branch onto current (`master`) branch.
    ## checkout arbitrary commits instead of branch
        $$ git checkout HEAD~2
    ## Undo deleted branch
        $$ git reflog    ## to see the hash code of branch before deletion.
        $$ git checkout &lt;hashcodeFromReflog&gt;  ## to restore, and then create the same branch from there.

</code></pre>
<h2 id="gitresetvsgitrevert">Git reset vs Git revert</h2>
<hr>
<p><strong>NOTE</strong>: <code>git revert</code> is advanced command and it may accidently delete your files, if you haven&apos;t committed.<br>
<a href="http://stackoverflow.com/questions/8358035/whats-the-difference-between-git-revert-checkout-and-reset">http://stackoverflow.com/questions/8358035/whats-the-difference-between-git-revert-checkout-and-reset</a></p>
<ul>
<li>Basically <code>git revert</code> undo changes with new commit history (i.e., introduce a new commit that reverse the specified one) while <code>git reset</code> (with <code>--hard</code>) <strong>BEWARE</strong>. Any changes to tracked files in the working tree and index are discarded.</li>
<li><code>git reset</code> (with <code>--soft</code>) option doesn&apos;t touch the index file nor working tree. In this case, index file is staged but not committed and right after this command you can use <code>git commit</code>.</li>
<li><code>git reset</code> (with <code>--mixed</code>) option reset the index but not the working tree. In this case, index file is not staged, so after this command you have to use <code>git add</code> and <code>git commit</code>.</li>
</ul>
<h2 id="gitrmandgitreset">Git rm and Git reset</h2>
<hr>
<p><code>git rm</code> remove the file from the index (with <code>--cached</code> option).<br>
<code>git reset</code> is specifically about updating the index, moving the HEAD.<br>
These two options are <code>equivalent only when we first add a file</code>. After that with <code>git reset</code> you can move the index while with <code>git rm --cached</code>, you completly destroy the index.</p>
<h2 id="fixaheaddetachedfrommessage">Fix a &quot;head detached from&quot; message</h2>
<hr>
<p>See: <a href="http://stackoverflow.com/questions/10228760/fix-a-git-detached-head">http://stackoverflow.com/questions/10228760/fix-a-git-detached-head</a><br>
Summary: Basically checkout the branch using <code>git checkout branchname</code></p>
<h2 id="relativerefs">Relative Refs</h2>
<hr>
<p><a href="https://www.atlassian.com/git/tutorials/refs-and-the-reflog/refspecs">https://www.atlassian.com/git/tutorials/refs-and-the-reflog/refspecs</a><br>
The <code>~</code> character lets you reach parent commits. For eg: The following display the grandparent of HEAD:<br>
<code>git show HEAD~2</code>. The <code>~</code> character will always follow the first parent of a merge commit.<br>
If you want to follow different parent, use <code>^</code> character<br>
For eg: If HEAD is the merge commit, then following returns the second parent of HEAD:<br>
<code>git show HEAD^2</code><br>
Some examples:</p>
<pre><code class="language-sh">    # Only list commits that are parent of the second parent of a merge commit
    $$ git log HEAD^2
    # Remove the last 3 commits from the current branch
    $$ git reset HEAD~3
    # Interactively rebase the last 3 commits on the current branch
    $$ git rebase -i HEAD~3
</code></pre>
<h2 id="gitfetchpullpushremote">Git &quot;fetch&quot;, &quot;pull&quot;, &quot;push&quot;, &quot;remote&quot;</h2>
<hr>
<p><strong>NOTE: You can&apos;t push to non-bare repository if the branches are same on both remote and local server</strong><br>
By default updating the current branch with non-bare repo is denied. If you&apos;re the only user, you can set git config<br>
<code>git config --bool core.bare true</code> and then delete all files except <code>.git</code> in remote.<br>
<a href="http://stackoverflow.com/a/2933656/2092405">http://stackoverflow.com/a/2933656/2092405</a><br>
Some common git urls:</p>
<pre><code class="language-sh">    ssh://[user@]host.xz[:port]/path/to/repo.git/
    git://host.xz[:port]/path/to/repo.git/
    http[s]://host.xz[:port]/path/to/repo.git/
    ftp[s]://host.xz[:port]/path/to/repo.git/
    [user@]host.xz:path/to/repo.git/
    /path/to/repo.git/
    file:///path/to/repo.git/
</code></pre>
<p><code>git pull</code> is basically shorthand for <code>git fetch</code> followed by <code>git merge FETCH_HEAD</code><br>
<code>git fetch</code>: Downlaod new data and branches from remote repository<br>
<code>git push</code>: Push your new branches to remote repository.<br>
<code>git remote</code>: Manage (list, add and delete) remote repository aliases.</p>
<ol>
<li>To push local repository to your server</li>
</ol>
<pre><code class="language-sh">    ## On your server (create a bare repository)
    $$ git init --bare repo.git
    ## On local
    $$ git remote add origin ssh://server/var/www/frontend.git
    $$ git push origin master
    ## After that, use:
    $$ cd /var/www/; git init; git clone frontend.git

    ## or alternative way without bare repository
    ## switch to different branch locally
    ## and then on your server
    $$ git init
    ## from local repository
    $$ git push ssh://server/path/to/git otherBranch
    ## then merge the otherBranch to master in remote repository

    ## Shortcut without switching repository
    $$ git remote add origin ssh://server/path/to/git
    $$ git push origin master:someOtherBranch       ## this push from master to `someOtherBranch`.
</code></pre>
<h5 id="end">END</h5>
<p><em>Source</em>: <a href="https://gist.github.com/eashish93/3eca6a90fef1ea6e586b7ec211ff72a5">eashish93&apos;s gist</a></p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Ghost 1.0.0 ra mắt]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Sau 4 n&#x103;m ph&#xE1;t tri&#x1EC3;n, t&#x1EEB; gi&#x1EEF;a n&#x103;m 2013 &#x111;&#x1EBF;n t&#x1EAD;n th&#xE1;ng 7/2017, cu&#x1ED1;i c&#xF9;ng <em>Ghost</em> c&#x169;ng release &#x111;&#x1B0;&#x1EE3;c phi&#xEA;n b&</p>]]></description><link>https://huynq.net/ghost-1-0-0-released/</link><guid isPermaLink="false">5977f91feddbfe4bb8f2677e</guid><category><![CDATA[ghost]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Wed, 26 Jul 2017 05:00:00 GMT</pubDate><media:content url="https://huynq.net/content/images/2017/07/ghost_logo_big.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://huynq.net/content/images/2017/07/ghost_logo_big.png" alt="Ghost 1.0.0 ra m&#x1EAF;t"><p>Sau 4 n&#x103;m ph&#xE1;t tri&#x1EC3;n, t&#x1EEB; gi&#x1EEF;a n&#x103;m 2013 &#x111;&#x1EBF;n t&#x1EAD;n th&#xE1;ng 7/2017, cu&#x1ED1;i c&#xF9;ng <em>Ghost</em> c&#x169;ng release &#x111;&#x1B0;&#x1EE3;c phi&#xEA;n b&#x1EA3;n stable <a href="https://github.com/TryGhost/Ghost/releases/tag/1.0.0">1.0.0</a>.</p>
<p>M&#xEC;nh ch&#x1EAF;c l&#xE0; m&#x1ED9;t trong nh&#x1EEF;ng ng&#x1B0;&#x1EDD;i d&#xF9;ng <em>Ghost</em> &#x111;&#x1EA7;u ti&#xEA;n &#x1EDF; VN :v Phi&#xEA;n b&#x1EA3;n &#x111;&#x1EA7;u ti&#xEA;n m&#xEC;nh d&#xF9;ng h&#xEC;nh nh&#x1B0; l&#xE0; <code>0.3.0</code> th&#xEC; ph&#x1EA3;i. Sau khi d&#xF9;ng th&#x1EED; <em>Ghost</em> th&#xEC; m&#xEC;nh c&#x169;ng l&#xE0;m &#x111;&#x1B0;&#x1EE3;c 1 theme nho nh&#x1ECF; t&#xEA;n l&#xE0; <em>Rush</em> v&#xE0; b&#xE1;n tr&#xEA;n <a href="https://gumroad.com/l/yJUI/">Gumroad</a>, r&#x1ED3;i sau n&#xE0;y cho l&#xE0;m open source &#x1EDF; <a href="https://github.com/hnq90/rush-ghost">&#x111;&#xE2;y</a>. &#x110;&#x1EE3;t &#x111;&#xF3; <em>Ghost</em> m&#x1EDB;i ra, &#xED;t theme n&#xEA;n c&#x169;ng b&#xE1;n &#x111;&#x1B0;&#x1EE3;c v&#xE0;i ch&#x1EE5;c b&#x1EA3;n :D. Nh&#x1EDD; ti&#x1EC1;n b&#xE1;n theme &#x111;&#xF3; m&#xE0; m&#xEC;nh m&#x1EDB;i c&#xF3; &#x111;&#x1EE7; ti&#x1EC1;n &#x111;&#x1EC3; n&#x103;m nay c&#x1B0;&#x1EDB;i v&#x1EE3; :v.</p>
<p>T&#xED;nh m&#xEC;nh th&#xEC; th&#xED;ch th&#x1EED; nghi&#x1EC7;m nh&#x1EEF;ng c&#xE1;i m&#x1EDB;i, ch&#xED;nh v&#xEC; th&#x1EBF;, m&#x1ED7;i l&#x1EA7;n <em>Ghost</em> c&#xF3; phi&#xEA;n b&#x1EA3;n m&#x1EDB;i l&#xE0; l&#x1EA1;i h&#xE0;o h&#x1EE9;ng upgrade ngay khi c&#xF3; th&#x1EC3;, th&#x1EC9;nh tho&#x1EA3;ng l&#x1EA1;i g&#x1EB7;p l&#x1ED7;i khi migrate v&#xEC; c&#xE1;c phi&#xEA;n b&#x1EA3;n m&#x1EDB;i c&#xF3; <em>&quot;break changes&quot;</em>, v&#xED; d&#x1EE5; nh&#x1B0; t&#x1EEB; <code>0.4</code> l&#xEA;n <code>0.6</code> hay <code>0.7</code> g&#xEC; &#x111;&#xF3;, ho&#x1EB7;c t&#x1EEB; <code>0.11</code> l&#xEA;n b&#x1EA3;n <code>1.0 alpha</code>. C&#xF3; l&#x1EA7;n c&#xF2;n ph&#x1EA3;i export db ra, t&#x1EA1;o app m&#x1EDB;i, chuy&#x1EC3;n d&#x1EEF; li&#x1EC7;u sang app <em>Ghost</em> m&#x1EDB;i th&#x1EE7; c&#xF4;ng. R&#xF5; kh&#x1ED5; =((.</p>
<p>H&#xF4;m nay th&#x1EA5;y c&#xF3; email b&#xE1;o server b&#x1ECB; down, v&#xE0;o check th&#xEC; th&#x1EA5;y c&#xF3; th&#xF4;ng b&#xE1;o <em>Ghost-Cli</em> c&#xF3; version m&#x1EDB;i <code>1.0.0</code> n&#xEA;n m&#x1EDB;i bi&#x1EBF;t l&#xE0; <em>Ghost</em> &#x111;&#xE3; ra <code>1.0.0</code> t&#x1EEB; 3 ng&#xE0;y tr&#x1B0;&#x1EDB;c r&#x1ED3;i. Th&#x1EBF; l&#xE0; bay v&#xE0;o upgrade ngay t&#x1EEB; <code>1.0.0-rc2</code> l&#xEA;n. C&#x1EE9; t&#x1B0;&#x1EDF;ng upgrade ngon l&#xE0;nh, xong l&#x1EA1;i b&#x1ECB; l&#x1ED7;i v&#x1EC1; config c&#x1EE7;a <em>Ghost-Cli</em> @@, ph&#x1EA3;i s&#x1EED;a l&#x1EA1;i file config c&#x1EE7;a <em>Ghost CLI</em> b&#x1EB1;ng tay r&#x1ED3;i m&#x1EDB;i start &#x111;&#x1B0;&#x1EE3;c <em>Ghost</em>.</p>
<p>M&#xE0; th&#xF4;i, n&#xF3;i l&#x1EA3;m nh&#x1EA3;m h&#x1A1;i nhi&#x1EC1;u, m&#x1ECD;i ng&#x1B0;&#x1EDD;i n&#x1EBF;u c&#xF3; ai h&#x1EE9;ng th&#xFA; ho&#x1EB7;c &#x111;ang d&#xF9;ng <em>Ghost</em> phi&#xEA;n b&#x1EA3;n c&#x169; th&#xEC; th&#x1EED; d&#xF9;ng version <code>1.0.0</code> n&#xE0;y xem :D T&#x1EEB; phi&#xEA;n b&#x1EA3;n n&#xE0;y &#x111;&#xE3; c&#xF3; th&#x1EC3; c&#xE0;i &#x111;&#x1EB7;t Ghost d&#x1EC5; d&#xE0;ng h&#x1A1;n b&#x1EB1;ng <a href="https://github.com/TryGhost/Ghost-CLI">Ghost-CLI</a> r&#x1ED3;i.</p>
<p>Ai g&#x1EB7;p v&#x1EA5;n &#x111;&#x1EC1; g&#xEC; v&#x1EDB;i <em>Ghost</em> ho&#x1EB7;c g&#x1EB7;p l&#x1ED7;i khi migrate l&#xEA;n version <code>1.0.0</code>, n&#x1EBF;u c&#x1EA7;n support th&#xEC; c&#x1EE9; contact v&#x1EDB;i m&#xEC;nh nh&#xE9; \m/</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[[Hết hạn] Transfer domain free!!!]]></title><description><![CDATA[Chiều nay mới nhận được email quảng cáo từ nhà cung cấp XXX từ bên nước Anh xa xôi. Đại loại là: Chúng tôi đã phát triển hệ thống transfer domain mới đến nỗi hộc cả máu. Hệ thống mới đó sẽ giú…]]></description><link>https://huynq.net/free-domain-transfer/</link><guid isPermaLink="false">596983ed8613a77f21c388b7</guid><category><![CDATA[domain]]></category><category><![CDATA[free]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Thu, 15 Jun 2017 10:35:00 GMT</pubDate><media:content url="https://huynq.net/content/images/2017/06/2017-06-15_17-32-09.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://huynq.net/content/images/2017/06/2017-06-15_17-32-09.png" alt="[H&#x1EBF;t h&#x1EA1;n] Transfer domain free!!!"><p>Chi&#x1EC1;u nay m&#x1EDB;i nh&#x1EAD;n &#x111;&#x1B0;&#x1EE3;c email qu&#x1EA3;ng c&#xE1;o t&#x1EEB; <a href="https://www.lcn.com/">LCN</a>, &#x111;&#x1EA1;i lo&#x1EA1;i l&#xE0;:</p>
<blockquote>
<p>Ch&#xFA;ng t&#xF4;i &#x111;&#xE3; ph&#xE1;t tri&#x1EC3;n h&#x1EC7; th&#x1ED1;ng transfer domain m&#x1EDB;i &#x111;&#x1EBF;n n&#x1ED7;i h&#x1ED9;c c&#x1EA3; m&#xE1;u. H&#x1EC7; th&#x1ED1;ng m&#x1EDB;i &#x111;&#xF3; s&#x1EBD; gi&#xFA;p cho vi&#x1EC7;c transfer domain c&#x1EE7;a b&#x1EA1;n sang h&#x1EC7; th&#x1ED1;ng c&#x1EE7;a ch&#xFA;ng t&#xF4;i nhanh h&#x1A1;n, d&#x1EC5; d&#xE0;ng h&#x1A1;n, gi&#xE1; r&#x1EBB; h&#x1A1;n so v&#x1EDB;i tr&#x1B0;&#x1EDB;c &#x111;&#xE2;y.<br>
Ch&#xED;nh v&#xEC; th&#x1EBF;, t&#x1EEB; gi&#x1EDD; cho &#x111;&#x1EBF;n h&#x1EBF;t th&#xE1;ng n&#xE0;y, m&#x1ECD;i domain <code>.com, .net, .org</code> transfer sang ch&#x1ED7; ch&#xFA;ng t&#xF4;i s&#x1EBD; &#x111;&#x1EC1;u &#x111;&#x1B0;&#x1EE3;c free h&#x1EBF;t.</p>
</blockquote>
<p><img src="https://huynq.net/content/images/2017/06/2017-06-15_16-53-57.png" alt="[H&#x1EBF;t h&#x1EA1;n] Transfer domain free!!!" loading="lazy"></p>
<p>C&#xE1;ch &#x111;&#xE2;y 3 n&#x103;m m&#xEC;nh c&#x169;ng c&#xF3; thu&#xEA; hosting &#x1EDF; LCN t&#x1EA7;m 1 n&#x103;m, th&#x1EA5;y d&#xF9;ng c&#x169;ng t&#x1EA1;m &#x1ED5;n. M&#x1ED7;i t&#x1ED9;i trang qu&#x1EA3;n l&#xFD; nh&#xEC;n ch&#xE1;n qu&#xE1; &#x1F605; Nh&#x1B0;ng ch&#x1EAF;c &#x111;&#x1EE1; c&#x1EE7; chu&#x1ED1;i h&#x1A1;n P-&quot;X&quot; n&#xE0;o &#x111;&#xF3; c&#x1EE7;a Vi&#x1EC7;t Nam &#x1F612;</p>
<p>&#x110;&#x1EC3; transfer domain sang LCN, anh em l&#xE0;m nh&#x1B0; sau:</p>
<ol>
<li>
<p>Truy c&#x1EAD;p v&#xE0;o trang <em>Transfer Domains</em> c&#x1EE7;a LCN t&#x1EA1;i <a href="https://www.lcn.com/domain-names/transfers">&#x111;&#xE2;y</a>.</p>
</li>
<li>
<p>Nh&#x1EAD;p domain v&#xE0;o &#xF4; <em>How many domains would you like to transfer?</em>.<br>
<img src="https://huynq.net/content/images/2017/06/2017-06-15_17-21-15.png" alt="[H&#x1EBF;t h&#x1EA1;n] Transfer domain free!!!" loading="lazy"></p>
</li>
<li>
<p>Nh&#x1EAD;p coupon sau v&#xE0;o &#xF4; <em>Promo Code</em>.<br>
<strong>FREETRANSFER</strong></p>
</li>
<li>
<p>Thanh to&#xE1;n v&#xE0; &#x111;&#x1EE3;i 1 ho&#x1EB7;c 2 ng&#xE0;y, sau khi domain &#x111;&#x1B0;&#x1EE3;c chuy&#x1EC3;n v&#x1EC1; LCN th&#xEC; s&#x1EBD; t&#x1EF1; &#x111;&#x1ED9;ng &#x111;&#x1B0;&#x1EE3;c gia h&#x1EA1;n th&#xEA;m 1 n&#x103;m n&#x1EEF;a &#x1F911;&#x1F911;&#x1F911;</p>
</li>
</ol>
<p><strong>Ch&#xFA; &#xFD;</strong></p>
<ul>
<li>Domain ph&#x1EA3;i &#x111;&#x1B0;&#x1EE3;c unlock th&#xEC; m&#x1EDB;i transfer &#x111;&#x1B0;&#x1EE3;c.</li>
<li>M&#x1ED7;i account ch&#x1EC9; &#x111;&#x1B0;&#x1EE3;c s&#x1EED; d&#x1EE5;ng coupon 1 l&#x1EA7;n, kh&#xF4;ng bi&#x1EBF;t t&#x1EA1;o nhi&#x1EC1;u account c&#xF3; v&#x1EA5;n &#x111;&#x1EC1; g&#xEC; kh&#xF4;ng??? &#x1F60E;</li>
<li>Coupon s&#x1EBD; h&#x1EBF;t h&#x1EA1;n v&#xE0;o l&#xFA;c: 23:59 ng&#xE0;y 30/06/17.</li>
</ul>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Download 320Kbps song from mp3.zing.vn]]></title><description><![CDATA[<!--kg-card-begin: markdown--><pre><code>#!/bin/sh
songId=$1

parseJson () {
  python -c &quot;import json,sys;sys.stdout.write(json.dumps(json.load(sys.stdin)$1))&quot;;
}

fetch () {
  local output=`wget -q --method GET --progress=dot --output-document - http://api.mp3.zing.vn/api/mobile/song/getsonginfo?requestdata={\&quot;id\&quot;:\&quot;$songId\&quot;}`
  local</code></pre>]]></description><link>https://huynq.net/download-320kbps-song-from-mp3-zing-vn/</link><guid isPermaLink="false">596983ed8613a77f21c388b6</guid><category><![CDATA[bash]]></category><category><![CDATA[shell]]></category><category><![CDATA[linux]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Fri, 07 Apr 2017 08:38:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><pre><code>#!/bin/sh
songId=$1

parseJson () {
  python -c &quot;import json,sys;sys.stdout.write(json.dumps(json.load(sys.stdin)$1))&quot;;
}

fetch () {
  local output=`wget -q --method GET --progress=dot --output-document - http://api.mp3.zing.vn/api/mobile/song/getsonginfo?requestdata={\&quot;id\&quot;:\&quot;$songId\&quot;}`
  local link=$(echo $output | parseJson &quot;[&apos;source&apos;][&apos;320&apos;]&quot;)
  local artist=$(echo $output | parseJson &quot;[&apos;artist&apos;]&quot;)
  local title=$(echo $output | parseJson &quot;[&apos;title&apos;]&quot;)

  link=&quot;${link%\&quot;}&quot;
  link=&quot;${link#\&quot;}&quot;
  title=&quot;${title%\&quot;}&quot;
  title=&quot;${title#\&quot;}&quot;
  artist=&quot;${artist%\&quot;}&quot;
  artist=&quot;${artist#\&quot;}&quot;
  
  local fileName=`echo &quot;$(echo -e $title)_$(echo -e $artist)_320kbps&quot;`

  wget --method GET \
    --header &apos;cache-control: no-cache&apos; \
    --output-document=&quot;$fileName.mp3&quot; \
    - $link
}

fetch
</code></pre>
<p>Source: <a href="https://gist.github.com/hnq90/38eaa792ad1f19df6f88345477c5badb">https://gist.github.com/hnq90/38eaa792ad1f19df6f88345477c5badb</a></p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Crying Out Love, In the Center of the World - 世界の中心で、愛をさけぶ]]></title><description><![CDATA[<!--kg-card-begin: markdown--><iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/7Qzerr3I_JQ?ecver=1" frameborder="0" allowfullscreen></iframe>
*&#x304B;&#x305F;&#x3061;&#x3042;&#x308B;&#x3082;&#x306E; - Katachi aru mono*
<blockquote>
<p>Ch&#x1B0;a phim n&#xE0;o &#x111;em l&#x1EA1;i cho t&#xF4;i m&#x1ED9;t c&#x1EA3;m gi&#xE1;c d&#x1ECB;u d&#xE0;ng nh&#x1B0; <em>Sekaichuu</em>. V&#x1EDB;i c&#x1ED1;</p></blockquote>]]></description><link>https://huynq.net/sekai-no-chuushin-de-ai-wo-sakebu/</link><guid isPermaLink="false">596983ed8613a77f21c388b5</guid><category><![CDATA[film]]></category><category><![CDATA[jdrama]]></category><dc:creator><![CDATA[Huy Nguyen Quang]]></dc:creator><pubDate>Tue, 14 Mar 2017 17:09:00 GMT</pubDate><media:content url="https://huynq.net/content/images/2017/03/25488.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/7Qzerr3I_JQ?ecver=1" frameborder="0" allowfullscreen></iframe>
*&#x304B;&#x305F;&#x3061;&#x3042;&#x308B;&#x3082;&#x306E; - Katachi aru mono*
<blockquote>
<img src="https://huynq.net/content/images/2017/03/25488.jpg" alt="Crying Out Love, In the Center of the World - &#x4E16;&#x754C;&#x306E;&#x4E2D;&#x5FC3;&#x3067;&#x3001;&#x611B;&#x3092;&#x3055;&#x3051;&#x3076;"><p>Ch&#x1B0;a phim n&#xE0;o &#x111;em l&#x1EA1;i cho t&#xF4;i m&#x1ED9;t c&#x1EA3;m gi&#xE1;c d&#x1ECB;u d&#xE0;ng nh&#x1B0; <em>Sekaichuu</em>. V&#x1EDB;i c&#x1ED1;t truy&#x1EC7;n d&#x1EC5; g&#x1EB7;p (v&#xE0; d&#x1EC5; &#x111;o&#xE1;n): m&#x1ED9;t m&#x1ED1;i t&#xEC;nh trung h&#x1ECD;c &#x111;&#x1EB9;p nh&#x1B0;ng dang d&#x1EDF;, th&#x1EBF; nh&#x1B0;ng nh&#x1EEF;ng g&#xEC; Sekaichu mang l&#x1EA1;i c&#xF2;n nhi&#x1EC1;u h&#x1A1;n s&#x1EF1; n&#x1ED1;i ti&#x1EBF;c hay n&#x1ED7;i bu&#x1ED3;n, m&#xE0; &#x111;&#xF3; l&#xE0; nh&#x1EEF;ng ni&#x1EC1;m vui, n&#x1EE5; c&#x1B0;&#x1EDD;i, s&#x1EF1; quan t&#xE2;m &#x1EA5;m &#xE1;p c&#x1EE7;a gia &#x111;&#xEC;nh, s&#x1EF1; th&#x1B0;&#x1A1;ng y&#xEA;u c&#x1EE7;a th&#x1EA7;y c&#xF4;, v&#xE0; t&#xEC;nh b&#x1EA1;n trong s&#xE1;ng c&#x1EE7;a tu&#x1ED5;i h&#x1ECD;c tr&#xF2;.</p>
</blockquote>
<blockquote>
<p><em>Aki</em> v&#xE0; <em>Saku</em> y&#xEA;u nhau khi hai ng&#x1B0;&#x1EDD;i m&#x1B0;&#x1EDD;i b&#x1EA3;y tu&#x1ED5;i. <em>Aki</em> m&#x1EA5;t n&#x103;m 17 tu&#x1ED5;i. Hai c&#xE2;u &#x111;&#x1A1;n gi&#x1EA3;n l&#xE0; &#x111;&#x1EE7; &#x111;&#x1EC3; t&#xF3;m t&#x1EAF;t cho to&#xE0;n b&#x1ED9; phim, th&#x1EBF; nh&#x1B0;ng &#x111;&#xE2;u l&#xE0; &#x111;i&#x1EC3;m &#x111;&#x1EB7;c bi&#x1EC7;t &#x111;&#x1EC3; t&#xF4;i kh&#xF3;c c&#x1B0;&#x1EDD;i su&#x1ED1;t 11 t&#x1EAD;p phim?</p>
</blockquote>
<blockquote>
<p>Source: <a href="http://yuuki100.blogspot.com/2010/12/tieng-goi-tinh-yeu-giua-long-gioi.html">&#x52C7;&#x6C17;100% Blog</a></p>
</blockquote>
<p>Th&#x1EA5;y phim n&#xE0;y hay qu&#xE1; n&#xEA;n reup l&#x1EA1;i h&#x1ED3;i 5 n&#x103;m tr&#x1B0;&#x1EDB;c, h&#xF4;m nay t&#x1EF1; d&#x1B0;ng nh&#xEC;n th&#x1EA5;y t&#x1EDD; b&#xEC;a tr&#x1B0;&#x1EDB;c c&#x1EE7;a s&#xE1;ch (<em>Socrates in Love</em>) n&#xEA;n share l&#x1EA1;i.</p>
<p><em>&quot;Socrates in Love&quot;</em> l&#xE0; t&#xEA;n truy&#x1EC7;n, c&#xF2;n <em>&quot;Crying Out Love, In the Center of the World (&#x4E16;&#x754C;&#x306E;&#x4E2D;&#x5FC3;&#x3067;&#x3001;&#x611B;&#x3092;&#x3055;&#x3051;&#x3076;, Sekai no Ch&#x16B;shin de, Ai o Sakebu)&quot;</em> l&#xE0; t&#xEA;n phim. C&#xE1; nh&#xE2;n m&#xEC;nh th&#xED;ch phim h&#x1A1;n truy&#x1EC7;n, m&#x1ED9;t ph&#x1EA7;n l&#xE0; v&#xEC; truy&#x1EC7;n di&#x1EC5;n bi&#x1EBF;n nhanh h&#x1A1;n phim, &#x111;&#x1ECD;c truy&#x1EC7;n kh&#xF4;ng &#x111;&#x1EC3; l&#x1EA1;i nhi&#x1EC1;u c&#x1EA3;m x&#xFA;c l&#x1EAF;m. M&#x1ED9;t ph&#x1EA7;n kh&#xE1;c l&#xE0; m&#xEC;nh th&#xED;ch <em>Haruka Ayase (Aki)</em> t&#x1EEB; phim <em>&quot;Cyborg She&quot; (Cyborg Girl, &#x50D5;&#x306E;&#x5F7C;&#x5973;&#x306F;&#x30B5;&#x30A4;&#x30DC;&#x30FC;&#x30B0;, Boku no Kanojo wa Saib&#x14D;gu)</em> <strong>YNWIM</strong> :v</p>
<p>Nh&#x1EA1;c phim <em>Cyborg She</em> c&#x169;ng b&#xE0;i hay l&#x1EAF;m, m&#x1EB7;c d&#xF9; kh&#xF4;ng hi&#x1EC3;u l&#x1EAF;m nh&#x1B0;ng &#x111;o&#x1EA1;n Jiro &#x111;&#x1B0;&#x1EE3;c quay l&#x1EA1;i n&#x1A1;i m&#xEC;nh &#x1EDF; ng&#xE0;y x&#x1B0;a, nh&#x1EA1;c b&#xE0;i n&#xE0;y vang l&#xEA;n nghe v&#x1EAB;n r&#x1EA5;t c&#x1EA3;m &#x111;&#x1ED9;ng.</p>
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/J1EMAv4vuGY?ecver=1" frameborder="0" allowfullscreen></iframe>
*Yamaoku sh&#x14D;nen no koi monogatari - &#x5C71;&#x5965;&#x5C11;&#x5E74;&#x306E;&#x604B;&#x7269;&#x8A9E;*
<p>Xem 11 t&#x1EAD;p + t&#x1EAD;p &#x110;B c&#x1EE7;a phim <code>Crying Out Love, In the Center of the World</code> &#x1EDF; &#x111;&#xE2;y nh&#xE9;:</p>
<script src="https://gist.github.com/hnq90/bc148109fd3a715cc7aea0067c32de89.js"></script><!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>