<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>fsylum.net</title><link>https://fsylum.net/</link><description>Recent content on fsylum.net</description><generator>Hugo</generator><language>en</language><managingEditor>firdaus@fsylum.net (Firdaus Zahari)</managingEditor><webMaster>firdaus@fsylum.net (Firdaus Zahari)</webMaster><lastBuildDate>Thu, 25 Dec 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://fsylum.net/index.xml" rel="self" type="application/rss+xml"/><item><title>2025 Recap</title><link>https://fsylum.net/blog/2025-recap/</link><pubDate>Thu, 25 Dec 2025 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/2025-recap/</guid><description>&lt;p>Before I start, I want to take a step back and revisit the goals that I set for myself at the end of 2024. I said my goals were to:&lt;/p>
&lt;ul>
&lt;li>Level up my technical proficiency in modern JS stack, focusing on React and TypeScript.&lt;/li>
&lt;li>Complete and launch the side project that I&amp;rsquo;ve been working on all year.&lt;/li>
&lt;/ul>
&lt;p>Now looking back at these goals, I can say that I achieved this. I believe that I am fairly competent and productive on both React and TypeScript even though my preference for backend stack is still PHP with either Laravel or WordPress. That said, I had lots of learning opportunity when working on &lt;a href="https://kanbatte.com">Kanbatte&lt;/a>. This is totally a separate side project that I am using internally.&lt;/p></description></item><item><title>Override Laravel Fortify Status Response</title><link>https://fsylum.net/blog/override-laravel-fortify-status-response/</link><pubDate>Thu, 18 Dec 2025 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/override-laravel-fortify-status-response/</guid><description>&lt;p>I recently started a new Laravel project using the latest React starter kits. Out of the box, it is using Laravel Fortify to power the authentication functionality. On the older version, the related controllers are published to your &lt;code>app&lt;/code> directory so any modifications are pretty straightforward to do.&lt;/p>
&lt;p>In the latest version, most of it are abstracted and customisation is only available via &lt;code>FortifyServiceProvider&lt;/code>.&lt;/p>
&lt;p>For some reason, the &lt;code>status&lt;/code> response returned once the app sent the email verification notification is &lt;code>verification-link-sent&lt;/code>. It will then be checked in the template and a human-readable version will be displayed to the user instead. This is contrary on how the rest of the templates in starter kits work, so I would like to keep it consistent.&lt;/p></description></item><item><title>Resolving Specific Hosts to Different IPs with cURL</title><link>https://fsylum.net/blog/resolving-hosts-to-different-ips-with-curl/</link><pubDate>Sun, 05 Oct 2025 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/resolving-hosts-to-different-ips-with-curl/</guid><description>&lt;p>I just recently finished working on a big migration project recently where we are switching from one DNS provider to another. Since it involved a large number of URLs, I needed to make sure once the DNS is switched, all URLs would still work as expected.&lt;/p>
&lt;p>To ensure the migration went smoothly, I implemented a few tests, including a crawl script to check the HTTP status codes of the most visited URLs.&lt;/p></description></item><item><title>Ignoring Specific Commits From Git Blame</title><link>https://fsylum.net/blog/ignoring-specific-commits-from-git-blame/</link><pubDate>Tue, 05 Aug 2025 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/ignoring-specific-commits-from-git-blame/</guid><description>&lt;p>Starting from version 2.23, Git added the ability in the config to specify a file where you can list out all the commits or revisions that should be ignored when you are running &lt;code>git blame&lt;/code>.&lt;/p>
&lt;p>This is particularly useful if you want to exclude specific commits that have no direct impact on the code, such as formatting changes. For example, in every new Laravel install that I have, I will always format the codebase against my own configuration of &lt;a href="https://laravel.com/docs/pint">Laravel Pint&lt;/a> and &lt;a href="https://getrector.com/">Rector&lt;/a>.&lt;/p></description></item><item><title>2024 Recap</title><link>https://fsylum.net/blog/2024-recap/</link><pubDate>Wed, 25 Dec 2024 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/2024-recap/</guid><description>&lt;p>2024 has been quite a joyride, there were lots of ups and downs, and hey, I survived for another year. It&amp;rsquo;s been pretty eventful at work, a culmination of three months of work to upgrade a massive backend system including PHP version jump from 7.4 to 8.0 ended up with relative success.&lt;/p>
&lt;p>The said side project that I mentioned for the previous year is not quite finished, but I got the core functionality in place, so just need to finish &lt;a href="https://en.wikipedia.org/wiki/Ninety%E2%80%93ninety_rule">the last 10%&lt;/a> of it.&lt;/p></description></item><item><title>Customising Password Reset Email Notification in Laravel</title><link>https://fsylum.net/blog/customising-password-reset-email-notification-laravel/</link><pubDate>Fri, 15 Nov 2024 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/customising-password-reset-email-notification-laravel/</guid><description>&lt;p>Recently, I was looking for a simple way to customise the subject and email content of password reset email notification that is included with Laravel. A quick Internet search yielded a &lt;a href="https://laracasts.com/discuss/channels/laravel/change-password-reset-email-in-laravel-breeze">few&lt;/a> &lt;a href="https://laraveldaily.com/post/laravel-breeze-user-name-auth-email-templates">result&lt;/a>, but most of them recommend overriding &lt;code>sendPasswordResetNotification&lt;/code> method and use your own &lt;code>Notification&lt;/code> class.&lt;/p>
&lt;p>In fact, this is also the method recommended in the &lt;a href="https://laravel.com/docs/11.x/passwords#password-customization">official Laravel documentation&lt;/a>.&lt;/p>
&lt;p>However, there&amp;rsquo;s an easier way; by extending the default &lt;code>Illuminate\Auth\Notifications\PasswordReset&lt;/code> via the &lt;code>toMailUsing&lt;/code> method, similar to what is recommended to customise the verification email as mentioned in &lt;a href="https://laravel.com/docs/11.x/verification#customization">the documentation&lt;/a>.&lt;/p></description></item><item><title>A Simple Utility Function to Switch PHP Version in Zsh</title><link>https://fsylum.net/blog/simple-php-switching-zsh-function/</link><pubDate>Thu, 14 Mar 2024 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/simple-php-switching-zsh-function/</guid><description>&lt;p>I am working on various PHP-based projects that have different version requirements, for both work and side projects. &lt;a href="https://brew.sh/">Homebrew&lt;/a> is actually great for this as it allows you to install more than one version of PHP on MacOS. You can then to switch the PHP version easily via &lt;code>brew unlink&lt;/code> and &lt;code>brew link&lt;/code> but over time, this can become tedious.&lt;/p>
&lt;p>&lt;strong>Quick note&lt;/strong>: We can use &lt;a href="https://github.com/shivammathur/homebrew-php">shivammathur/homebrew-php&lt;/a> to install any PHP older than 8.0.&lt;/p></description></item><item><title>Rector Upgrade Rules for WordPress</title><link>https://fsylum.net/blog/rector-upgrade-rules-for-wordpress/</link><pubDate>Fri, 26 Jan 2024 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/rector-upgrade-rules-for-wordpress/</guid><description>&lt;p>I&amp;rsquo;ve recently released a new package for &lt;a href="https://getrector.com/">Rector&lt;/a> that allows you to automatically refactor and upgrade your WordPress codebase to the specified version that you want. Currently, it supports up from version 0.71(!) all the way to the latest WordPress 6.4.&lt;/p>
&lt;p>It is very easy to get started. If you already incorporate Rector into your workflow, you are already halfway there. If you don&amp;rsquo;t, then I suggest you to look at [the documentation] for instructions..&lt;/p></description></item><item><title>2023 Recap</title><link>https://fsylum.net/blog/2023-recap/</link><pubDate>Fri, 15 Dec 2023 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/2023-recap/</guid><description>&lt;p>2023 has been a year of stability for me. I survived my second year at Human Made, which should amount to something. Work-wise, I&amp;rsquo;ve been more comfortable in my role, the still-new environment and feel extremely lucky to still be here despite some up and down in the company.&lt;/p>
&lt;p>For the rest of the year, I&amp;rsquo;ve been trying to upskill myself whenever I have time. Looking back at the goals I&amp;rsquo;ve set for myself in the last year recap,&lt;/p></description></item><item><title>Extending spatie/laravel-activitylog for Auth Events</title><link>https://fsylum.net/blog/extending-spatie-laravel-activitylog-for-auth-events/</link><pubDate>Tue, 17 Oct 2023 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/extending-spatie-laravel-activitylog-for-auth-events/</guid><description>&lt;p>If you have been using the excellent &lt;a href="https://spatie.be/docs/laravel-activitylog/v4">&lt;code>spatie/laravel-activitylog&lt;/code>&lt;/a> to track user activities in your Laravel application, then it is only make sense to also extend it to log all related authentication events. This includes tracking when a user:&lt;/p>
&lt;ul>
&lt;li>Logging in to the site&lt;/li>
&lt;li>Logging out from the site (including logging out from the current device or from the other devices)&lt;/li>
&lt;li>Failing to log in&lt;/li>
&lt;li>Registering to the site&lt;/li>
&lt;li>Verifying their email address&lt;/li>
&lt;li>Resetting their password&lt;/li>
&lt;/ul>
&lt;p>To get started, create a new event listener that we will then register in the &lt;code>EventServiceProvider&lt;/code> for all related auth events.&lt;/p></description></item><item><title>Validating Laravel Prompts Using Built-in Validation</title><link>https://fsylum.net/blog/validating-prompts-using-laravel-validation/</link><pubDate>Wed, 09 Aug 2023 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/validating-prompts-using-laravel-validation/</guid><description>&lt;p>&lt;a href="https://laravel.com/docs/10.x/prompts">Laravel Prompts&lt;/a> was released last month at Laracon US (the recording is also available &lt;a href="https://youtu.be/PW-2_-KxF-8">here&lt;/a>). It looks so beautiful and I was keen to try it.&lt;/p>
&lt;p>Now that it is released publicly, I am experimenting with Laravel Prompts for a new web application that I am planning to build. The only gripe that I have with it is that validating user inputs can be very tedious. The example given in the official documentation looks like this:&lt;/p></description></item><item><title>Handling User Timezone in Laravel</title><link>https://fsylum.net/blog/handling-user-timezone-in-laravel/</link><pubDate>Mon, 29 May 2023 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/handling-user-timezone-in-laravel/</guid><description>&lt;p>I&amp;rsquo;ve been working on an interesting problem to solve in Laravel lately for a private monitoring dashboard application that I am building. One of the requirement is to display the date either as a text, or the value of a datepicker input field according to the current timezone.&lt;/p>
&lt;p>In this article, I would like to walk through the final decision that I made, and the technical implementation around it.&lt;/p>
&lt;p>Essentially what I ended up with are three key points:&lt;/p></description></item><item><title>Dynamically Modify Eloquent $fillable Property Using Trait</title><link>https://fsylum.net/blog/dynamically-modify-eloquent-fillable-property-using-trait/</link><pubDate>Fri, 07 Apr 2023 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/dynamically-modify-eloquent-fillable-property-using-trait/</guid><description>&lt;p>I have been using traits extensively in my Eloquent models to segregate related functionalities. For instance, a &lt;code>User&lt;/code> model might incorporate the &lt;code>HasRole&lt;/code> trait, allowing me to define related query scopes, helper methods to determine current user role, and functions to modify the user role.&lt;/p>
&lt;p>When you attach a trait to an Eloquent model, Laravel automatically invoke two related methods that can be utilized to alter the model&amp;rsquo;s behavior. Assuming we are using the &lt;code>HasRole&lt;/code> trait as an example, these two methods will be automatically called:&lt;/p></description></item><item><title>Raycast</title><link>https://fsylum.net/blog/raycast/</link><pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/raycast/</guid><description>&lt;p>I have had &lt;a href="https://www.raycast.com/">Raycast&lt;/a> ever since I got this Macbook for work, but I have solely been using it as an application launcher. Recently, I saw &lt;a href="https://twitter.com/raycastapp/status/1610305097522892801">a tweet from their official Twitter account&lt;/a> about 24 tips for using Raycast and apparently there is a lot more it can do!&lt;/p>
&lt;p>Here are some of them that I have incorporated into my workflow now and that replace several dedicated applications that I installed.&lt;/p>
&lt;p>&lt;strong>Window Management&lt;/strong>&lt;/p></description></item><item><title>2022 Recap</title><link>https://fsylum.net/blog/2022-recap/</link><pubDate>Fri, 23 Dec 2022 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/2022-recap/</guid><description>&lt;p>2022 has been a year of change. A change in work environment, new colleagues, lots of growth and things to learn. It wasn&amp;rsquo;t easy to leave your comfort zone, but I can gladly say that I survived my first year at Human Made.&lt;/p>
&lt;p>Looking back, I learned a ton especially on the technical front. There are several things that I was planning to do before that I didn&amp;rsquo;t manage to do it as seriously as I am at Human Made, so I am really glad that I made the switch. Code review, unit testing, serious WordPress block editor development know-how are among the things that I&amp;rsquo;ll say where the most growth it for the past twelve months.&lt;/p></description></item><item><title>Automating WordPress.org Plugin Readme Update</title><link>https://fsylum.net/blog/automate-wporg-readme-update/</link><pubDate>Wed, 22 Jun 2022 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/automate-wporg-readme-update/</guid><description>&lt;p>If you publish plugins to the official WordPress.org repository, you normally will get an email reminder to update your plugin prior to the major WordPress release. As a plugin developer, it is your responsibility to make sure the plugin you developed is compatible with the latest WordPress release.&lt;/p>
&lt;p>To mark your plugin as compatible, all you have to do is update the &lt;code>Tested up to:&lt;/code> value in the &lt;code>readme.txt&lt;/code> to the latest WordPress version.&lt;/p></description></item><item><title>Setting Up a Global .gitignore File</title><link>https://fsylum.net/blog/global-gitignore/</link><pubDate>Wed, 04 May 2022 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/global-gitignore/</guid><description>&lt;p>I always liked the idea of not polluting your project&amp;rsquo;s &lt;code>.gitignore&lt;/code> file with something unrelated to the project itself. Now, this can be anything, from OS-specific generated files like &lt;code>.DS_Store&lt;/code>, &lt;code>thumbs.db&lt;/code> to editor-specific files like &lt;code>.vscode&lt;/code>. While there is nothing wrong with adding these to the project&amp;rsquo;s &lt;code>.gitignore&lt;/code> files, I feel like the better place to put these rules are in a global &lt;code>.gitignore&lt;/code> file.&lt;/p>
&lt;p>The file can be set via the &lt;code>core.excludesFile&lt;/code> configuration variable in Git, which will be included in addition to the other &lt;code>.gitignore&lt;/code> that you&amp;rsquo;ve set in your project. Pretty useful!&lt;/p></description></item><item><title>Migrating to pnpm</title><link>https://fsylum.net/blog/migrating-to-pnpm/</link><pubDate>Fri, 22 Apr 2022 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/migrating-to-pnpm/</guid><description>&lt;p>I&amp;rsquo;ve been researching on optimization that can be done in one of the project&amp;rsquo;s CI pipeline. The issue is that the whole process can take a very long time including time to set up the project and running all the tests. So I&amp;rsquo;ve been looking at &lt;a href="https://pnpm.io/">&lt;code>pnpm&lt;/code>&lt;/a> to manage the installation of the JavaScript&amp;rsquo;s dependencies in the CI.&lt;/p>
&lt;p>From my experience, the time taken to install the packages can be reduced to just seven seconds (from around almost two minutes, with cache primed) so this is a very welcomed changes. Every second matters.&lt;/p></description></item><item><title>Marking Draft Posts in List Page in Hugo</title><link>https://fsylum.net/blog/marking-draft-post-in-list-page-in-hugo/</link><pubDate>Fri, 18 Mar 2022 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/marking-draft-post-in-list-page-in-hugo/</guid><description>&lt;p>This is a quick one. As I worked with lots of draft posts locally, sometimes it can be hard to differentiate which posts that I&amp;rsquo;ve published and which one that are still in draft. I like to run Hugo with &lt;code>-D&lt;/code> flag when writing a new post, so in my list page, it displays all the posts which can be quite messy. I tend to keep an empty draft post of the topic that I intend to publish.&lt;/p></description></item><item><title>Joining Human Made</title><link>https://fsylum.net/blog/joining-human-made/</link><pubDate>Fri, 25 Feb 2022 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/joining-human-made/</guid><description>&lt;p>I&amp;rsquo;ve been with Human Made for almost three months already, but I&amp;rsquo;m waiting for me to pass the probation before I can comfortably say that I&amp;rsquo;ve joined as web engineer since December 2021.&lt;/p>
&lt;p>The prospect of joining a company like Human Made can be intimidating at times, but I&amp;rsquo;ve been receiving nothing but support and encouragement from fellow humans since I joined and I couldn&amp;rsquo;t wish for a better start.&lt;/p></description></item><item><title>Setting Up macOS for Web Development</title><link>https://fsylum.net/blog/setting-up-macos-for-web-development/</link><pubDate>Tue, 18 Jan 2022 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/setting-up-macos-for-web-development/</guid><description>&lt;p>I recently got a new Macbook Pro 14&amp;quot; as my new work laptop so I&amp;rsquo;ve been busy setting up the machine. It&amp;rsquo;s a base model with an M1 chip, which I&amp;rsquo;m particularly looking forward to trying. Having worked with Windows and Arch Linux before, there are some challenges, especially a shift in thinking but overall, I am very surprised to find out most of the stuff works out of the box pretty well.&lt;/p></description></item><item><title>2021 Recap</title><link>https://fsylum.net/blog/2021-recap/</link><pubDate>Sun, 12 Dec 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/2021-recap/</guid><description>&lt;p>2021 has been a great year personally for me, though I thought we can recover from the pandemic for this year, it seems like the pandemic is still a global issue, albeit more manageable at this point.&lt;/p>
&lt;p>First, let&amp;rsquo;s review my plan for 2021.&lt;/p>
&lt;ul>
&lt;li>&lt;del>Finally learn Docker for real&lt;/del> - &lt;em>&lt;a href="https://github.com/fsylum/docker-lemp">docker-lemp&lt;/a> is the result.&lt;/em>&lt;/li>
&lt;li>Set up a proper workflow, code standard, and documentation for work. - &lt;em>didn&amp;rsquo;t make it this far, and I already left OSKY.&lt;/em>&lt;/li>
&lt;li>&lt;del>Release the two WordPress plugins that I&amp;rsquo;m currently writing.&lt;/del> - &lt;em>Manage to release four plugins instead, so I&amp;rsquo;ll consider this a great success.&lt;/em>&lt;/li>
&lt;li>Release one Laravel related package. - &lt;em>The package that I want to write is almost similar to &lt;a href="https://github.com/spatie/laravel-prefixed-ids">spatie/laravel-prefixed-ids&lt;/a> so I decided not to pursue it.&lt;/em>&lt;/li>
&lt;li>At least to have 50% progress of the web application that I&amp;rsquo;m planning to build (maybe to have a private beta?) - &lt;em>Also not pursuing, decided to focus on job hunting this year.&lt;/em>&lt;/li>
&lt;li>&lt;del>Publish at least one blog post per month&lt;/del> - &lt;em>I&amp;rsquo;ve backdated some of the posts, but generally, this is done.&lt;/em>&lt;/li>
&lt;li>Achieve my ideal weight - &lt;em>Not even close, lol&lt;/em>&lt;/li>
&lt;/ul>
&lt;p>I want to have simpler, achievable goals for next year. So here are my plans:&lt;/p></description></item><item><title>Last Day at OSKY</title><link>https://fsylum.net/blog/last-day-at-osky/</link><pubDate>Fri, 19 Nov 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/last-day-at-osky/</guid><description>&lt;p>It feels just like yesterday that I wrote the &lt;a href="https://fsylum.net/blog/eight-years/">Eight Years&lt;/a> post. Now, after working for more than nine years at the same company since I graduated, today marks my final day at OSKY.&lt;/p>
&lt;p>It feels bittersweet at the end, and I&amp;rsquo;ll be lying if I say I won&amp;rsquo;t miss OSKY.&lt;/p>
&lt;p>OSKY has been more than just a workplace for me for the past nine years. I&amp;rsquo;ve grown into who I am today with the help of everyone there and I wouldn&amp;rsquo;t be here without their support along the way. I&amp;rsquo;ve read a lot of stories about resignation, and I worried a lot about my superior will react to the news. All I can say, their response is the best that I can hope for (up to the point I&amp;rsquo;m doubting my decision of leaving, a little bit).&lt;/p></description></item><item><title>mpv's Scripts</title><link>https://fsylum.net/blog/mpv-scripts/</link><pubDate>Wed, 20 Oct 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/mpv-scripts/</guid><description>&lt;p>I&amp;rsquo;ve only discovered recently that &lt;a href="https://mpv.io/">mpv&lt;/a> supports custom scripts, so naturally, I scoured over Github to find and implement some of the interesting scripts that other users have shared. Here&amp;rsquo;s some that I&amp;rsquo;ve used and tested:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/occivink/mpv-scripts/blob/master/scripts/blur-edges.lua">Blur edges&lt;/a> - Fill in the black bars with the blurred version of the currently playing video.&lt;/li>
&lt;li>&lt;a href="https://github.com/CogentRedTester/mpv-scripts/blob/master/pause-indicator.lua">Pause indicator&lt;/a> - Show a pause indicator when you pause the video.&lt;/li>
&lt;li>&lt;a href="https://github.com/CogentRedTester/mpv-scroll-list">Scroll list&lt;/a> - There&amp;rsquo;s a custom script in the &lt;code>examples&lt;/code> folder that implements a chapter list with your preferred keybind, very useful.&lt;/li>
&lt;li>&lt;a href="https://github.com/jonniek/mpv-filenavigator">Filenavigator&lt;/a> - Allow you to browse your local file directly from mpv.&lt;/li>
&lt;li>&lt;a href="https://github.com/yuukidach/mpv-scripts/blob/master/show_filename.lua">Show filename&lt;/a> - Briefly shows the currently playing video&amp;rsquo;s filename when you press &lt;code>Shift + Enter&lt;/code>.&lt;/li>
&lt;li>&lt;a href="https://github.com/ObserverOfTime/mpv-scripts/blob/master/misc.lua">Show time&lt;/a> - Briefly shows the current system time when you press &lt;code>Ctrl + t&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>I&amp;rsquo;ll update the list if I&amp;rsquo;ve found some other interesting scripts that I can try. Feel free to share yours too!&lt;/p></description></item><item><title>Seeding Eloquent Model With Media</title><link>https://fsylum.net/blog/seeding-eloquent-model-with-media/</link><pubDate>Mon, 06 Sep 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/seeding-eloquent-model-with-media/</guid><description>&lt;p>I&amp;rsquo;ve been integrating one of my company&amp;rsquo;s internal Laravel projects with the excellent &lt;a href="https://github.com/spatie/laravel-medialibrary/">spatie/laravel-medialibrary&lt;/a> package. To fully test the interface and see how it would look like with data populated, I need to be able to generate the associated media files to the model during the seeding process as well.&lt;/p>
&lt;p>To keep it short, I have an Eloquent model called &lt;code>Report&lt;/code> which contains the standard fields like name, status, description, author, etc. But the model itself also has associated files which are defined as a collection of PDF of said report.&lt;/p></description></item><item><title>Add Additional Validation During WordPress Login</title><link>https://fsylum.net/blog/add-additional-validation-during-wordpress-login/</link><pubDate>Fri, 27 Aug 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/add-additional-validation-during-wordpress-login/</guid><description>&lt;p>Just a quick note that in a standard WordPress authentication flow, you can use the &lt;code>authenticate&lt;/code> filter to add additional validation. In my last project, I had to limit user login to only active users, but you are free to implement any kind of check.&lt;/p>
&lt;p>As you can see from the &lt;a href="https://developer.wordpress.org/reference/hooks/authenticate/">official documentation&lt;/a>, the filter accepts three arguments, &lt;code>$user&lt;/code>, &lt;code>$username&lt;/code>, and &lt;code>$password&lt;/code>. To halt the login process for the failed validation, you can simply return &lt;code>null&lt;/code> where the pluggable &lt;code>wp_authenticate&lt;/code> will automatically return a generic failed login message, or you can optionally supply your &lt;code>WP_Error&lt;/code> instance with a custom error message of your liking.&lt;/p></description></item><item><title>Sorting Laravel Query Builder by Relationship Value</title><link>https://fsylum.net/blog/sorting-laravel-query-builder-by-relationship-value/</link><pubDate>Thu, 29 Jul 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/sorting-laravel-query-builder-by-relationship-value/</guid><description>&lt;p>I got a chance to develop an internal dashboard with &lt;a href="https://inertiajs.com/">Inertia.js&lt;/a> at my work and it&amp;rsquo;s an absolute joy to work with. For the uninitiated, Inertia.js helps to reduce some boilerplate you&amp;rsquo;ll need to have to make your server-side application behaves more like a single-page application. You can read more about how it works &lt;a href="https://inertiajs.com/how-it-works">here&lt;/a>.&lt;/p>
&lt;p>To further reduce the work needed to fetch models from the database, I decided to use the excellent &lt;a href="https://github.com/spatie/laravel-query-builder">spatie/laravel-query-builder&lt;/a> to fetch and prepare my Eloquent models for Inertia.js consumption. When pair with &lt;a href="https://github.com/spatie/laravel-model-status">spatie/laravel-model-status&lt;/a>, you can save a lot of time and will be able to focus on the business side of your application.&lt;/p></description></item><item><title>New WordPress Plugin Release: FS Login Devices</title><link>https://fsylum.net/blog/plugin-release-login-devices/</link><pubDate>Fri, 18 Jun 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/plugin-release-login-devices/</guid><description>&lt;p>I&amp;rsquo;ve just published the initial version of &lt;a href="https://wordpress.org/plugins/login-devices">FS Login Devices&lt;/a> to the official WordPress.org plugin repository.&lt;/p>
&lt;p>I need a simple way to track users&amp;rsquo; login activity on my clients&amp;rsquo; WordPress sites and this plugin aims to solve that problem. It currently tracks user agent, login, and logout timestamp. All you need to do is install the plugin and activate it, no further configuration is required and all login activity will be tracked automatically.&lt;/p></description></item><item><title>New WordPress Plugin Release: FS Registration Password</title><link>https://fsylum.net/blog/plugin-release-registration-password/</link><pubDate>Wed, 16 Jun 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/plugin-release-registration-password/</guid><description>&lt;p>A new plugin of mine, &lt;a href="https://wordpress.org/plugins/registration-password">FS Registration Password&lt;/a> has been recently approved by the WordPress.org plugin review team, so you can check it out on the official plugin repository.&lt;/p>
&lt;p>Once activated, a password field will be displayed on the registration form so the user can put in their preferred password during the registration process rather than letting WordPress generates a random password for the user account which they&amp;rsquo;ll need to set it up on their own later on.&lt;/p></description></item><item><title>New WordPress Plugin Release: FS Disable Users</title><link>https://fsylum.net/blog/plugin-release-disable-users/</link><pubDate>Thu, 10 Jun 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/plugin-release-disable-users/</guid><description>&lt;p>I&amp;rsquo;ve released a new WordPress plugin called &lt;a href="https://wordpress.org/plugins/fs-disable-users">FS Disable Users&lt;/a>. The idea came from when I was working on a feature on the client site that gives the admin ability to prevent selected users from logging in to the site.&lt;/p>
&lt;p>A disabled user won&amp;rsquo;t be able to:&lt;/p>
&lt;ul>
&lt;li>Log in to the site&lt;/li>
&lt;li>Reset the password&lt;/li>
&lt;li>Create an application password&lt;/li>
&lt;/ul>
&lt;p>The client&amp;rsquo;s site has a much more complex logic to determine the users&amp;rsquo; status but for the plugin, I&amp;rsquo;ve decided to tone down the functionality without sacrificing much regarding the core concept.&lt;/p></description></item><item><title>Setting Up Github Action for Automatic WordPress Plugin Release</title><link>https://fsylum.net/blog/setting-up-github-action-for-automatic-wordpress-plugin-release/</link><pubDate>Sat, 29 May 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/setting-up-github-action-for-automatic-wordpress-plugin-release/</guid><description>&lt;p>In my &lt;a href="https://fsylum.net/blog/plugin-release-email-tools/">last post&lt;/a>, I mentioned about the new WordPress plugin that I recently published to the official repository. I don&amp;rsquo;t use SVN as much I wanted to, as my work usually revolves around Git and the only time that I am using SVN is when dealing with WordPress.org.&lt;/p>
&lt;p>I&amp;rsquo;ve open-sourced my plugin code on &lt;a href="https://github.com/fsylum/fs-email-tools">Github&lt;/a> so I&amp;rsquo;ve been researching for the easiest way to keep my WordPress SVN repository for the plugin synced with the changes that I&amp;rsquo;ve made in Git. In the end, I settled with &lt;a href="https://github.com/10up/action-wordpress-plugin-deploy">10up&amp;rsquo;s WordPress.org Plugin Deploy Github Action&lt;/a>.&lt;/p></description></item><item><title>New WordPress Plugin Release: FS Email Tools</title><link>https://fsylum.net/blog/plugin-release-email-tools/</link><pubDate>Wed, 07 Apr 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/plugin-release-email-tools/</guid><description>&lt;p>I&amp;rsquo;ve just recently released a new WordPress plugin called &lt;a href="https://wordpress.org/plugins/email-tools/">FS Email Tools&lt;/a>. It&amp;rsquo;s a plugin that is tailored towards developers that can assist in debugging any email issues on your WordPress site. Three core features that it has, at the time of writing are:&lt;/p>
&lt;ul>
&lt;li>Automatic rerouting of all outgoing emails - This is particularly useful if you have a separate staging site that contains real user data but you don&amp;rsquo;t want the outgoing emails to go to the intended recipient.&lt;/li>
&lt;li>Database logging for outgoing emails - If you still want to send the email to the intended recipient, but still want to see how it would look like, this feature can be enabled instead. It allows you to inspect all outgoing emails that are stored in the database at a later time.&lt;/li>
&lt;li>Automatic emails BCC - When this is enabled, all of your site&amp;rsquo;s outgoing emails will be automatically appended with your selected recipients in the BCC list.&lt;/li>
&lt;/ul>
&lt;p>I originally used &lt;a href="https://wordpress.org/plugins/wp-reroute-email/">WP Reroute Email&lt;/a> in my WordPress development workflow but there are some features that I feel lacking so I decided to come up with my own.&lt;/p></description></item><item><title>Setting Up Persistent Floating Browser Window in bspwm</title><link>https://fsylum.net/blog/setting-up-persistent-floating-browser-window-bspwm/</link><pubDate>Mon, 22 Mar 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/setting-up-persistent-floating-browser-window-bspwm/</guid><description>&lt;p>I am a big fan of this nifty &lt;a href="https://www.electronjs.org/">Electron&lt;/a> application called &lt;a href="https://github.com/kamranahmedse/pennywise">Pennywise&lt;/a>. From the README, it is described as:&lt;/p>
&lt;blockquote>
&lt;p>Pennywise opens any website or media in a &lt;strong>small floating window that remains on top of all other applications&lt;/strong>. Pennywise windows stays up &lt;strong>all the time&lt;/strong>. No need to keep struggling with alt + tab, use Pennywise for &lt;strong>easy multitasking&lt;/strong>.&lt;/p>&lt;/blockquote>
&lt;p>Pennywise is great for multi-tasking when you want to open a separate, floating browser window, say to watch a coding tutorial, but at the same time, you don&amp;rsquo;t want it to take the whole space of your desktop. It can stay on top in a little window, but you can resize it however you like.&lt;/p></description></item><item><title>Validate Options on Custom WordPress Settings Page</title><link>https://fsylum.net/blog/validate-options-on-custom-wordpress-settings-page/</link><pubDate>Thu, 25 Feb 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/validate-options-on-custom-wordpress-settings-page/</guid><description>&lt;p>I&amp;rsquo;ve been getting back to WordPress development lately for my side project, a custom plugin to manage outgoing emails in WordPress. One of the things that I want to do is to provide a basic settings page where the user can customize the behavior of the plugin. For developers, &lt;a href="https://developer.wordpress.org/plugins/settings/settings-api/">Settings API&lt;/a> and &lt;a href="https://developer.wordpress.org/plugins/settings/options-api/">Options API&lt;/a> provided by WordPress core out of the box is powerful enough for us to create a settings page on our own.&lt;/p></description></item><item><title>A Simple Docker-based LEMP Stack</title><link>https://fsylum.net/blog/simple-docker-lemp-stack/</link><pubDate>Tue, 12 Jan 2021 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/simple-docker-lemp-stack/</guid><description>&lt;p>As a part of my &lt;a href="https://fsylum.net/blog/2020-recap/">new year resolution&lt;/a>, I want to replace the Vagrant-based local development environment that I&amp;rsquo;ve been using for the past few years with Docker. While there&amp;rsquo;s nothing wrong with it, I started to hit some limitations with it for the past years.&lt;/p>
&lt;p>I have one specific VM provisioned in Vagrant for all work-related projects. Although it&amp;rsquo;s not ideal to house multiple projects in it, the setup is flexible enough for me to use different PHP versions across multiple projects. Since the databases are hosted inside the same VM, the disk space required grows as well. Docker is supposed to be the better alternative since you can decide the stack independently to build up your project dependencies.&lt;/p></description></item><item><title>2020 Recap</title><link>https://fsylum.net/blog/2020-recap/</link><pubDate>Sun, 20 Dec 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/2020-recap/</guid><description>&lt;p>This is my first time doing this so I would like to keep it short. I believe 2020 has been a very hard year so far for everybody, with the pandemic is still going on, so let&amp;rsquo;s focus on recovery for 2021.&lt;/p>
&lt;p>Let&amp;rsquo;s see what I did achieve so far this year:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Launched &lt;a href="https://danago.app">Danago&lt;/a>&lt;/strong> - it&amp;rsquo;s a specific work-specific project, but I&amp;rsquo;m pretty proud of it, considering the idea behind its inception and its mission for crowdfunding in Malaysia.&lt;/li>
&lt;li>&lt;strong>Growing professionally&lt;/strong> - This one is a bit generic to describe, but I started taking more responsibility for the client-side of things.&lt;/li>
&lt;li>&lt;strong>Restarted this blog&lt;/strong> - Although I haven&amp;rsquo;t been writing consistently, I did manage to dish out 12 posts (including this one).&lt;/li>
&lt;li>&lt;strong>Started weight loss journey&lt;/strong> - Well, I did this one pretty late into 2020, so hoping to continue for 2021.&lt;/li>
&lt;/ul>
&lt;p>I love to use this opportunity to outline what I hope to achieve by the end of next year, so I&amp;rsquo;ll just put this in the open. That way, when I do another recap at the end of next year, I&amp;rsquo;ll have something as a reference.&lt;/p></description></item><item><title>Setting Up ncmpcpp With Mopidy and Spotify in Arch Linux</title><link>https://fsylum.net/blog/setting-up-ncmpcpp-mopidy-spotify-arch-linux/</link><pubDate>Sat, 14 Nov 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/setting-up-ncmpcpp-mopidy-spotify-arch-linux/</guid><description>&lt;p>I recently switched back to Arch Linux as my daily driver when I got my new Thinkpad, so I&amp;rsquo;ve been trying to replicate the setup that I used to have. Back then, I was using &lt;a href="http://rybczak.net/ncmpcpp">ncmpcpp&lt;/a>, a beautiful MPD client as my music player. Now that I solely use Spotify as my music source, there are a few tweaks that need to be done for ncmpcpp to be able to stream your songs in Spotify.&lt;/p></description></item><item><title>Eight Years</title><link>https://fsylum.net/blog/eight-years/</link><pubDate>Thu, 01 Oct 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/eight-years/</guid><description>&lt;p>Today marks the eight years I&amp;rsquo;ve been working professionally as a web developer where I spent the majority of that time working remotely (~ 6 years). Eight years isn&amp;rsquo;t that long in this field, but the journey itself is somewhat interesting, to say the least. If I can offer some bits of advice to those who just starting, I&amp;rsquo;ll say:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Always be learning&lt;/strong> - This is my one motto. You can do side projects in your free time, learn a new programming language, learn a new framework, anything. The possibilities are endless. There is always something useful you can apply back to your daily work.&lt;/li>
&lt;li>&lt;strong>Underpromised, over-delivered&lt;/strong> - Manage the expectation of your work. Anything that can go wrong, will go wrong. Always remember this in your quotes, estimates, timeframes, and everything else.&lt;/li>
&lt;li>&lt;strong>Use a framework&lt;/strong> - Frameworks exist for a reason. They define a standardized set of structure so everyone can be on the same page. Use it, don&amp;rsquo;t reinvent the wheel. Don&amp;rsquo;t waste so much time on problems that have been solved over and over again. Pick your battle.&lt;/li>
&lt;li>&lt;strong>But master the basic&lt;/strong> - Get to know how things work under the hood. Once you got the basics down, learning any framework is just a matter of nuance.&lt;/li>
&lt;li>&lt;strong>Set your boundary if possible&lt;/strong> - I don&amp;rsquo;t mean solely physical boundary but mentally as well. Remote working can be challenging and takes time to get used to. Set a dedicated workspace if you can. Set your working time, and adhere to it. I find the Pomodoro technique works best for me.&lt;/li>
&lt;li>&lt;strong>Take a break&lt;/strong> - Work never ends, there is always a little bit more needs to be worked on. Take some break, spend time with your loved one.&lt;/li>
&lt;li>&lt;strong>Learn to say no&lt;/strong> - Clients can always come up with ridiculous requests, but part of your job as a developer is to educate. Explain what&amp;rsquo;s wrong with the proposed requests and provide a better alternative. Most of the time, they&amp;rsquo;ll accept it.&lt;/li>
&lt;li>&lt;strong>Be kind&lt;/strong> - Always help your colleagues. Be compassionate. Always assume the best of people.&lt;/li>
&lt;/ol>
&lt;p>Well, that&amp;rsquo;s all over the place, but I hope I get my points across.&lt;/p></description></item><item><title>Better Laravel Route Management</title><link>https://fsylum.net/blog/better-laravel-route-management/</link><pubDate>Fri, 18 Sep 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/better-laravel-route-management/</guid><description>&lt;p>Out of the box, Laravel provides 4 different route files to manage your application routes. For a simple web application, this might be sufficient for most use cases but as your app grows, the routes will become harder to manage. In this post, I&amp;rsquo;ll guide you on how I manage my routes in a fairly complex application without sacrificing maintainability.&lt;/p>
&lt;p>The idea is to split your routes into multiple files then load them independently inside the &lt;code>RouteServiceProvider&lt;/code> class. If we check on the &lt;code>map&lt;/code> method of &lt;code>RouteServiceProvider&lt;/code>, Laravel by default already maps two different routes to two different files, &lt;code>api.php&lt;/code> and &lt;code>web.php&lt;/code>. We can extend this idea by further breaking down the routes inside &lt;code>web.php&lt;/code> into smaller files.&lt;/p></description></item><item><title>Recap of My Sitepoint Articles</title><link>https://fsylum.net/blog/recap-of-sitepoint-articles/</link><pubDate>Mon, 31 Aug 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/recap-of-sitepoint-articles/</guid><description>&lt;p>I&amp;rsquo;ve written several articles on Sitepoint a few years ago, mostly which revolves around beginner topics of WordPress. Below is the summary of the posts (in no particular order) for archiving purposes. You can also view &lt;a href="https://www.sitepoint.com/author/fzahari/">my author page here&lt;/a>.&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://www.sitepoint.com/an-introduction-to-asset-handling-in-wordpress/">An Introduction to Asset Handling in WordPress&lt;/a> - Basic summary of enqueuing assets in WordPress with some tips and tricks for beginners.&lt;/li>
&lt;li>&lt;a href="https://www.sitepoint.com/an-introduction-to-the-wp-error-class/">An Introduction to the WP_Error Class&lt;/a> - Guide on working with &lt;code>WP_Error&lt;/code> and how to handle them.&lt;/li>
&lt;li>&lt;a href="https://www.sitepoint.com/wordpress-plugin-boilerplate/">Speed up Development Using the WordPress Plugin Boilerplate&lt;/a> - First part of working with the WordPress plugin boilerplate.&lt;/li>
&lt;li>&lt;a href="https://www.sitepoint.com/wordpress-plugin-boilerplate-part-2-developing-a-plugin/">The WordPress Plugin Boilerplate Part 2: Developing a Plugin&lt;/a> - Second part of the series, which is working with real-life plugin implementation.&lt;/li>
&lt;li>&lt;a href="https://www.sitepoint.com/the-wordpress-plugin-boilerplate-part-3-the-last-steps/">The WordPress Plugin Boilerplate Part 3: The Last Steps&lt;/a> - Final part of the series where the frontend part of the plugin is implemented.&lt;/li>
&lt;li>&lt;a href="https://www.sitepoint.com/handling-post-requests-the-wordpress-way/">Handling POST Requests the WordPress Way&lt;/a> - Quick guide on working with &lt;code>admin-post.php&lt;/code>.&lt;/li>
&lt;li>&lt;a href="https://www.sitepoint.com/working-with-databases-in-wordpress/">Working with Databases in WordPress&lt;/a> - A basic introduction for working with databases in WordPress, specifically using &lt;code>$wpdb&lt;/code>.&lt;/li>
&lt;li>&lt;a href="https://www.sitepoint.com/wordplate/">Better WordPress Development Workflow with WordPlate&lt;/a> - Tutorial on using WordPlate, the earlier version.&lt;/li>
&lt;li>&lt;a href="https://www.sitepoint.com/preventing-wordpress-plugin-incompatibilities/">Quick Tip: Preventing WordPress Plugin Incompatibilities&lt;/a> - Primer on preventing WordPress plugin activation if the conditions aren&amp;rsquo;t met.&lt;/li>
&lt;li>&lt;a href="https://www.sitepoint.com/enabling-ajax-file-uploads-in-your-wordpress-plugin/">Enabling AJAX File Uploads in Your WordPress Plugin&lt;/a> - Implementation of AJAX uploads with progress using &lt;code>async-upload.php&lt;/code>.&lt;/li>
&lt;/ul></description></item><item><title>Add Password During WordPress Registration Process</title><link>https://fsylum.net/blog/add-password-during-wordpress-registration-process/</link><pubDate>Tue, 21 Jul 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/add-password-during-wordpress-registration-process/</guid><description>&lt;p>I was recently tasked with providing the capability for the user to register themselves on a WordPress site with their preferred password. By default, WordPress only requires the user to set up the username and email when registering to the site. Password will be set up by the user later by following the password reset URL provided after the successful registration.&lt;/p>
&lt;p>To implement this, a few steps need to be done:&lt;/p></description></item><item><title>Using WordPress Template Utility for HTML Generation</title><link>https://fsylum.net/blog/using-wordpress-template-utility-for-html-generation/</link><pubDate>Fri, 12 Jun 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/using-wordpress-template-utility-for-html-generation/</guid><description>&lt;p>I&amp;rsquo;ve been using &lt;a href="https://mustache.github.io/">mustache&lt;/a> for client-side HTML generation when working with AJAX but I recently discovered that WordPress ships a slightly modified version of &lt;a href="https://underscorejs.org/#template">Underscore.js template&lt;/a> functionality. It is located under the &lt;code>wp&lt;/code> object and aptly named &lt;code>wp.template&lt;/code>.&lt;/p>
&lt;p>In this post, I&amp;rsquo;ll walk through how you can use the &lt;code>wp.template&lt;/code> function to generate the HTML for your client-side code.&lt;/p>
&lt;p>The code for the &lt;code>wp.template&lt;/code> is pretty simple. This is the whole code of it, which is located in the &lt;code>wp-includes/js/wp-util.js&lt;/code> file.&lt;/p></description></item><item><title>Add Additional Validation to WordPress Uploads</title><link>https://fsylum.net/blog/add-additional-validation-to-wordpress-uploads/</link><pubDate>Sat, 16 May 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/add-additional-validation-to-wordpress-uploads/</guid><description>&lt;p>I had a requirement for one of my client&amp;rsquo;s sites recently to validate the file uploaded to the media library and scan it for potential viruses. On top of periodic scanning of the &lt;code>uploads&lt;/code> folder, the file also needs to be scanned in real-time during the upload process.&lt;/p>
&lt;p>Luckily, this can be easily done by hooking into &lt;a href="https://developer.wordpress.org/reference/hooks/wp_check_filetype_and_ext/">&lt;code>wp_check_filetype_and_ext&lt;/code>&lt;/a> filter that is used by &lt;a href="https://developer.wordpress.org/reference/functions/wp_check_filetype_and_ext/">&lt;code>wp_check_filetype_and_ext&lt;/code>&lt;/a> function. This function is originally called from the &lt;code>_wp_handle_upload&lt;/code> function that is used internally by WordPress whenever any file is uploaded through the media uploader.&lt;/p></description></item><item><title>Override Vendor Classes in Composer</title><link>https://fsylum.net/blog/override-vendor-classes-in-composer/</link><pubDate>Wed, 01 Apr 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/override-vendor-classes-in-composer/</guid><description>&lt;p>This will be a short guide on how you can override a specific class included in your &lt;code>vendor&lt;/code> directory by Composer with your implementation of that class. You might need to do this if you need to urgently fix any issues you&amp;rsquo;ve found, or you simply have a different idea of the implementation that you need specifically for your application.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> I generally do not recommend this unless you have exhausted all other available options. The best way is always to report the issue upstream or even better, create a pull request to the original repository.&lt;/p></description></item><item><title>Integrate Laravel With Turbolinks and Stimulus</title><link>https://fsylum.net/blog/integrate-laravel-with-turbolinks-stimulus/</link><pubDate>Sun, 15 Mar 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/integrate-laravel-with-turbolinks-stimulus/</guid><description>&lt;p>I had a chance earlier this month to convert a fairly generic CRUD-y application that I built in Laravel into something that a little bit more interactive. Since I already got all the interaction nailed down in Laravel including form validation and routing, I decided to use &lt;a href="https://github.com/turbolinks/turbolinks">Turbolinks&lt;/a> and &lt;a href="https://stimulusjs.org/">Stimulus&lt;/a> to make the application snappier and behave more like a single page application.&lt;/p>
&lt;p>Since both Turbolinks and Stimulus come from the same developer, they pair quite nicely. However, to make them play nice with Laravel, few things need to be taken care of before.&lt;/p></description></item><item><title>Better mysqldump with Progress</title><link>https://fsylum.net/blog/better-mysqldump-with-progress/</link><pubDate>Fri, 14 Feb 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/better-mysqldump-with-progress/</guid><description>&lt;p>I always need to Google this stuff every time I want to do backup and/or restoring the database, so might as well put it here for reference.&lt;/p>
&lt;p>First of all, you need to have &lt;code>pv&lt;/code> installed in your system, so check the installation guide for your OS accordingly. In short, &lt;code>pv&lt;/code> can monitor the data in your pipeline, so it is perfect for this kind of situation, especially if your database is fairly large and you are unsure whether the operation is running as it should or not.&lt;/p></description></item><item><title>My Simple Hugo Blog Setup</title><link>https://fsylum.net/blog/my-simple-hugo-blog-setup/</link><pubDate>Tue, 07 Jan 2020 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/blog/my-simple-hugo-blog-setup/</guid><description>&lt;p>I&amp;rsquo;ve been working on rebuilding this site (again!) since the start of the year. I still use &lt;a href="https://gohugo.io/">Hugo&lt;/a> as the static site generator, albeit now I learned a little bit more about Go so I can make better, informed decisions on how to write the proper template for this site.&lt;/p>
&lt;p>In this post, I&amp;rsquo;ll talk about a few things that I learn from simplifying the site from the first version that I built with Hugo. Just a disclaimer my requirement is pretty simple, so I do not use all functionalities that Hugo offers.&lt;/p></description></item><item><title>Contact</title><link>https://fsylum.net/contact/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/contact/</guid><description>&lt;p>For any collaboration opportunity, freelancing work, or if you simply just want to say hi, I can be reached by any of these platforms:&lt;/p>
&lt;ul>
&lt;li>firdaus at this domain for email.&lt;/li>
&lt;li>fsylum on &lt;a href="https://github.com/fsylum">Github&lt;/a>.&lt;/li>
&lt;li>fsylum on &lt;a href="https://twitter.com/fsylum">Twitter&lt;/a>.&lt;/li>
&lt;li>fsylum on &lt;a href="https://profile.wordpress.org/fsylum">WordPress.org&lt;/a>.&lt;/li>
&lt;li>firdauszahari on &lt;a href="https://www.linkedin.com/in/firdauszahari/">LinkedIn&lt;/a>.&lt;/li>
&lt;/ul></description></item><item><title>Projects</title><link>https://fsylum.net/projects/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>firdaus@fsylum.net (Firdaus Zahari)</author><guid>https://fsylum.net/projects/</guid><description>&lt;p>I try to open-source as much as I can whenever possible to contribute back to the community.&lt;/p>
&lt;p>Here are some notable projects that I am currently maintaining.&lt;/p>
&lt;h4 id="general">General&lt;/h4>
&lt;ul>
&lt;li>&lt;a href="https://github.com/fsylum/rector-wordpress">rector-wordpress&lt;/a> - WordPress-specific rules for Rector to help with updating your WordPress codebase to a specific version of your choosing.&lt;/li>
&lt;li>&lt;a href="https://github.com/fsylum/docker-lemp">docker-lemp&lt;/a> - Straight-forward Docker setup for LEMP-stack local environment.&lt;/li>
&lt;/ul>
&lt;h4 id="wordpress-plugins">WordPress plugins&lt;/h4>
&lt;ul>
&lt;li>&lt;a href="https://github.com/fsylum/fs-registration-password">fs-registration-password&lt;/a> - WordPress plugin to add the password field to the site&amp;rsquo;s registration form&lt;/li>
&lt;li>&lt;a href="https://github.com/fsylum/fs-login-devices">fs-login-devices&lt;/a> - WordPress plugin to automatically track the current device that the user is using to log in to your site.&lt;/li>
&lt;li>&lt;a href="https://github.com/fsylum/fs-email-tools">fs-email-tools&lt;/a> - WordPress plugin to modify outgoing emails behavior, including rerouting all emails to a specific email address, email logging functionality and global BCC.&lt;/li>
&lt;li>&lt;a href="https://github.com/fsylum/fs-disable-users">fs-disable-users&lt;/a> - WordPress plugin to disable the user without removing them completely from your site.&lt;/li>
&lt;/ul>
&lt;p>You can check the rest of my work on my &lt;a href="https://github.com/fsylum">GitHub profile&lt;/a>.&lt;/p></description></item></channel></rss>