Vuex & Data: Keeping It Clean

IntroductionVuex is a state management library, a centralized storage of data for your whole application. Its well documented, beautiful, and easy to use with Vue. The part I want to talk about today is the data portion.I have increasingly seen cases where the data state of Vuex gets transformed…

FOSS Alternatives for Android

These days, privacy and security are out the window. In 2018 and already during 2019, we've seen some of the biggest exploits and privacy invasion to date; everything from people's bank records being leaked due to improper security, to the various scandals of Facebook, and even our home devices such…

Apply, Verify, and Validate Shopify Discount Codes

Shopify doesn't have an API to verify discount, however I have found a little work-around. By making an AJAX call to /discount/(code), Shopify will set a cookie telling the checkout to auto-apply a discount on visit to the checkout page. Next, making an AJAX call to /checkout, we're able…

Setting Up Lumen + Redis

This is more of an extension of my previous post "Setting Up Lumen + Mail". I wanted to take it a step furthur and show the basic setup for getting Redis to work, so you can queue not only mail, but jobs. First, run composer require illuminate/redis:5.…

Setting Up Lumen + Mailer

What is Lumen? Lumen is a micro-framework built by Laravel. Its geared towards small services like APIs, job handling, or very small projects. Laravel is all-inclusive, where as Lumen is bare-bones but still featured. Setting Up Mailing Recently I ported a small app from Sinatra to Lumen for trial with…

Reactive VueJS Plugins

VueJS has been my go-to framework from building small to medium-sized frontend applications and add-ins. Its simply great - easy to develop with and able to plug into existing systems as a simple view layer. Plugins & Reactivity Plugins in Vue, allow you to extract code into a re-usable module.…

Toggling TinyMCE v4

Heres a easy way to turn on and off the TinyMCE editor for version 4. document.getElementById('toggle-tinymce').addEventListener('click', function(e) { e.preventDefault(); var editorID = this.dataset.editorId; var editor = tinymce.EditorManager.get(editorID); if (editor) { editor.remove(); } else { editor = tinymce.EditorManager.createEditor(editorID, tinyMCE.settings); editor.render(); } }); You…

Counting Unique Options in Shopify

Ever wanted to quickly display a how many of an option a product contains? Available in 4 sizes ... Available in Red, Blue, Green ... Available in 10 colors Here's an example of how to do just that (for color). Simply open your product's loop liquid and add this block at the…

Precompiling Assets In Your Rails Engine

This'll be a quick post to highlight an issue I had where I needed to precompile an asset file for my Rails engine that was not to be compiled with the other engine assets. Recently, I added TinyMCE-Rails to Guts instead of rolling it in on its own. This allows…