博文

目前显示的是 四月, 2019的博文

[WP Plugin] Geek Mail Blacklist

图片
WordPress sites administrators often encounter a problem - zombie or fake users register to your site using fake Emails. The emails they use often strictly follow the Email format so it's hard for our program to judge if they are valid or not. Although we can prevent these users from really using our sites by sending activation Email, still they are a waste of database space and make it harder to manage members. As a result, an Email blacklist is needed to filter these annoying registrations. Geek Mail Blacklist is a plugin which can block users with certain emails from registering to your WordPress site by adding blacklist rules. What's more, it supports regular expression rules which makes it more powerful to fit all kinds of situations. And it is COMPLETELY FREE! Github page: https://github.com/gongwan33/geek-Mail-Blacklist WordPress Official page:  https://wordpress.org/plugins/geek-mail-blacklist/ Description - Block certain kinds of users from re

[Chrome] An ugly box appears when mouse hovers over a round bordered div

图片
As the picture shows, a small square showed on every rounded div element after hover or click event in Chrome but not in Safari. To solve this strange problem, I did some search and found the solution - add the following lines to the related css code: -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden;

How to npm install jquery-ui and import it as a ESM?

We can use jquery-ui-bundle: npm install jquery-ui-bundle --save Then import: import 'jquery-ui-bundle'; import 'jquery-ui-bundle/jquery-ui.css';

Use pug with Vue

A usable webpack configuration for pug with Vue: {     test: /\.pug$/,     oneOf: [                   {                       resourceQuery: /^\?vue/,                       use: [                           'pug-plain-loader'                       ]                   },                   {                       use: [                           'raw-loader',                           'pug-plain-loader'                       ]                   }              ] }, Versions: "pug": "^2.0.3", "raw-loader": "^2.0.0",  "pug-plain-loader": "^1.0.0",  "vue-loader": "^15.7.0",   "vue-style-loader": "^4.1.2",   "vue-template-compiler": "^2.6.10",   "webpack": "^4.29.6",   "webpack-cli": "^3.3.0"

Start your old mobile without battery

图片
I think most of us have one or a few old mobiles which may lie in a corner without being touched for a long time. Most of those mobiles can still work but their batteries may be dead. Some of the mobiles can be turned on without batteries but some can not especially for those smart phones. Because they will check for a valid battery before properly start up. I found an old HUAWEI PLK-AL10 from my drawer and wanted to transform it into an alarm clock. But the problem was the battery had been completely dead. I had to do some modifications to fake a batter signal to make the board believe there is a healthy battery there and rely on the micro-usb power to start up. I took the mobile apart and got the battery with which I used a multimeter to test all the pads of its connector. Here is the definition of each pad. To fake battery signal I need at least two things: 1. Add a 10K resistor between temperature sensor pad and '-' pad. Or I take apart the battery and get the protec