Skip to content

Instantly share code, notes, and snippets.

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 26, 2024 10:02
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@z007
z007 / IdCard.txt
Created October 29, 2014 19:01
正则表达式Id card(身份证)验证
来源:http://www.cnblogs.com/devinhua/articles/1726292.html
1、简单的正则表达式:
(1)preg_match("/^(\d{18,18}|\d{15,15}|\d{17,17}x)$/",$id_card)
(2)preg_match("/^(\d{6})(18|19|20)?(\d{2})([01]\d)([0123]\d)(\d{3}) (\d|X)?$/",$id_card)
(3)preg_match("/(^\d{15}$/)|(\d{17}(?:\d|x|X)$/),$id_card)
@yangl
yangl / springmvc-servlet.xml
Last active April 17, 2018 03:36
SpringMVC + FastJson + httl配置。springmvc在@responsebody时返回已格式化的json串,方便测试api接口时查看返回数据;·prettyPrint=true·搞定
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">