在不打开文件,将全文复制到剪贴板

一般拷贝全文分为以下几步 使用编辑器打开文件 全文选择文件 执行拷贝命令 实际上操作系统提供了一些命令,可以在不打开文件的情况下,将文件内容复制到剪贴板。 mac pbcopy cat aaa.txt | pbcopy linux xsel cat aaa.txt | xsel windows clip cat aaa.txt | clip

2019-08-16 09:25:37 · 1 min · Eddie Wang

macbook pro 开机后wifi无响应问题调研

解决方案 方案1: sudo kill -9 `ps aux | grep -v grep | grep /usr/libexec/airportd | awk '{print $2}'` 或者任务管理器搜索并且杀掉airportd这个进程 参考 https://discussionschinese.apple.com/thread/140138832?answerId=140339277322#140339277322 https://www.v2ex.com/t/505737 https://blog.csdn.net/Goals1989/article/details/88578012

2019-08-15 08:48:22 · 1 min · Eddie Wang

mysql远程连接速度太慢

编辑/etc/my.cnf,增加skip-name-resolve skip-name-resolve 然后重启mysql

2019-08-08 16:56:12 · 1 min · Eddie Wang

xmysql 一行命令从任何mysql数据库生成REST API

github向我推荐这个xmysql时候,我瞟了一眼它的简介One command to generate REST APIs for any MySql Database, 说实话这个介绍让我眼前一亮,想想每次向后端的同学要个接口的时候,他们总是要哼哧哼哧搞个半天给才能我。抱着试试看的心态,我试用了一个疗程,oh不是, 是安装并使用了一下。 说实话,体验是蛮不错的,但是体验一把过后,我想不到这个工具的使用场景,因为你不可能把数据库的所有表都公开出来,让前端随意读写, 但是试试看总是不错的. 1 来吧,冒险一次! 安装与使用 npm install -g xmysqlxmysql -h localhost -u mysqlUsername -p mysqlPassword -d databaseName浏览器打开:http://localhost:3000, 应该可以看到一堆json 2 特点 产生REST Api从任何mysql 数据库 🔥🔥 无论主键,外键,表等的命名规则如何,都提供API 🔥🔥 支持复合主键 🔥🔥 REST API通常使用:CRUD,List,FindOne,Count,Exists,Distinct批量插入,批量删除,批量读取 🔥 关联表 翻页 排序 按字段过滤 🔥 行过滤 🔥 综合功能 Group By, Having (as query params) 🔥🔥 Group By, Having (as a separate API) 🔥🔥 Multiple group by in one API 🔥🔥🔥🔥 Chart API for numeric column 🔥🔥🔥🔥🔥🔥 Auto Chart API - (a gift for lazy while prototyping) 🔥🔥🔥🔥🔥🔥 XJOIN - (Supports any number of JOINS) 🔥🔥🔥🔥🔥🔥🔥🔥🔥 Supports views Prototyping (features available when using local MySql server only) Run dynamic queries 🔥🔥🔥 Upload single file Upload multiple files Download file 3 API 概览 HTTP Type API URL Comments GET / Gets all REST APIs GET /api/tableName Lists rows of table POST /api/tableName Create a new row PUT /api/tableName Replaces existing row with new row POST :fire: /api/tableName/bulk Create multiple rows - send object array in request body GET :fire: /api/tableName/bulk Lists multiple rows - /api/tableName/bulk?_ids=1,2,3 DELETE :fire: /api/tableName/bulk Deletes multiple rows - /api/tableName/bulk?_ids=1,2,3 GET /api/tableName/:id Retrieves a row by primary key PATCH /api/tableName/:id Updates row element by primary key DELETE /api/tableName/:id Delete a row by primary key GET /api/tableName/findOne Works as list but gets single record matching criteria GET /api/tableName/count Count number of rows in a table GET /api/tableName/distinct Distinct row(s) in table - /api/tableName/distinct?_fields=col1 GET /api/tableName/:id/exists True or false whether a row exists or not GET /api/parentTable/:id/childTable Get list of child table rows with parent table foreign key GET :fire: /api/tableName/aggregate Aggregate results of numeric column(s) GET :fire: /api/tableName/groupby Group by results of column(s) GET :fire: /api/tableName/ugroupby Multiple group by results using one call GET :fire: /api/tableName/chart Numeric column distribution based on (min,max,step) or(step array) or (automagic) GET :fire: /api/tableName/autochart Same as Chart but identifies which are numeric column automatically - gift for lazy while prototyping GET :fire: /api/xjoin handles join GET :fire: /dynamic execute dynamic mysql statements with params GET :fire: /upload upload single file GET :fire: /uploads upload multiple files GET :fire: /download download a file GET /api/tableName/describe describe each table for its columns GET /api/tables get all tables in database 3 更多资料 项目地址:https://github.com/o1lab/xmysql

2019-08-06 13:56:20 · 2 min · Eddie Wang

Jenkins 全局变量参考

docker The docker variable offers convenient access to Docker-related functions from a Pipeline script.Methods needing a slave will implicitly run a node {…} block if you have not wrapped them in one. It is a good idea to enclose a block of steps which should all run on the same node in such a block yourself. (If using a Swarm server, or any other specific Docker server, this probably does not matter, but if you are using the default server on localhost it likely will.)Some methods return instances of auxiliary classes which serve as holders for an ID and which have their own methods and properties. Methods taking a body return any value returned by the body itself. Some method parameters are optional and are enclosed with []. Reference: ...

2019-08-06 13:48:59 · 8 min · Eddie Wang

【笔记】操作系统:虚拟化 并发 持久化

虚拟化 问题: 操作系统如何虚拟化? 虚拟化有什么好处? 操作系统向下控制硬件,向上提供API给应用程序调用。 系统的资源是有限的,应用程序都需要资源才能正常运行,所以操作系统也要负责资源的分配和协调。通常计算机有以下的资源。 cpu 内存 磁盘 网络 有些资源可以轮流使用,而有些资源只能被独占使用。

2019-08-01 13:20:13 · 1 min · Eddie Wang

问题排查方法论

处理问题的关键在于收集数据,基于数据找出触发条件。 1. 处理步骤 收集信息并记录:包括日志,截图,抓包,客户反馈等等。注意:原始数据非常重要,如果不记录下来,有可能再也无法去重现。 分析数据:注意:分析数据不要有提前的结果倾向,否者只会找有利于该倾向的证据。 给出报告和建议,以及解决方案,并记录存档 2. 概率维度 问题出现的概率,是一个非常重要的指标,需要提前明确 必然出现:在某个条件下,问题必然出现 注意:必然出现的问题,也可能是小范围内的必然,放到大范围内,就不是必然出现。 偶然出现:问题出现有一定的概率性 注意:问题偶然出现也并不一定说明问题是偶然的,有可能因为没有找到唯一确定的触发条件,导致问题看起来是偶然的。 3. 特征维度 时间特征:集中于某一段时间产生 地理特征:集中于某一片区域产生 人群特征:集中于某几个人产生 设备特征:集中于某些电脑或者客户端

2019-08-01 08:20:34 · 1 min · Eddie Wang

解决问题的思维模式

问题分为两种,一种是搜索引擎能够找到答案的,另一种是搜索引擎找不到答案的。 按照80-20原则,前者估计能占到80%,而后者能占到20%。 1 搜索引擎的使用 1.1 如何让搜索引擎更加理解你? 如果你能理解搜索引擎,那么搜索引擎会更加理解你。 搜索引擎是基于关键词去搜索的,所以尽量给搜索引擎关键词,而不是大段的报错 关键词的顺序很重要,把重要的关键词放在靠前的位置 1.2 如何提炼关键词? 1.3 不错的所搜引擎推荐? 2 当搜索引擎无法解决时? 当搜索引擎无法解决时,可以从哪些方面思考? 拼写或者格式等错误 上下文不理解,语境不清晰,断章取义

2019-07-30 20:16:39 · 1 min · Eddie Wang

现代诗 五首 摘抄

梦与诗 胡适 醉过才知酒浓爱过才知情重你不能做我的诗正如我不能做你的梦 情歌 刘半农天上飘着些微云地上吹着些微风啊!微风吹动了我的头发教我如何不想她? 沙扬娜拉 赠日本女郎 徐志摩最是那一低头的温柔像一朵水莲花不胜凉风的娇羞道一声珍重道一声珍重那一声珍重里有蜜甜的忧愁沙扬娜拉! ...

2019-07-29 22:20:59 · 1 min · Eddie Wang

ghost博客 固定feature博客

Docker ghost 安装 docker run -d --name myghost -p 8090:2368 -e url=http://172.16.200.228:8090/ \ -v /root/volumes/ghost:/var/lib/ghost/content ghost 模板修改 参考 https://www.ghostforbeginners.com/move-featured-posts-to-the-top-of-your-blog/

2019-07-22 17:30:35 · 1 min · Eddie Wang