CSS Secrets》是@Lea Verou最新著作,这本书讲解了有关于CSS中一些小秘密。是一本CSSer值得一读的一本书,经过一段时间的阅读,我、@南北@彦子一起将在W3cplus发布一系列相关的读后感,与大家一起分享。

CSS Secrets





<main<blockquote“The only way to get rid of a temptation[…]”
            <citeOscar Wilde,
                The Picture of Dorian Gray


body {
    background: url("tiger.jpg") 0 / cover fixed;
main {
    background: hsla(0,0%,100%,.3);
Read the rest

使用 satis 搭建私有 composer 库,加速 PHP 测试部署

为什么要搭建私有 composer 软件库

composer 是 PHP 开发处理代码库依赖关系的标准,但是由于需要访问 packagist.org 和 github.com 获取依赖库信息和下载代码,国内使用的速度很慢,导致 composer 的代码库下载和更新成了 PHP 项目迈向自动化测试和部署路上极大的障碍。

为了提高国内 composer 软件库的下载速度,有热心的朋友搭建了网站——https://pkg.phpcomposer.com/ ,镜像了 packagist.org 的内容,提升了 composer 安装依赖库的速度。但是对于自动化测试和部署环境来说,还是要一遍遍地下载文件,仍然会浪费不少时间。

同时,公司内部会有私有软件库,不适合放到 github.com 开源。这些软件库如果需要被公司内多个项目共用,同时处理好版本和依赖问题,就有使用 composer 管理的需要。

提高 composer 安装依赖软件库的速度、管理公司私有软件库,这些需求一起,促使我们要搭建私有的 composer 软件库。

如何使用 satis 搭建 composer 软件库

搭建 composer 软件库,首先最好更深入地熟悉 composer 的功能,推荐通读一遍 composer… Read the rest

How To Secure Nginx with Let’s Encrypt on Ubuntu 18.04


Let’s Encrypt is a Certificate Authority (CA) that provides an easy way to obtain and install free TLS/SSL certificates, thereby enabling encrypted HTTPS on web servers. It simplifies the process by providing a software client, Certbot, that attempts to automate most (if not all) of the required steps. Currently, the entire process of obtaining and installing a certificate is fully automated on both Apache and Nginx.

In this tutorial, you will use Certbot to obtain a free SSL certificate for Nginx on Ubuntu 18.04 and set up your certificate to renew automatically.… Read the rest

WordPress 安装管理命令工具

Recommended installation

The recommended way to install WP-CLI is by downloading the Phar build (archives similar to Java JAR files, see this article for more detail), marking it executable, and placing it on your PATH.

First, download wp-cli.phar using wget or curl. For example:

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Then, check if it works:

php wp-cli.phar --info

To be able to type just wp, instead of php wp-cli.phar, you need to make the file executable and move it to somewhere in… Read the rest

Ubuntu PHP 切换版本

On your system, if you have installed multiple versions of PHP (eg PHP 7.2 and PHP 5.6 both). PHP 7.2 is running as default PHP for Apache and CLI. For any requirement, you need to use PHP 5.6. Then you don’t need to remove PHP 7.2. You can simply switch your PHP version to default used for Apache and command line.

For example, your server has PHP 7.2 and PHP 5.6 both version’s installed. Now following example will help you to switch between both versions. The PHP 5.6 is configured as default PHP version for Apache and CLI. Let’s make PHP 7.2 as default PHP for Apache server and CLI.

  • Read => 
Read the rest