<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rifki (Kubid) Fauzi on Medium]]></title>
        <description><![CDATA[Stories by Rifki (Kubid) Fauzi on Medium]]></description>
        <link>https://medium.com/@kubid?source=rss-c2cf4e82cdf7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*93MBevPI3Evfsl4J2j6i0g.jpeg</url>
            <title>Stories by Rifki (Kubid) Fauzi on Medium</title>
            <link>https://medium.com/@kubid?source=rss-c2cf4e82cdf7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 10:39:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kubid/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Improve existing manga reader website by scraping and modifying the DOM with nodejs]]></title>
            <link>https://kubid.medium.com/improve-existing-manga-reader-website-by-scraping-and-modifying-the-dom-with-nodejs-a82ee8b098b7?source=rss-c2cf4e82cdf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/a82ee8b098b7</guid>
            <category><![CDATA[axios]]></category>
            <category><![CDATA[express]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[manga]]></category>
            <category><![CDATA[scraping]]></category>
            <dc:creator><![CDATA[Rifki (Kubid) Fauzi]]></dc:creator>
            <pubDate>Thu, 01 Apr 2021 03:20:43 GMT</pubDate>
            <atom:updated>2021-04-01T03:20:43.206Z</atom:updated>
            <content:encoded><![CDATA[<p>I stumble across a manga reader website called <a href="https://ww7.readsnk.com/">readsnk.com</a>, while reading manga on it, I experience a minor buggy user experience. for example, when I open the website, it loads all the images simultaneously and not displayed sequentially.</p><p>Since the images are not loaded sequentially.. the 30th page can be loaded first then the first page loaded at the end. based on this problem I decided to make a clone of this website.</p><p>My approach is to scrape the HTML using HTTP request, modify the HTML by adding native browser lazy loading image, and serve the modified HTML to the client (browser). stack I use are nodejs, express &amp; Axios</p><blockquote>TL;DR compare <a href="https://readsnk.herokuapp.com/">improved manga reader</a> vs <a href="https://ww7.readsnk.com/">original</a></blockquote><p><strong>Scraping the page using Axios</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l7K7zo7jYP7aCIaDrcDBvQ.png" /></figure><p><strong>Modifying HTML DOM using regex</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ydA73KffhxMit_R8zN_HhA.png" /></figure><p>you can use a dom parser like <a href="https://cheerio.js.org/">cheerio</a> in node js, but it’s overkill for a small project like this, as you can see in the image above. I made 4 changes to the DOM.</p><pre>.replace(/&lt;img/g, &quot;&lt;img loading=\&quot;lazy\&quot; width=\&quot;1600\&quot; height=\&quot;1124\&quot;&quot;)</pre><p>for appending loading=lazy to all &lt;img/&gt; tag, you must notice that loading=lazy will not work unless you set the width and height , by adding this attribute the browser will load images inside your browser viewport.</p><pre>.replace(/href<strong>\=\&quot;\/</strong>css/g, &#39;href=&quot;https://ww7.readsnk.com/css&#39;)</pre><pre>.replace(/src<strong>\=\&quot;\/</strong>js/g, &#39;href=&quot;https://ww7.readsnk.com/js&#39;)</pre><p>replacing all tag attributes containing href and srcfromrelative path to absolute path.</p><blockquote>you can check the demo and source code here: <a href="https://github.com/kubido/better-readsnk">source</a> <a href="https://readsnk.herokuapp.com/">demo</a></blockquote><p>I also add Redis caching to the app, I’ll write about it in the next post.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a82ee8b098b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stupid easy deploy golang app in ubuntu server with nginx]]></title>
            <link>https://kubid.medium.com/stupid-easy-deploy-golang-app-in-ubuntu-server-with-nginx-c0ef10f06894?source=rss-c2cf4e82cdf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0ef10f06894</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[deploy]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Rifki (Kubid) Fauzi]]></dc:creator>
            <pubDate>Sat, 08 Aug 2020 12:45:32 GMT</pubDate>
            <atom:updated>2020-08-08T12:45:32.275Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m curious about deploying golang in ubuntu server, since with go you can compile your application with go build main.go and it will create an executable file. so all you need to do to run your app is by calling the compiled app by executing ./main</p><p>you can deploy your app using a systemctl services, containerize your app with docker. but is there any easy way to just up and run your golang app in production ? yes.. the step is very easy.. all you need is:</p><ol><li>run your app in background.</li><li>use nginx to bind your domain to your server. that’s it.</li></ol><p>of course, this is not a best practice.. this method used only for fun.. you want your application up and run in matter of seconds. let’s breakdown the steps.</p><p><strong>STEPS</strong></p><ol><li><strong>./main&amp; </strong>it means by adding &amp; at the end, your application will run in the background. but still attached to the current terminal session, so when you quit your ssh connection. the process will be terminated. if you run multiple background command you can type jobs in your terminal then it will display all your background process.</li><li><strong>disown</strong> I use disown to detach the process from the terminal session, from the documentation disown command still attached to the terminal session, but somehow. mine is working.</li><li><strong>best practice, use </strong><strong>nohup instead of </strong><strong>disown , </strong>eg: nohup ./main &amp;</li><li><strong>setup nginx</strong> using proxy forwarding, since my app running on port 2001, here is my configuration</li></ol><pre>server {<br>    listen 80;<br>    server_name <strong>mydomain.com</strong>;</pre><pre>location / {<br>        proxy_pass <a href="http://127.0.0.1:8905/">http://127.0.0.1:<strong>2</strong></a><strong>001</strong>;<br>        proxy_set_header Host $host;<br>        proxy_set_header X-Real-IP $remote_addr;<br>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>        proxy_set_header X-Forwarded-Proto $scheme;<br>    }<br>}</pre><p>that’s it, I can access my trough my domain.. in this example is mydomain.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0ef10f06894" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Svelte custom build HTML template with a hashed bundle name]]></title>
            <link>https://kubid.medium.com/svelte-custom-build-html-template-with-a-hashed-bundle-name-f05e701d73dd?source=rss-c2cf4e82cdf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/f05e701d73dd</guid>
            <category><![CDATA[svelte-custom-html]]></category>
            <category><![CDATA[rollup]]></category>
            <category><![CDATA[svelte]]></category>
            <category><![CDATA[hashed-bundle]]></category>
            <category><![CDATA[hashed-bundle-filename]]></category>
            <dc:creator><![CDATA[Rifki (Kubid) Fauzi]]></dc:creator>
            <pubDate>Sat, 27 Jun 2020 05:26:00 GMT</pubDate>
            <atom:updated>2020-06-27T05:26:00.493Z</atom:updated>
            <content:encoded><![CDATA[<h3>Svelte custom build HTML template with a hashed bundle filename</h3><p>When building a static site with default svelte template, You may be facing some caching issue from the client-side caused by the static bundle name bundle.js generated by default rollup config.</p><p>The user might not see the latest update from your app because in general browser will cache all the assets in our site (js, css, etc) in this case when we update our site if we didn&#39;t change the bundle javascript filename user need to force refresh our site using command + shift+R, but the problem is not all users know that method.</p><p>so what&#39;s the solution? we need to force invalidating our javascript bundle by appending a hashed file name. from bundle.js to bundle.293814cv.js , by doing this we let the browser use the newest bundle file.</p><p>to achieve this we need to configure our rollup config by adding @rollup/plugins-html to install just use npm i -D @rollup/plugins-html</p><p>in your rollup.config.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sbHC-UvdWi4j_sRKUK0JwA.png" /><figcaption>rollup.config.js</figcaption></figure><p>your htmlOptions look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5YjK0vXKOcbwJyAULnBWNA.png" /></figure><p>and done, when you run npm run build your Html build will be using the hashed filename. you can check my gist <a href="https://gist.github.com/kubido/25cbe71117909ca9dc23058fb0042592">here</a> for complete configuration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f05e701d73dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrading old Rails 4.0 to Rails 6 with webpacker and React]]></title>
            <link>https://kubid.medium.com/upgrading-old-rails-4-0-to-rails-6-with-webpacker-and-rails-280313235bb4?source=rss-c2cf4e82cdf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/280313235bb4</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[react-rails-gem]]></category>
            <category><![CDATA[rails-upgrade]]></category>
            <category><![CDATA[webpacker]]></category>
            <dc:creator><![CDATA[Rifki (Kubid) Fauzi]]></dc:creator>
            <pubDate>Wed, 03 Jun 2020 03:45:22 GMT</pubDate>
            <atom:updated>2020-06-03T04:05:27.629Z</atom:updated>
            <content:encoded><![CDATA[<h3>Upgrading old Rails 4.0 to Rails 6 with webpacker and React.js</h3><p>It has been a while since I worked with ruby on rails… for the past couple of years, my main focus programming language is javascript. Node.js in the backend, and React on the frontend. so let’s start how we update our old rails app into the latest Rails app with React.</p><h3><strong>1. Upgrading Rails</strong></h3><p>update your rails version inside Gemfile:</p><pre>gem &#39;rails&#39;, &#39;~&gt; 6.0&#39;</pre><p>and run bundle update rails</p><h3>2. Setup Webpacker</h3><p>In your Gemfile</p><pre># Gemfile<br>gem &#39;webpacker&#39;, &#39;~&gt; 5.x&#39;</pre><p>then run:</p><pre>bundle &amp;&amp; bundle exec rails webpacker:install</pre><p>Once your webpacker is setup. you are ready to put the bundle pack, you can say a pack is the entry point of your main js file. so all the js file required by rails views should be put inside packsfolder. and put inside your views /layouts/application.html.erb</p><pre>&lt;%= javascript_pack_tag &#39;application&#39; %&gt;</pre><p>by default, this will refer to /app/javascript/packs/application.js, you can change this path inside webpacker.yml by changing the source_entry_path</p><h3>3. Setup React with Webpacker</h3><p>initialize react application with webpacker :</p><pre>rails webpacker:install:react</pre><p>it will install all related dependency using <a href="https://yarnpkg.com/">yarn</a></p><h3>4. Build your React Component</h3><p>I prefer to mount all my component into a single div, so I put empty div inside my /layouts/application.html.erb</p><pre>&lt;div id=&quot;root&quot;&gt;&lt;/div&gt;</pre><p>then inside my packs/application.js</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/32c6f1007f9f412890d59859a55ffaa9/href">https://medium.com/media/32c6f1007f9f412890d59859a55ffaa9/href</a></iframe><p>Done, and you ready to go build your React app inside Ruby on rails application</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=280313235bb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bagaimana memulai trading saham ?]]></title>
            <link>https://kubid.medium.com/bagaimana-memulai-trading-saham-646aee31333e?source=rss-c2cf4e82cdf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/646aee31333e</guid>
            <category><![CDATA[memulai-trading]]></category>
            <category><![CDATA[mulai-bermain-saham]]></category>
            <category><![CDATA[shame]]></category>
            <category><![CDATA[trading-saham]]></category>
            <dc:creator><![CDATA[Rifki (Kubid) Fauzi]]></dc:creator>
            <pubDate>Fri, 11 Aug 2017 04:28:28 GMT</pubDate>
            <atom:updated>2017-08-17T13:46:38.198Z</atom:updated>
            <content:encoded><![CDATA[<p>Bagi anda yang sedang mencari cara baru untuk berinvestasi, investasi di pasar modal adalah salah satu solusinya. bagi orang awam (seperti saya) yang minim informasi tentang pasar modal, mungkin tidak tahu bagaimana cara memulai nya. dalam postingan ini saya akan berbagi cerita, pengalaman saya memulai trading saham.</p><ol><li><strong>Mencari tahu, </strong>Yang pertama kali anda harus lakukan adalah mencari tahu bagaimana pasar modal itu bekerja. klik <a href="https://www.sahamok.com/pasar-modal/">link berikut</a> untuk mengetahui apa itu pasar modal beserta istilah-istilah yang akan anda sering dengar nantinya.</li><li><strong>Simulasi,</strong> Mulai lah dengan yang namanya “Paper trading”, paper trading adalah sebuah simulasi trading saham (trading saham bohongan) anda bisa melakukan nya manual yaitu dengan mencatat saham yang anda beli di sebuah kertas / catatan digital. atau bisa menggunakan website penyedia jasa paper trading. (silahkan cari di google dengan keyword “paper trading app”)</li><li><strong>Mengenal Sekuritas</strong>, setelah anda mulai terbiasa dengan naik turun nya harga saham yang anda beli dalam beberapa lembar kertas, jika anda sudah siap maka langkah selanjutnya adalah mendaftarkan ke bank investasi atau yang sering kita dengar dengan istilah sekuritas. beberapa diantaranya adalah Ciptadana, Danareksa, Indopremier. dan beberapa bank konvensional memiliki perusahaan sekuritas semisal Mandiri Sekuritas, BCA Sekuritas.</li><li><strong>Memilih Sekuritas, </strong>tidak semua sekuritas cocok bagi anda. kenapa ? karena setiap sekuritas mematok minimal deposit untuk membuka rekening. ada yang minimal nya 10 juta bahkan sampai 100 juta. tapi tidak sedikit juga yang cuma ratusan ribu. selain dari sisi deposit., fee buy/sell pun berbeda-beda (biaya yang harus anda bayar ketika membeli/menjual saham). sekuritas yang saya pilih adalah danareksa, tahun 2013 saya mendaftar minimal Rp. 5 juta. uang deposit ini bisa and gunakan untuk membeli saham seluruhnya.</li><li><strong>Mendaftar akun di sekuritas, </strong>pengalaman saya waktu mendaftar di danareksa yang pertama kali dilakukan adalah mengisi formulir online di web nya. setelah mendaftar online kemudian pihak dari danareksa akan menelepon untuk membuat janji ketemu. dan dalam waktu 2–4 hari akan ada orang yang datang membawa dokumen untuk anda isi. jadi tidak repot :) dokumen ini berisikan pembukaan rekening di danareksa dan rekening dana investasi di BCA (setiap sekuritas bisa beda bank untuk RDI/Rekening Dana Investasi)</li><li><strong>Topup</strong>, deposit awal sudah ada di akun trading anda, untuk deposit anda di haruskan mentransfer ke akun RDI anda (punya saya di BCA) nanti akan otomatis masuk ke akun Sekuritas anda.</li></ol><p>Kira-kira begitu tahapan untuk memulai trading saham di pasar modal, kalau ada yang terlewat atau ada yang ingin di tanyakan silahkan isi kolom komentar.</p><p>berikut dashboard akun danareksa online</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*DceHVE6BkRsXraZebe_HYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WTieV9F7lF3jqOTUjhOT9g.png" /></figure><p>terima kasih</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=646aee31333e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>