Skip to content

Instantly share code, notes, and snippets.

View GithubMrxia's full-sized avatar

Mrxia GithubMrxia

View GitHub Profile
@GithubMrxia
GithubMrxia / InvoiceController
Last active April 2, 2020 01:54
使用插件 Laravel Excel 导出 excel
<?php
namespace App\Http\Controllers\Invoice;
use App\Exports\MerchantInvoiceReviewExport;
use App\Http\Controllers\RestController;
use Illuminate\Http\Request;
use App\Models\MerchantInvoiceReview;
use Maatwebsite\Excel\Facades\Excel;
@GithubMrxia
GithubMrxia / base.sh
Created May 15, 2020 03:06
unix 脚本
#!/bin/bash
# 分个字符串
function splitStr()
{
OLD_IFS=${IFS}
IFS=$2,
arr=($1)
IFS=${OLD_IFS}
}
@GithubMrxia
GithubMrxia / alpine
Last active May 21, 2020 07:11
docker alpine 基础镜像
FROM alpine:3.9.6
RUN set -xe \
&& apk add --no-cache --virtual .build-deps \
git \
&& apk add --no-cache \
tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del .build-deps
@GithubMrxia
GithubMrxia / regex.md
Created February 22, 2021 08:42
常用正则表达式

类型|正则|备注 ---|---| 手机号| ^1\d{10}$ 座机号| 0\d{2,3}-\d{7,8}(-\d{1,6})? 身份证号| ^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}(\d|x|X)$ 两位小数 | ^\d+(\.\d{1,2})?$| 可以为整数 两位小数 | (^(\d{2,}|[1-9])+(\.\d{1,2})?$)|(^0\.((\d[1-9])|([1-9]0?))$) | 可以为整数,最小0.01