Loading Web Fonts with the Web Font Loader in Nuxt.JS

Several years ago the consensus on font loading in the community was that, as a website loads, all fonts should be hidden until the correct resources have. Now, let ‘s do it for Nuxt.JS. This is steps to configure: Include webfontloader via npm install webfontloader –save Add webFontLoader.js file to /plugins folder: import WebFont from ‘webfontloader’;WebFont.load({ google: { families: [‘Fira Sans:400,500,600,700:latin,vietnamese’] }});… Read More Loading Web Fonts with the Web Font Loader in Nuxt.JS

How to remove “Remaining deprecation notices” while running Symfony test cases

Sometime, when you run some Symfony tests, there is a lot of deprecation warning like this: Solution: Just add below code <php> <env name=”SYMFONY_DEPRECATIONS_HELPER” value=”weak” /> </php> to your phpunit.xml (or phpunit.xml.dist)

Generate JPA Entity Script

I am using IntelliJ IDEA to write Java code. It has built in script to generate POJOs class, but I want to generate JPA Entity classes. So today, I wrote a Groovy script to do it. It saved my time and I hope it helpful to you!

Note for awk command on Mac

Today, I cleaned up redundant Docker images. I used this command line: docker rmi $(docker images | grep “^<none>” | awk “{print $3}”) But it does not works on macOS, only Linux. After some hours, I found the problem, and the right command for macOS is: docker rmi $(docker images | grep “^<none>” | awk… Read More Note for awk command on Mac

How to disable “Seen” in Facebook Messenger by using AdBlock Plus

Go to AdBlock Plus Options page and add this url facebook.com/ajax/mercury/change_read_status.php$xmlhttprequest to the extension’s custom filters.

Limit elasticsearch official docker container memory

Pull Elasticseach official docker image: docker pull docker.elastic.co/elasticsearch/elasticsearch:5.6.3 Run new container with parameter -e “ES_JAVA_OPTS=-Xms256m -Xmx1g”: docker run -d \ –net meete \ –name elasticsearch \ –hostname elasticsearch \ -e “ES_JAVA_OPTS=-Xms256m -Xmx1g” \ -e “http.host=0.0.0.0” \ -e “transport.host=127.0.0.1” \ -e “xpack.security.enabled=false” \ docker.elastic.co/elasticsearch/elasticsearch:5.6.3 Reference link: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

Cannot “Move to trash” in Ubuntu

Reason: There is no folder named .Trash-{UID}, or application doesn’t have permission to read and write file in that folder. Solution: Step 1: Find your UID (by default, current user has UID=1000) Run cat /etc/passwd | grep $(whoami) Result looks like this: ubuntu:x:1000:1000:ubuntu,,,:/home/ubuntu:/bin/bash You can see 1000, it is your UID. Step 2: Create trash folder… Read More Cannot “Move to trash” in Ubuntu

How to fix Ubuntu wallpaper was not changed

How to fix Ubuntu wallpaper was not changed? Run this command to fix: gsettings set org.gnome.settings-daemon.plugins.background active true Hope this helpful to you!

JQuery tips for HTML select

I am working on the next version of Bible for WordPress plugin, and I learned some tips while playing with HTML select. I hope this helpful!

How to send multipart file using Spring RestTemplate

This is an example for sending multipart file using Spring RestTemplate:

How to do when Oracle Vendor Code 28001

Open SQL Developer and perform the following steps: Right click on Connections > New Connection. Connection Name: sys Username: sys as sysdba Password: sys (or your sys password) Hostname: your database server IP Port: 1521 SID: your sid Click connect. Expand Other Users, and choose the user with the expired password. Right click on the… Read More How to do when Oracle Vendor Code 28001

Switch giữa các tab trong các trình duyệt phổ biến bằng nút cuộn chuột (phần 2)

Qua bài Switch giữa các tab trong các trình duyệt phổ biến bằng nút cuộn chuột (phần 1), các bạn đã biết cách để mang tính năng chuyển đổi giữa các tab trong trình duyệt bằng cách dùng nút lăn chuột. Tuy nhiên có một điều hơi bất tiện là các bạn phải chạy file… Read More Switch giữa các tab trong các trình duyệt phổ biến bằng nút cuộn chuột (phần 2)