linux 常用命令
lsofhttps://www.jianshu.com/p/a3aa6b01b2e1list openfiles 1lsof -i :22 创建用户https://blog.csdn.net/taolusi/article/details/81304057 12adduser:会自动为创建的用户指定主目录、系统shell版本,会在创建时输入用户密码。useradd:需要使用参数选项指定上述基本设置,如果不使用任何参数,则创建的用户无密码、无主目录、没有指定shell版本。 time获取命令执行时间 1234time python3 Oreal.pyreal 0m12.471suser 0m9.756ssys 0m0.251s dnf软件源列表12345# 当前启用的dnf repolist# 全部源dnf repolist all dnf禁用软件源1sudo dnf config-manager --set-disable sublime-text
小乌龟 git 使用方法 常用命令
推送标签 1git push origin master --tags
docker 常用 命令
容器管理 启动容器 1docker run -it ubuntu /bin/bash 查看所有的容器 1docker ps -a 启动一个已停止得容器 1docker start b750bbbcfd88 后台运行 1docker run -itd --name ubuntu-test ubuntu /bin/bash 停止一个容器 1docker stop 容器ID 进入容器 12docker attach 容器IDdocker exec -it 243c32535da7 /bin/bash # 退出后容器不退出 导出容器快照 1docker export 容器 > /data/ubuntu.tar 导入容器快照 1cat docker/ubuntu.tar | docker import - test/ubuntu:v1 删除容器(必须停止状态) 1docker rm -f 容器id 查看日志 1docker logs ID或者名字 查看程序进程 1docker top ID或者名字 镜像管理 展示本地镜像 1docker ...
yii2 使用记录
安装遇到Content-Length mismatch, received 98048 bytes out of the expected 4075770报错 修改composer.json的config键值 123456789"config": { "process-timeout": 1800, "fxp-asset" : { "installer-paths" : { "npm-asset-library" : "vendor/npm", "bower-asset-library" : "vendor/bower" } }}, 伪静态 .htaccess文件内容为 12345Options +FollowSymLinksRewriteEngine onRewri...
php 笔试题
第一部分 程序如下,写出执行结果 12345678910$count = 3;function get_count(){ static $count = 0; return $count++;}echo $count; //3++$count;echo get_count(); //0echo get_count(); //1 有文件dir/upload.img.jpg,使用2种以上方法获取拓展名 123456789101112131415// pathinfopathinfo($dir)['extension'];array ( 'dirname' => 'dir', 'basename' => 'upload.img.jpg', 'extension' => 'jpg', 'filename' => 'upload.img...
php使用java时间戳
1define("JAVA_TIME", date("Y-m-d\TH:i:s") . '.000+0800');
extract compact list 数组导出变量 变量导入数组 数组值赋值给变量
extract从数组中将变量导入到当前的符号表 1234567$input = [ "phone" => "130111111111", "name" => "test", "sex" => "1",];extract($input);echo $phone; compact建立一个数组,包括变量名和它们的值,compact() 在当前的符号表中查找该变量名并将它添加到输出的数组中 1234$name = "test";$phone = "130111111111";$res = compact("name","phone");print_r($res); list把数组中的值赋给一些变量,这不是真正的函数,而是语言结构 123$info = array('coffee', 'brown', '...
golang 腾讯云 cos 上传文件 刷新 cdn
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990package mainimport ( "context" "fmt" "net/url" "os" "strings" cdn "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn/v20180606" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" "github.com/tencentcloud/tencentcloud-sdk-go/t...
设计模式 原则
单一职责原则 Single Responsibility Principle 一个类应该只有一个职责 里氏替换原则 Liskov Subsititution Principle 使用基类的地方必须能透明的使用子类对象 子类必须实现父类方法 子类可以有自己的个性 覆盖或实现父类方法时输入参数可以被放大 覆写或实现父类的方法时输出结果可以被缩小 依赖倒置原则 Dependence Inversion Principle 高层模块不应该依赖低层模块,两者都应该依赖其抽象 抽象不应依赖具体,具体应该依赖抽象 构造函数传递依赖对象 Setter方法参数传递依赖对象 接口生命依赖对象 尽量不要覆写基类方法 结合里氏替换原则使用 接口隔离 Interface Segregation Principle 客户端不应依赖它不需要的接口 类间的依赖关系应该建立在最小接口上 迪米特法则 Law of Demeter 最少知识原则Least Knowledge Principle 外观模式,中介者模式对迪米特法则进行了应用(比如:系统中) 一个对象应该对其他对象尽可能少的了解 如果两个类不必直接...
golang 静态编译 sqlite
需要安装mingw-w64-install不是Cygwin64 Terminal