There are normally 2 ways of implement multi language in angular. i18n is supported by Angular team officially. ngx-translate is on https://github.com/ngx-translate/core Both has pros and cons. i18n is supported long term and ngx-translate is not supported long term because Angular team hired the author of the repository to develop i18n package. i18n should have …
Comma operator of JavaScript
var a = [0, 1, 2][0, 1, 2]; What is value of a? var b = 0, 1, 2; What is value of b? b is last element of 0, 1, 2 so b === 2 So a === [0, 1, 2][2]; a === 2; A grammar utility of JavaScript. 😉
PayPal integration – IPN
IPN (immediate payment notification) is a setting in PayPal account which works just like webhook in stripe. The difference is literally, it comes back as soon as payment is processed. We can do payment confirmation in your back-end using the notification. In order to activate it, you need to do it in your PayPal account. …
CSS blur without image
In order to blur in html page normally css `filter: blur(npx)` is used. filter: url(“data:image/svg+xml;utf8,<svg xmlns=’http://www.w3.org/2000/svg‘ ><filter id=’svgMask’><feGaussianBlur stdDeviation=’3’ /></filter></svg>#svgMask”); This is also useful as well as normal filter. And you can utilize svg for further tricks too.
Defs and clipPath in SVG
If you put clipPath into defs and use inkscape to convert svg to png, defs is removed automatically. Do you understand what I mean? If not send mail to novofox@outlook.com directly. This is very tricky experience and knowledge. If you work svg and inkscape, this knowledge will be very helpful. 😉
Weird scrolling issue related to autofocus
When an input element has autofocus attribute, page scrolls down to the element when the page is loaded. If you want to prevent it, the only way is to catch focus event and scroll to top of page using javascript. Or you can remove autofocus attribute. 😉
Do you know why this happens?
I can not access to https://dev-local.mylogobot.com Do you know why? This is my vhost file. <VirtualHost *:443> DocumentRoot “/Volumes/Data/Amchara/main-front/public” SSLEngine on SSLCertificateFile /etc/apache2/ssl/amchara-front/server.crt SSLCertificateKeyFile /etc/apache2/ssl/amchara-front/server.key ServerName www.dev-local.amchara-front.net ServerAlias dev-local.amchara-front.net <Directory “/Volumes/Data/Amchara/main-front/public”> AllowOverride All …
uncss – unnecessary css
https://uncss-online.com/ This is really useful link especially for AMP, we can reduce style size by removing unused styles. Really great service!
Vat calculation easy :)
When you work for EU company, vat validation and calculation is mandatory in payment module. Here is very good php vat support repository. https://github.com/mpociot/vat-calculator This works best with laravel and laravel cashier. Charming!
Introduction to InkScape
InkScape is great svg manipulation tool to manipulate svg image. We can convert svg images to png, pdf, eps, ps file types. Also it is possible to change size, export area using InkScape. There InkScape apps for Linux, Mac and Windows as well as command lines! https://inkscape.org/doc/inkscape-man.html