Fork me on GitHub
  1. Mac抓取小程序源码

    1. 安装安卓模拟器 https://mumu.163.com/
    2. 模拟器设置-开启ROOT权限
    3. 安装微信 https://weixin.qq.com/download
    4. 安装 RE文件管理器
    5. 登录微信,点击想要抓取小程序(小程序会闪退 …
    read more
  2. nginx certbot 免费泛域名证书

    系统: CentOS 7

    https://certbot.eff.org/lets-encrypt/centosrhel7-nginx

    1. sudo yum install python2-certbot-dns-cloudflare
    2. yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    3. sudo yum install certbot python2-certbot-nginx
    4. sudo yum install python2-certbot-dns-cloudflare
    5. 注册并添加域名: https://dash.cloudflare.com/login
    6. 添加路径 …

    read more
  3. 热敏打印机无法调整font-size

    Web前端需要连接热敏打印机打印小票,但是font-size始终无法调小,最终解决见demo:

    update:2020年12月04日

    https://medium.com/@Idan_Co/the-ultimate-print-html-template-with-header-footer-568f415f6d2a

    <!DOCTYPE HTML>
    <html>
    
    <head>
        <meta name="renderer" content="webkit">
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>美问</title>
        <style type="text/css">
        @media screen {
            #printSection {
                display: none …
    read more
  4. Google Chrome 控制台

    console

    console.log(object [, object, ...])

    console.info(object [, object, ...])

    console.error(object [, object, ...])

    var str = 'hello world';
    console.log('--->>>%s', str);
    

    常用格式代码:

    说明符 输出
    %s 将值格式化为字符串
    %i 或 %d 将值格式化 …
    read more
  5. google push-notifications

    按照教程添加前端

    https://developers.google.com/web/fundamentals/codelabs/push-notifications?hl=zh-cn

    后端服务使用web-push

    需要审核key:

    https://console.firebase.google.com/project/test-22de3/settings/cloudmessaging/web:Mzg2N2Q4MzgtNmY5MS00YTAzLTkzYTItMDc2NTczZWJkYmE2?hl=zh-cn

    服务端需要能正 …

    read more
  6. Catalina 10.15.4无法使用SSH域名登录

    https://tyler.io/so-uh-i-think-catalina-10154-broke-ssh/

    方案一

    .ssh/config文件添加 ProxyCommand nc %h %p

    如:

    host vps
    hostname xx.xxx.com
    user root
    ProxyCommand nc %h %p
    

    方案二

    brew install openssh

    ~/.bash_profile 添加: export PATH="/usr/local/sbin:$PATH"

    source ~/.bash_profile

    read more

links