摘要: 准备 LAMP 环境 1.安装 Apache2 安装好后,您可以通过访问服务器IP地址 x.x.x.x 查看到 “it works” 界面,说明 apache2 安装成功。 2 .安装 PHP 组件 3 . 安装 php 相关组件: 4 . 安装 MySQL 服务 安装 MySQL 过程中,控制台会 阅读全文
posted @ 2018-07-20 12:09 善未易明 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 简单例子: 1 含义 扩展运算符( spread )是三个点(...)。它好比 rest 参数的逆运算,将一个数组转为用逗号分隔的参数序列。 上面代码中,array.push(...items)和add(...numbers)这两行,都是函数的调用,它们的都使用了扩展运算符。该运算符将一个数组,变为 阅读全文
posted @ 2018-07-10 12:24 善未易明 阅读(4179) 评论(0) 推荐(0) 编辑
摘要: Ubuntu终端 快捷键功能 Tab 自动补全 Ctrl+a 光标移动到开始位置 Ctrl+e 光标移动到最末尾 Ctrl+k 删除此处至末尾的所有内容 Ctrl+u 删除此处至开始的所有内容 Ctrl+d 删除当前字符 Ctrl+h 删除当前字符前一个字符 Ctrl+w 删除此处到左边的单词 Ct 阅读全文
posted @ 2018-07-04 10:23 善未易明 阅读(1052) 评论(0) 推荐(0) 编辑
摘要: 秘钥登录远端服务器 rsync -avze 'ssh -i ./id_rsa' root@remoteIp:/xx/remotefile.txt ./localpath (./id_rsa为本地秘钥路径) rsync文档 用户名/密码登录远端服务器 1.从远程ubuntu主机拷贝文件/文件夹到本地( 阅读全文
posted @ 2018-06-08 17:26 善未易明 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 备份(导出) 1.导出单个collection-.json格式 mongoexport --host:127.0.0.1 --port:27017 --db test --collection testcollection --out /xxx/testcollection.json2.导出整个db 阅读全文
posted @ 2018-06-08 17:16 善未易明 阅读(180) 评论(0) 推荐(0) 编辑
摘要: //(蓝色this部分为dom) scrollToLeft(option?: { duration?: number, direction?: number }) { let direction = option.direction || 1 let animDuration = option.du 阅读全文
posted @ 2018-06-04 10:46 善未易明 阅读(502) 评论(0) 推荐(0) 编辑
摘要: 常用:查看最近1000行log sudo journalctl -f --lines=1000 -u server.$PROJECT_NAME --no-full, --full, -l 如果字段内容超长则以省略号(…)截断以适应列宽。 默认显示完整的字段内容(超长的部分换行显示或者被分页工具截断) 阅读全文
posted @ 2018-06-04 10:34 善未易明 阅读(1145) 评论(0) 推荐(0) 编辑
摘要: upsert:true:如果要更新的文档不存在的话会插入一条新的记录 $setOnInsert操作符会将指定的值赋值给指定的字段,如果要更新的文档存在那么$setOnInsert操作符不做任何处理; 使用: db.collection.update( <query>, {$setOnInsert:{ 阅读全文
posted @ 2018-04-24 16:53 善未易明 阅读(4629) 评论(0) 推荐(0) 编辑
摘要: dom.bind("input propertychange",()=>{ xxxxxx }) oninput,onpropertychange,onchange的用法 onchange触发事件必须满足两个条件: a)当前对象属性改变,并且是由键盘或鼠标事件激发的(脚本触发无效) b)当前对象失去焦 阅读全文
posted @ 2018-04-24 12:24 善未易明 阅读(356) 评论(0) 推荐(0) 编辑
摘要: dom.removeAttribute("capture") } 读取图片(fileChoose即为input) fileChoose.change=()=>{ let file=fileChoose.files[0], reader=new FileReader(); reader.onLoad= 阅读全文
posted @ 2018-04-17 19:07 善未易明 阅读(9459) 评论(0) 推荐(0) 编辑