snippet - PHP: Send json with post request
26 Nov, 2018
PHP
Instead of curl I like to use http request function from a long and stable framework PHP: http request function, alternative to curl or file_get_contents. Because I find curl to be tedious. Using...
snippet - Convert to Integer in JavaScript
8 Nov, 2018
There are multiple ways to convert values to integer in javascript. Using Math.trunc gives the most accurate results.
written tutorial - Retrieve entities with EntityFieldQuery in Drupal 7
21 Oct, 2018
Retrieve entities based on entity properties, field values, and generic entity metadata (bundle, entity type, entity ID, and revision ID). It is not possible to query across multiple entity types....
snippet - Magento 2: Module is not listing
18 Oct, 2018
When you copy a custom module to app/code directory. Magento does not pick it up automatically. You need to run this.
snippet - Masterpdf 4 for Arch Linux
18 Oct, 2018
Use this content to replace PKGBUILD. Also you can freeze masterpdfeditor after installing this older version. This package can be found from the AUR git as well.
written tutorial - React ES6: Styled Components
6 Oct, 2018
Styled components are the best way to give some visual aid to your components. The heavy lifting should be done by a library, it can be either material design, bootstrap, semantic, etc... To adjust...
snippet - Arch Linux: Use Autocomplete in Command Line
31 Aug, 2018
In default you can use extremely limited autocomplete in bash command line. For an example you can't use autocomplete after you type "sudo". When installing this package all the extra autocompletes...
snippet - Defining class variables in Python
4 Sep, 2018
You can define class variables multiple ways in Python, but they also work differently. Underscore is used for "private" or "protected" variables, altough there are no such definitions in Python....
snippet - MySQL simple update query example
15 Aug, 2018
There are actually two ways of updating in MySQL. This example uses the simpler way. Other way is to define columns and corresponding values sepparately.
snippet - Number to words in PHP
24 Jul, 2018
Helper function for converting numbers to words. There is same function available in PHPs NumberFormatter class, but using it is not always possible, since it's not enabled by default.