加载中
解决WSL2中Vmmem内存占用过大问题

右键此电脑->管理->磁盘管理,选中数据盘,点菜单栏操作->创建vhd,按提示创建vhdx文件 新建wsl配置文件 %UserProfile%.wslconfig [wsl2] memory=4GB swap=2GB swapFile=F:\wsl.ubuntu\swap...

10/20 11:14
79
thinkphp6连接并使用sqlite

.env [SQLITE] DATABASE = /path/Administrative-divisions-of-China/dist/data.sqlite config/database.php , 'sqlite' => [ // 数据库类型 'type' => 'sqlite', ......

wsl2自动启动服务并且自动更新hosts文件里的ip

在子系统中创建脚本 vim /etc/init.wsl 脚本内容如下 #! /bin/sh /etc/init.d/ssh start /etc/init.d/httpd start /etc/init.d/mysql start export WSLIP=$(ip addr show eth0 | grep 'inet...

linux命令导出redis特定key值到指定文件中

一行命令搞定: ./redis-cli -h xx.xx.xx.xx get 'xxx' > xx.txt

08/29 13:32
80
mysql备份所有数据库

1、去数据库执行 select concat('mysqldump -uroot -p密码 ',`SCHEMA_NAME`,' > D:\\备份\\2017-01-14\\', `SCHEMA_NAME`, '.sql') from `information_schema`.`SCHEMATA` where `SCHEMA_NA...

08/29 13:30
0
uni-app中使用webview加载网页,支持后退和关闭

pages.json "pages": [ { "path" : "pages/index/web", "style": { "app-plus": { "titleNView": { "buttons": [{ ......

08/27 14:19
860
thinkphp6+phpunit+mockery 做单元测试

使用composer安装phpunit composer require phpunit/phpunit --dev composer require mockery/mockery --dev 配置composer { "autoload-dev": { "psr-4": { "tests\": "tests" ......

thinkphp 6.0 phpstan配置

首先是composer { "require-dev": { "symfony/var-dumper": "^4.2", "topthink/think-trace": "^1.0", "phpstan/phpstan": "^0.12.33" }, "autoload": { "psr-4": {......

thinkphp5.1 phpstan配置

参考这篇 https://my.oschina.net/u/2266306/blog/4428395 然后改 ./phpstan.neon # Magic behaviour with __get, __set, __call and __callStatic is not exactly static analyser-friendl...

在vant中在线引用iconfont图标

public/index.html <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_xxx_xxx.css"> 使用van-icon <van-icon class="iconfont" class-prefix="icon" name="name"/>......

07/05 16:57
554
在vue-vant中使用Clipboard

@/mixins/Clipboard.js import { Toast } from 'vant' import Clipboard from 'clipboard' export default { directives: { copy: { inserted(el) { const obj = new Clipboard(el) ......

php生成唯一订单号

使用 https://github.com/godruoyi/php-snowflake 来生成 <?php declare(strict_types=1); use think\facade\Cache; use think\facade\Config; use Godruoyi\Snowflake\Snowflake; use Godr...

thinkphp queue + supervisor

supervisord.d/queue.ini [program:xxx_queue] command=php think queue:work --queue notify --daemon --tries 10 ; 被监控进程 directory=/mnt/wwwroot/xxx ;process_name=%(process_num)0...

nginx为workerman、socketio提供ssl

nginx location /wss { proxy_pass http://127.0.0.1:3322; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X...

mosquitto websocket配置

mosquitto.conf # mqtt协议 port xxxx protocol mqtt websocket协议 listener xxxx protocol websockets nginx(ws或wss) location /mqtt { proxy_pass http://127.0.0.1:xxxx; #address of...

05/14 19:22
558
php字符串转数组等效于js的new Uint8Array(readAsArrayBuffer)

php版本 $arr = str_split($LFVData); $decArr = []; foreach ($arr as $value) { $decArr[] = hexdec(bin2hex($value)); } $arr = $decArr; ... js原版 // 放置解析好的 lfv数据 let lfvRes...

04/17 16:31
120
flex分列布局

.flex-row { display: flex; } .flex-row::after { display: none } .flex-row-justify-center { -webkit-box-pack: center; -webkit-justify-content: center; justify-content: center }.....

02/12 14:26
242
轻松实现导航栏排列

.main-list { display: flex; justify-content: space-around; } .main-list .main-list-item { } <div class="main-list"> <div class="main-list-item"> 天猫新品 </div> <div class="mai...

02/12 10:55
95
简易flex双列布局

.flex-list { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; backgro......

02/10 21:06
458
安装nvm

ubuntu nvm仓库地址 //安装nvm wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.35.2/install.sh | bash source ~/.nvm/nvm.sh //更换为淘宝源 echo -e "\nexport NVM_NODE...

没有更多内容

加载失败,请刷新页面

返回顶部
顶部