• todo tools
  • git sync back 体系 using beyondcompare bc
  • 添加一个 sync 的步骤
  • share 文章 lists
  • log filter 日志过滤器
  • 验证码 人工生成
  • android 同步工具
  • 便签
  • git head 历史工具
  • docs searcher
  • 收藏夹 浏览器辅助工具
  • mp3 mp4 player
  • 客户端 markdown编辑器
  • curl gogs 添加协作者 windows下有问题:
  • 文件比较器 格式化
  • 历史功能
  • bash debug tool
  • 密码管理工具
  • 图片批量缩放处理
  • 定位问题优化
  • 批量string format工具
  • pdf 换行 trim
  • anchors extractor
  • vscode buffer viewer
  • 微信群发
  • 按键精灵
  • mysql learn tool
  • multiline converter
  • lv1= lv2= type=todo
    todo tools
    mynote todo index 
    lv1= lv2= type=

    git sync back 体系 using beyondcompare bc

    beyond compare reading 
    E:\back\git
    X:\mytool\sync
    syncfiles todo 
    demo:
    自动同步 
    git@121.40.183.99:fileback.git
    set path=C:\Program Files (x86)\Beyond Compare;%path%
    filter可以从bc中复制,注意引号
    load "X:\project\Visual Studio Projects\FindHelper\ExpmtCS2" E:\back\git\ExpmtCS2
    filter "-*.suo;-*.lnk;-.\.svn\;-.\bin\Debug\;-.\bin\Release\;-.\bin2\;-.\dll\;-.\obj\"
    sync mirror:left->right

    添加一个 sync 的步骤

    X:\mytool\sync 中复制一份,如 element-ui
    将 bc 的调用脚本 注册到 X:\run_as_service\index.php,将得到的 path 序号写入 loop 脚本run as service using apache httpd 
    lv1= lv2= type=todo

    share 文章 lists

    正则,以及工具;多语言正则比较
    将遇到的问题做成练习题
    Element.attributes & property 
    float 被遮挡(relative)

    log filter 日志过滤器

    日志过滤器:将特定的pattern日志过滤掉,减少日志的显示数量。

    验证码 人工生成

    输入选中的四个字:

    android 同步工具

    1 查询服务器有哪些文件需要更新,
    rsync for android
    lv1= lv2= type=

    便签

    微信登录
    支持富文本、语音、图片、涂鸦
    lv1= lv2= type=

    git head 历史工具

    有的时候忘了加tag,需要回滚版本,但却不知道上个版本用的是哪个commit,此时可以查看.git/logs/HEAD这个文件的历史记录:
    86b8ca2343168b377bfdd956852906cfc82baba1 89289f6589bfce5e8482e99fab9f642b14cd8fcc yuebin.chen <cyb@piaojuke.com> 1551172002 +0800	commit: add repo mynote_docs
    89289f6589bfce5e8482e99fab9f642b14cd8fcc d4da700b4ff311cf34a74142b4d5a5cc7cbcc4f8 yuebin.chen <cyb@piaojuke.com> 1551840662 +0800	commit: update zhenghao key
    1551172002 +0800,这个就是时间,为了方便查看,还需要一个批量将时间戳转北京时间的工具。
    lv1= lv2= type=todo

    docs searcher

    区分中文版、英文版、clone+modify版本、原始版本
    lv1= lv2= type=todo

    收藏夹 浏览器辅助工具

    方便整理
    数据同步
    链接快照,方便查看这个收藏的是什么
    lv1= lv2= type=

    mp3 mp4 player

    小程序 mp3 player,账号登录,数据同步(增量,wifi时自动同步,流量时暂停,用户可以手动触发),基本的播放功能(暂停、播放、停止、前进后退)
    本地播放
    数据上传 暂时不用做,后台用户通过服务器手动上传
      也不是用户通过app上传
    〖E:\projects\wx-mp4〗
    app\app.js
      config: {
        apiUrl: "https://wx.eson.site/api",
        apiHost: "http://wx.eson.site/",
      }
    数据库配置
    ffmpeg 用于视屏生成图片
    http://ffmpeg.org/
    右上角详情,不校验https: 
    lv1= lv2= type=

    客户端 markdown编辑器

    lv1= lv2= type=

    curl gogs 添加协作者 windows下有问题:

    curl -v -X PUT -H "Content-Type: application/json" -d '{"permission":"admin"}' http://dev.rongyipiao.com:3000/api/v1/repos/1095239193/1095239193/collaborators/eson?token=fbbaf8cad4a023db25cc589a8679ecd03cb92f56
    lv1= lv2= type=

    文件比较器 格式化

    在乌龟等配置中代替bc,先进行一次格式化,完成后再调用bc比较
    可以设置黑白名单,哪些项目不进行格式化
    全局快捷开关格式化功能
    lv1= lv2= type=

    历史功能

    阅读历史记录:当前阅读的版本号,下次再读,如果发生了变化,可以提醒。
    历史版本比较:比较变化的部分。
    lv1= lv2= type=

    bash debug tool

    每一条命令后面加一个read(或者打印当前执行的命令);完成后删除
    lv1= lv2= type=

    密码管理工具

    运行一下就自动post登录
    其他第三方工具研究
    lv1= lv2= type=

    图片批量缩放处理

    E:\projects\misc\php_narrow_img
    批量的把禅道后台的图片进行缩放,避免大图不便于查看。
    脚本参数:
    1 srcDir
    2 destDir:如果等于srcDir,则效果为覆盖原图
    3 maxHeight:超过此高度进行缩放
    4 备份路径:如果1/2参数相等,则将图片备份至此目录
    lv1= lv2= type=

    定位问题优化

    方案2:
    不要fixed,鼠标移近后显示
    方案3:
    使用before,参考:
    https://doc.fastadmin.net/docs/index.html#%E5%9C%A8%E7%BA%BF%E6%BC%94%E7%A4%BA-2
    .content h2:before,
    .content h3:before {
        content: '';
        display: block;
        margin-top: -91px;
        height: 91px;
        visibility: hidden;
    }
    lv1= lv2= type=todo

    批量string format工具

    〖E:\projects\misc\StringFormat〗
    http://a.misc.my/StringFormat/StringFormat.html
    可以定义分隔符
    是否trim可选
    template:
    abc:%1-%%-%1-%2xxx
    input source with "," separator:
    x1,x2
    y1,y3
    输出:
    abc:x1-%-x1-x2
    abc:y1-%-y1-y3
    %1
    %%
    a
    b
    c
    d
    e
    select * from ... in (
    'a',
    'b',
    'c',
    ..
    'e')
    '%1',
    =>
    'a',
    'b',
    'c',
    ..
    'e'
    lv1= lv2= type=

    pdf 换行 trim

    https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent
    有没有这个怎么用的例子?就是需要在代码里触发一个键盘事件
    E:\projects\misc\trim-newline.html
    snippet:
    $_ = $;
    // root = $("#yDmH0d > c-wiz > div > div.WFnNle > c-wiz > div.hgbeOc")
    root = $('#yDmH0d > c-wiz > div > div.WFnNle > c-wiz > div')
    root = $("#yDmH0d > c-wiz > div > div.WFnNle > c-wiz > div.hgbeOc")
    btn = document.createElement("button")
    btn.innerText = "转";
    btn.onclick=function() {
        console.log('1111')
        ta = $_("#yDmH0d > c-wiz > div > div.WFnNle > c-wiz > div.OlSOob > c-wiz > div.ccvoYb > div.AxqVh > div.OPPzxe > c-wiz.rm1UF.dHeVVb.UnxENd > span > span > div > textarea")
        ta.value = ta.value.replace(/\n/g, " ");
        ta.focus();
    }
    root.appendChild(btn);
    lv1= lv2= type=

    anchors extractor

    selection; range 
    http://a.misc.my/anchor-extractor/anchor-extractor.html
            function test(e) {
                var clipboardData = (e.clipboardData || e.originalEvent.clipboardData);
                if (clipboardData.items) {
                    var items = clipboardData.items;
                    var len = items.length;
                    for (var i = 0; i < len; i++) {
                        if (items[i].type.indexOf("text/html") !== -1) {
                            items[i].getAsString((s) => {
                                core(s);
                            });
                            break;
                        } else if (items[i].type.indexOf('text/plain') !== -1) {
                            core(items[i].getAsString((s) => {
                                core(s);
                            }));
                        }
                    }
                }
                function core(s) {
                    let div = document.createElement('div');
                    document.body.appendChild(div);
                    div.innerHTML = s;
                    let anchors = div.querySelectorAll('a');
                    let result = [];
                    anchors.forEach(a => {
                        result.push(a.text, a.href, '');
                    });
                    document.body.removeChild(div);
                    let ta = document.querySelector('#ta');
                    ta.value = result.join('\n');
                    ta.select();
                    const res = document.execCommand('copy');
                }
            }
    直接执行(如果可以选择)或者复制出来(从 elements panel 中)
        function depth(node) {
            let i = 0;
            while (node) {
                i++;
                node = node.parentNode;
            }
            return i;
        }
        function commonAncestor(node1, node2) {
            let depth1 = depth(node1);
            let depth2 = depth(node2);
            // console.log(node1, node2, depth1, depth2);
            while (depth1 > depth2) {
                node1 = node1.parentNode;
                depth1--;
            }
            while (depth1 < depth2) {
                node2 = node2.parentNode;
                depth2--;
            }
            // console.log(node1, node2, depth1, depth2);
            while (node1 !== node2) {
                node1 = node1.parentElement;
                node2 = node2.parentElement;
            }
            return node1;
        }
        function test() {
            let sel = document.getSelection();
            let ancestor = commonAncestor(sel.anchorNode, sel.focusNode);
            let anchors = ancestor.querySelectorAll('a');
            let result = [];
            anchors.forEach(a => {
                if (sel.containsNode(a, true)) {
                    result.push(a.text, a.href, '');
                }
            });
            // console.log(result.join('\n'));
            const textareaEl = document.createElement('textarea');
            textareaEl.setAttribute('readonly', 'readonly');
            textareaEl.value = result.join('\n');
            document.body.appendChild(textareaEl);
            textareaEl.select();
            const res = document.execCommand('copy');
            document.body.removeChild(textareaEl);
        }
        test();
    lv1= lv2= type=

    vscode buffer viewer

    http://a.misc.my/binary-tools/vscode-buffer-viewer.html
    lv1= lv2= type=

    微信群发

    SHA-1: 616e1528b9286288abf7f58f4fcbb61b7bd6a0c2
    * 微信群发
    http://192.168.0.19:8157/StringFormat/WxMsg.html
    1680 x 1050
    左微信 右浏览器
    1 刷新
    2 f10
    3 观察测试组
    4 ctrl+f12 终止
    配置循环次数为数据行数
    完成后点击 ctrl shift 键,有时这两个键会处于按下状态
    搜聊天记录框 要遮挡输入框
    注意发送是否加 ctrl

    按键精灵

    '==========以下是按键精灵录制的内容==========
    MoveTo 942, 710
    Delay 97
    KeyUp "F12", 1
    Delay 17
    KeyUp "Shift", 1
    Delay 27
    KeyUp "Ctrl", 1
    MoveTo 1140, 293
    Delay 516
    LeftClick 1
    Delay 1
    LeftUp 1
    Delay 399
    KeyDown "Alt", 1
    Delay 1
    Delay 310
    KeyDown "C", 1
    Delay 1
    Delay 152
    KeyUp "Alt", 1
    Delay 1
    Delay 2
    KeyUp "C", 1
    Delay 1
    MoveTo 460, 11
    Delay 453
    LeftClick 1
    Delay 106
    KeyDown "Ctrl", 1
    Delay 107
    KeyDown "F", 1
    Delay 135
    KeyUp "F", 1
    Delay 265
    KeyDown "V", 1
    Delay 141
    KeyUp "V", 1
    Delay 20
    KeyUp "Ctrl", 1
    Delay 502
    KeyDown "Enter", 1
    Delay 125
    KeyUp "Enter", 1
    MoveTo 1248, 325
    Delay 335
    LeftClick 1
    LeftUp 1
    Delay 445
    KeyDown "Alt", 1
    Delay 1
    Delay 302
    KeyDown "C", 1
    Delay 164
    KeyUp "Alt", 1
    Delay 3
    KeyUp "C", 1
    Delay 1
    MoveTo 556, 918
    Delay 533
    LeftClick 1
    Delay 521
    KeyDown "Ctrl", 1
    Delay 461
    KeyDown "V", 1
    Delay 153
    KeyUp "V", 1
    Delay 14
    KeyUp "Ctrl", 1
    Delay 569
    KeyDown "Enter", 1
    Delay 126
    KeyUp "Enter", 1
    Delay 564
    KeyDown "Ctrl", 1
    Delay 52
    KeyDown "Shift", 1
    Delay 132
    KeyDown "F12", 1
    '==========以上是按键精灵录制的内容==========
    lv1= lv2= type=

    mysql learn tool

    提取出命令:
    mysql> CREATE TABLE customer (a INT, b CHAR (20), INDEX (a));
    Query OK, 0 rows affected (0.00 sec)
    mysql> -- Do a transaction with autocommit turned on.
    mysql> START TRANSACTION;
    Query OK, 0 rows affected (0.00 sec)
    mysql> INSERT INTO customer VALUES (10, 'Heikki');
    Query OK, 1 row affected (0.00 sec)
    mysql> COMMIT;
    Query OK, 0 rows affected (0.00 sec)
    mysql> -- Do another transaction with autocommit turned off.
    mysql> SET autocommit=0;
    Query OK, 0 rows affected (0.00 sec)
    mysql> INSERT INTO customer VALUES (15, 'John');
    Query OK, 1 row affected (0.00 sec)
    mysql> INSERT INTO customer VALUES (20, 'Paul');
    Query OK, 1 row affected (0.00 sec)
    mysql> DELETE FROM customer WHERE b = 'Heikki';
    Query OK, 1 row affected (0.00 sec)
    mysql> -- Now we undo those last 2 inserts and the delete.
    mysql> ROLLBACK;
    Query OK, 0 rows affected (0.00 sec)
    mysql> SELECT * FROM customer;
    +------+--------+
    | a    | b      |
    +------+--------+
    |   10 | Heikki |
    +------+--------+
    1 row in set (0.00 sec)
    mysql>

    multiline converter

    http://a.misc.my/js_multiline_converter.html