无题

  • laravel-后台API token管理、用户管理、权限管理、操作日志、文章管理、分类管理
  • vue后台模板(使用已开源的)
  • socket、swoole、easyswoole
  • phpmywind改造成自适应的(html-php混编)
  • mysql-数据优化、索引优化、事务、锁机制
  • redis 队列等场景使用
  • python 爬数据
  • go

todo-list

  • mac多php、mysql、nginx、apache版本安装
  • thinkpad共享文件夹-mac映射共享文件夹
  • vscode远程编辑配置
  • laravel-admin 参考 部署 moell-peng/mojito
  • easyswoole-长连接认证-laravel的各种认证对比

开机自动挂载磁盘

Ubuntu开机自动挂载磁盘 开机挂载 开机mount

  1. sudo blkid #查看分区UUID
  2. vi /etc/fstab 将分区UUID写入配置文件
# fastab 示例文件
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=7dd56b47-17c0-452d-be38-72b08e12b9c2 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=0F16-F098  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

# 自动挂载挂载磁盘
UUID=b172dde3-f325-4940-8126-8f81afd94d87 /home/data1 ext4 defaults 0 0
UUID=95a8f11b-e426-4d25-b0c0-6657fe86aeb5 /home/data2 ext4 defaults 0 0
  1. sudo mount -a # 验证配置文件是否正确 无输出说明没有问题 否则可能无法开机

相关资料

开机自动挂载硬盘

内网DNS服务搭建

内网DNS服务搭建 docker搭建DNS服务

  1. docker pull andyshinn/dnsmasq
  2. 工作目录 /websys/opt/dnsmasq
  3. 域名映射ip文件 my_dnsmasq_hosts
192.168.1.102   test1.com
192.168.1.102   test2.com
  1. dns文件 my_resolv.dnsmasq
nameserver 114.114.114.114
nameserver 8.8.8.8
  1. 启动容器
sudo docker run -d \
-p 192.168.1.102:53:53/tcp \
-p 192.168.1.102:53:53/udp \
-v /websys/opt/dnsmasq/my_dnsmasq_hosts:/etc/my_dnsmasq_hosts \
-v /websys/opt/dnsmasq/my_resolv.dnsmasq:/etc/my_resolv.dnsmasq \
--cap-add=NET_ADMIN \
--name my_dns_server \
andyshinn/dnsmasq
  1. 进入容器修改文件 docker exec -it my_dns_server /bin/sh
vi /etc/dnsmasq.conf 
# 修改两处地方,都需要取消掉注释,并制定文件
addn-hosts=/etc/my_dnsmasq_hosts
resolv-file=/etc/my_resolv.dnsmasq
  1. 退出容器重启-docker restart my_dns_server
  2. 修改路由器上的DNS或客户端电脑上的DNS

docker-compose.yml 版

version: '2'
services:
registry:
  image: andyshinn/dnsmasq:latest
  container_name: my_dns_server
  tty: true
  cap_add:
    - NET_ADMIN
  ports:
    - 192.168.1.102:53:53/tcp
    - 192.168.1.102:53:53/udp
  volumes:
    - /home/wilker/Desktop/a_dns/my_dnsmasq_hosts:/etc/my_dnsmasq_hosts
    - /home/wilker/Desktop/a_dns/my_resolv.dnsmasq:/etc/my_resolv.dnsmasq

相关资料

ubuntu_内网dns服务器搭建

laravel-admin 加密方式

laravel-admin 加密的方式 laravel 密码加密

laravel-admin 密码加密用的是laravel中的bcrypt函数, 最后调用的是系统函数password_hash

\vendor\encore\laravel-admin\src\Console\CreateUserCommand.php
\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php

\vendor\laravel\framework\src\Illuminate\Hashing\BcryptHasher.php

    /**
     * Hash the given value.
     *
     * @param  string  $value
     * @param  array   $options
     * @return string
     *
     * @throws \RuntimeException
     */
    public function make($value, array $options = [])
    {
        $hash = password_hash($value, PASSWORD_BCRYPT, [
            'cost' => $this->cost($options),
        ]);

        if ($hash === false) {
            throw new RuntimeException('Bcrypt hashing not supported.');
        }

        return $hash;
    }

    /**
     * Check the given plain value against a hash.
     *
     * @param  string  $value
     * @param  string  $hashedValue
     * @param  array   $options
     * @return bool
     */
    public function check($value, $hashedValue, array $options = [])
    {
        if (strlen($hashedValue) === 0) {
            return false;
        }

        return password_verify($value, $hashedValue);
    }

相关资料

laravel-admin 加密