Fork me on GitHub
  1. 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

    There are comments.

  2. 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

    There are comments.

  3. JS中toFixed的坑

    重点:toFixed不是四舍五入

    MDN:

    toFixed() 方法使用定点表示法来格式化一个数。

    Chrome:

    console.log((0.005).toFixed(2)) -> 0.01
    console.log((0.015).toFixed(2)) -> 0.01
    console.log((0.025).toFixed(2)) -> 0.03
    console.log((0.035 …
    read more

    There are comments.

  4. 前端的不可见字符

    https://stackoverflow.com/questions/11598786/how-to-replace-non-printable-unicode-characters-javascript

    most of which are quite printable

    https://blog.csdn.net/ranjio_z/article/details/51993040?utm_source=blogxgwz8

    http://www.unicode.org/charts/PDF/U2000.pdf

    unicode 显示符号
    \u2000  
    \u2001
    \u2002
    \u2003
    \u2004
    \u2005
    \u2006
    \u2007
    \u2008
    \u2009
    \u200a
    \u200b
    \u200c
    \u200d
    \u200e …
    read more

    There are comments.

  5. 编写PhoneGapiOS插件一

    PhoneGap安装

    当前版本是PhoneGap2.9.1Xcode6.3

    1. 下载PhoneGap

      官网地址,NodeJS命令安装老是失败,我是直接下载的zip包解压的。 QQ20150421-2@2x

    1. 解压

      解压之后的目录是这样的: QQ20150421-3@2x

    iOS的工程创建

    1. 创建工程(终端命令)

      • 首 …
    read more

    There are comments.

links