Inline CSS and JS in Hugo for better page performance Inline CSS Here is a trick of how to avoid the render blocking CSS file being loaded (and reported in Lighthouse) on your Hugo site. Inline the CSS using resources.Get function. The following … #misc #snippet
How to ask user for confirmation in Magento 2 console command This is a short post showing how to ask user for the confirmation when running Magento 2 console command. The typical use case for this is “Are you sure you want to continue? (y/n)” … #magento2 #snippet
Rendering the Magento 2 console command output as a table Here is a quick example of how to render the Magento 2 console command output as a table. This can be useful in a number of situations where the resulting data is tabular. To achieve this, … #magento2 #snippet
Returning JSON response from Magento controller action Here’s quick example of how to return JSON response from Magento controller action. Assuming you have already created appropriate XML configuration and controller class/file, just add the … #magento #snippet
Hosting Ghost blog with Nginx & LetsEncrypt Here’s a sample Nginx configuration for Ghost blogging platform, that includes: 1) standard proxy configuration to successfuly host Ghost blog; 2) redirect “www” to … #server #snippet
Load customer by custom attribute in Magento Here is an example of slightly more advanced approach of how to load customer in Magento - load customer by attribute value - be it some default attribute or a custom one. Generally the approach … #magento #snippet
Load customer by email in Magento Another example of how to load customer in Magento - this time - by customer email. Previously we looked at how to load customer by ID in Magento, now we will do the same, but using the customer … #magento #snippet
Load customer by ID in Magento Here is a quick example of how to load customer by its ID in Magento. It is a standard load method that is used across all Magento models. Be sure - you will see this very often! Get customer by … #magento #snippet
Get current store ID in Magento This here is a really short example of how to retrieve current store ID in Magento. Additionally to that, an example of getting current store object and some of its data. Let’s roll! Get … #magento #snippet
Small collection of useful SASS mixins I happen to use these little SASS mixins quite often, but did not have Gist created yet. So I decided to create a small collection for quick copy and easy lookup next time I need them. So, … #misc #snippet