snippet - HMAC SHA1 in Python 2
11 Mar, 2019
HMAC (a keyed-hash message authentication code) is used to verify API request. HMAC is constructed by concatenating form parameter key and value pairs into a string ordered by alphabetic order of the...
snippet - ERROR: One or more PGP signatures could not be verified!
5 Jan, 2015
Solution for this error is to update trust database. package- ... ERROR: One or more files did not pass the validity check! FAILED (unknown public key 1234567890). ERROR: One or...
written tutorial - PHP: Send email with mail() using smtp
2 Mar, 2019
When you set up Apache in vpn you also might want to send emails with PHP. You can use msmtp to send emails from the system using smtp. Eliminating the need to use some php library for smtp.
snippet - Enable HTTP/2 in Apache Web Server
28 Feb, 2019
HTTP/2 enables a more efficient use of network resources and a reduced perception of latency by introducing header field compression and allowing multiple concurrent exchanges on the same connection...
snippet - MySql create database with user
20 Feb, 2019
This snippet shows how to create a new database and user with assigning permissions of the newly created database to the user. In this example I use database name as user name for clarity and...
snippet - PHP: Send json with post request
26 Nov, 2018
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.
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...