301 Moved Permanently, istenen kaynağın kalıcı olarak yeni bir URL'ye taşındığı anlamına gelir. Gelecekteki tüm istekler yeni adresi kullanmalıdır.
Tarayıcı kullanıcıyı otomatik olarak yeni adrese yönlendirecek ve arama motorları dizinlerini güncelleyecektir.
GET / HTTP/1.1 Host: 52cik.com Accept: */* User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
<!DOCTYPE html> <html class="theme-next gemini use-motion" lang="zh-Hans"> <head><meta name="generator" content="Hexo 3.8.0"> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"> <meta name="theme-color" content="#222"> <script src="/assets/lib/pace/pace.min.js?v=1.0.2"></script> <link href="/assets/lib/pace/pace-theme-bounce.min.css?v=1.0.2" rel="stylesheet"> <meta http-equiv="Cache-Control" content="no-transform"> <meta http-equiv="Cache-Control" content="no-siteapp"> <link href="/assets/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css"> <link href="/assets/css/main.css?v=6.5.0" rel="stylesheet" type="text/css"> <link rel="icon" type="image/png" sizes="16x16" href="/favicon.ico?v=6.5.0"> <script type="text/javascript" id="hexo.configurations"> var NexT = window.NexT || {}; var CONFIG = { root: '/', scheme: 'Gemini', version: '6.5.0', sidebar: {"position":"left","display":"post","offset":12,"b2t":true,"scrollpercent":true,"onmobile":false}, fancybox: false, fastclick: false, lazyload: false, tabs: true, motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}, algolia: { applicationID: '', apiKey: '', indexName: '', hits: {"per_page":10}, labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"} } }; </script> <meta name="description" content="自称楼教主的前端小学生"> <meta name="keywords" content="Web技术, Web前端, nodejs, docker"> <meta property="og:type" content="website"> <meta property="og:title" content="Web技术试炼地"> <meta property="og:url" content="http://www.52cik.com/index.html"> <meta property="og:site_name" content="Web技术试炼地"> <meta property="og:description" content="自称楼教主的前端小学生"> <meta property="og:locale" content="zh-Hans"> <meta name="twitter:card" content="summary"> <meta name="twitter:title" content="Web技术试炼地"> <meta name="twitter:description" content="自称楼教主的前端小学生"> <link rel="alternate" href="/atom.xml" title="Web技术试炼地" type="application/atom+xml"> <link rel="canonical" href="http://www.52cik.com/"> <script type="text/javascript" id="page.configurations"> CONFIG.page = { sidebar: "", }; </script> <title>Web技术试炼地</title> <noscript> <style type="text/css"> .use-motion .motion-element, .use-motion .brand, .use-motion .menu-item, .sidebar-inner, .use-motion .post-block, .use-motion .pagination, .use-motion .comments, .use-motion .post-header, .use-motion .post-body, .use-motion .collection-title { opacity: initial; } .use-motion .logo, .use-motion .site-title, .use-motion .site-subtitle { opacity: initial; top: initial; } .use-motion { .logo-line-before i { left: initial; } .logo-line-after i { right: initial; } } </style> </noscript> </head> <body itemscope="" itemtype="http://schema.org/WebPage" lang="zh-Hans"> <div class="container sidebar-position-left page-home"> <div class="headband"></div> <header id="header" class="header" itemscope="" itemtype="http://schema.org/WPHeader"> <div class="header-inner"><div class="site-brand-wrapper"> <div class="site-meta "> <div class="custom-logo-site-title"> <a href="/" class="brand" rel="start"> <span class="logo-line-before"><i></i></span> <span class="site-title">Web技术试炼地</span> <span class="logo-line-after"><i></i></span> </a> </div> <p class="site-subtitle">热爱技术的教主大人</p> </div> <div class="site-nav-toggle"> <button aria-label="切换导航栏"> <span class="btn-bar"></span> <span class="btn-bar"></span> <span class="btn-bar"></span> </button> </div> </div> <nav class="site-nav"> <ul id="menu" class="menu"> <li class="menu-item menu-item-home menu-item-active"> <a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a> </li> <li class="menu-item menu-item-archives"> <a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i> <br>归档</a> </li> <li class="menu-item menu-item-友链"> <a href="/links/" rel="section"><i class="menu-item-icon fa fa-fw fa-link"></i> <br>友链</a> </li> <li class="menu-item menu-item-about"> <a href="/about/" rel="section"><i class="menu-item-icon fa fa-fw fa-id-card"></i> <br>关于</a> </li> <li class="menu-item menu-item-search"> <a href="javascript:;" class="popup-trigger"> <i class="menu-item-icon fa fa-search fa-fw"></i> <br>搜索</a> </li> </ul> <div class="site-search"> <div class="popup search-popup local-search-popup"> <div class="local-search-header clearfix"> <span class="search-icon"> <i class="fa fa-search"></i> </span> <span class="popup-btn-close"> <i class="fa fa-times-circle"></i> </span> <div class="local-search-input-wrapper"> <input autocomplete="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input"> </div> </div> <div id="local-search-result"></div> </div> </div> </nav> </div> </header> <main id="main" class="main"> <div class="main-inner"> <div class="content-wrap"> <div id="content" class="content"> <section id="posts" class="posts-expand"> <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article"> <div class="post-block"> <link itemprop="mainEntityOfPage" href="http://www.52cik.com/2020/03/31/npm-publish-to-npm.html"> <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <meta itemprop="name" content="楼教主"> <meta itemprop="description" content="自称楼教主的前端小学生"> <meta itemprop="image" content="//q.qlogo.cn/qqapp/100229475/2EBF2E8D6BCE97787D5F3CDC6DDBECED/160"> </span> <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Web技术试炼地"> </span> <header class="post-header"> <h1 class="post-title" itemprop="name headline"> <a href="/2020/03/31/npm-publish-to-npm.html" class="post-title-link" itemprop="http://www.52cik.com/index.html">npm 模块发布到 npm</a> </h1> <div class="post-meta"> <span class="post-time"> <span class="post-meta-item-icon"> <i class="fa fa-calendar-o"></i> </span> <span class="post-meta-item-text">发表于</span> <time title="创建时间:2020-03-31 23:18:40" itemprop="dateCreated datePublished" datetime="2020-03-31T23:18:40+08:00">2020-03-31</time> </span> <span class="post-category"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-folder-o"></i> </span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/前端技术/" itemprop="url" rel="index"><span itemprop="name">前端技术</span></a></span> </span> <span class="post-comments-count"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-comment-o"></i> </span> <a href="/2020/03/31/npm-publish-to-npm.html#comments" itemprop="discussionUrl"> <span class="post-meta-item-text">评论数:</span> <span class="post-comments-count valine-comment-count" data-xid="/2020/03/31/npm-publish-to-npm.html" itemprop="commentCount"></span> </a> </span> </div> </header> <div class="post-body" itemprop="articleBody"> <p>2020年3月16日,GitHub 收购 npm,大概内容如下:</p> <blockquote> <p>Nat Friedman 宣布 GitHub 已签署收购 npm 的协议,并表示 npm 加入 GitHub 后会继续免费提供 public registry 服务。交易完成后,GitHub 的工作重点包括:未来会将 npm 集成至 GitHub 以提升开源软件供应链的安全性,并让用户能够跟踪从 GitHub PR 到修复问题的 npm 软件包版本的更改。</p> </blockquote> <!--noindex--> <div class="post-button text-center"> <a class="btn" href="/2020/03/31/npm-publish-to-npm.html#more" rel="contents"> 阅读全文 » </a> </div> <!--/noindex--> </div> <footer class="post-footer"> <div class="post-eof"></div> </footer> </div> </article> <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article"> <div class="post-block"> <link itemprop="mainEntityOfPage" href="http://www.52cik.com/2020/02/29/vue-observable.html"> <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <meta itemprop="name" content="楼教主"> <meta itemprop="description" content="自称楼教主的前端小学生"> <meta itemprop="image" content="//q.qlogo.cn/qqapp/100229475/2EBF2E8D6BCE97787D5F3CDC6DDBECED/160"> </span> <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Web技术试炼地"> </span> <header class="post-header"> <h1 class="post-title" itemprop="name headline"> <a href="/2020/02/29/vue-observable.html" class="post-title-link" itemprop="http://www.52cik.com/index.html">一点 Vue.observable 想法</a> </h1> <div class="post-meta"> <span class="post-time"> <span class="post-meta-item-icon"> <i class="fa fa-calendar-o"></i> </span> <span class="post-meta-item-text">发表于</span> <time title="创建时间:2020-02-29 23:19:23" itemprop="dateCreated datePublished" datetime="2020-02-29T23:19:23+08:00">2020-02-29</time> </span> <span class="post-category"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-folder-o"></i> </span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/vue/" itemprop="url" rel="index"><span itemprop="name">vue</span></a></span> </span> <span class="post-comments-count"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-comment-o"></i> </span> <a href="/2020/02/29/vue-observable.html#comments" itemprop="discussionUrl"> <span class="post-meta-item-text">评论数:</span> <span class="post-comments-count valine-comment-count" data-xid="/2020/02/29/vue-observable.html" itemprop="commentCount"></span> </a> </span> </div> </header> <div class="post-body" itemprop="articleBody"> <p>Vue 2.6.0 新增了 <code>Vue.observable</code> api,但最近才去尝试使用它。<br>这东西说新也不新,因为他就是 vue 本身的功能,只是暴露出来,成为新 api 了。<br>在老版本中,直接用 <code>new Vue({ data: {} })</code> 也一样。</p> <!--noindex--> <div class="post-button text-center"> <a class="btn" href="/2020/02/29/vue-observable.html#more" rel="contents"> 阅读全文 » </a> </div> <!--/noindex--> </div> <footer class="post-footer"> <div class="post-eof"></div> </footer> </div> </article> <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article"> <div class="post-block"> <link itemprop="mainEntityOfPage" href="http://www.52cik.com/2020/01/01/2019.html"> <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <meta itemprop="name" content="楼教主"> <meta itemprop="description" content="自称楼教主的前端小学生"> <meta itemprop="image" content="//q.qlogo.cn/qqapp/100229475/2EBF2E8D6BCE97787D5F3CDC6DDBECED/160"> </span> <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Web技术试炼地"> </span> <header class="post-header"> <h1 class="post-title" itemprop="name headline"> <a href="/2020/01/01/2019.html" class="post-title-link" itemprop="http://www.52cik.com/index.html">我的 2019</a> </h1> <div class="post-meta"> <span class="post-time"> <span class="post-meta-item-icon"> <i class="fa fa-calendar-o"></i> </span> <span class="post-meta-item-text">发表于</span> <time title="创建时间:2020-01-01 23:04:59" itemprop="dateCreated datePublished" datetime="2020-01-01T23:04:59+08:00">2020-01-01</time> </span> <span class="post-category"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-folder-o"></i> </span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/狂人日妓/" itemprop="url" rel="index"><span itemprop="name">狂人日妓</span></a></span> </span> <span class="post-comments-count"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-comment-o"></i> </span> <a href="/2020/01/01/2019.html#comments" itemprop="discussionUrl"> <span class="post-meta-item-text">评论数:</span> <span class="post-comments-count valine-comment-count" data-xid="/2020/01/01/2019.html" itemprop="commentCount"></span> </a> </span> </div> </header> <div class="post-body" itemprop="articleBody"> <p>2018 年一整年折腾的东西比较多,本计划19年深入和扩展的,但公司事业部调整,工作量几乎翻倍,有的时候甚至翻三倍。<br>最直接的体现就是,19年我只写了一篇博客,当然主要是因为懒,有4篇打好了草稿但没写出来,今年哪怕再忙,也要坚持写博客,坚持自己定下的目标。</p> <p>那么今年我都忙了些啥呢?</p> <!--noindex--> <div class="post-button text-center"> <a class="btn" href="/2020/01/01/2019.html#more" rel="contents"> 阅读全文 » </a> </div> <!--/noindex--> </div> <footer class="post-footer"> <div class="post-eof"></div> </footer> </div> </article> <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article"> <div class="post-block"> <link itemprop="mainEntityOfPage" href="http://www.52cik.com/2019/06/21/config-intelli-sense.html"> <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <meta itemprop="name" content="楼教主"> <meta itemprop="description" content="自称楼教主的前端小学生"> <meta itemprop="image" content="//q.qlogo.cn/qqapp/100229475/2EBF2E8D6BCE97787D5F3CDC6DDBECED/160"> </span> <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Web技术试炼地"> </span> <header class="post-header"> <h1 class="post-title" itemprop="name headline"> <a href="/2019/06/21/config-intelli-sense.html" class="post-title-link" itemprop="http://www.52cik.com/index.html">让 babel webpack vue 配置文件支持智能提示</a> </h1> <div class="post-meta"> <span class="post-time"> <span class="post-meta-item-icon"> <i class="fa fa-calendar-o"></i> </span> <span class="post-meta-item-text">发表于</span> <time title="创建时间:2019-06-21 17:40:33" itemprop="dateCreated datePublished" datetime="2019-06-21T17:40:33+08:00">2019-06-21</time> </span> <span class="post-category"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-folder-o"></i> </span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/前端技术/" itemprop="url" rel="index"><span itemprop="name">前端技术</span></a></span> </span> <span class="post-comments-count"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-comment-o"></i> </span> <a href="/2019/06/21/config-intelli-sense.html#comments" itemprop="discussionUrl"> <span class="post-meta-item-text">评论数:</span> <span class="post-comments-count valine-comment-count" data-xid="/2019/06/21/config-intelli-sense.html" itemprop="commentCount"></span> </a> </span> </div> </header> <div class="post-body" itemprop="articleBody"> <p><img src="/pics/config-intelli-sense/webpack.png" alt="webpack"></p> <!--noindex--> <div class="post-button text-center"> <a class="btn" href="/2019/06/21/config-intelli-sense.html#more" rel="contents"> 阅读全文 » </a> </div> <!--/noindex--> </div> <footer class="post-footer"> <div class="post-eof"></div> </footer> </div> </article> <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article"> <div class="post-block"> <link itemprop="mainEntityOfPage" href="http://www.52cik.com/2019/01/01/2018.html"> <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <meta itemprop="name" content="楼教主"> <meta itemprop="description" content="自称楼教主的前端小学生"> <meta itemprop="image" content="//q.qlogo.cn/qqapp/100229475/2EBF2E8D6BCE97787D5F3CDC6DDBECED/160"> </span> <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Web技术试炼地"> </span> <header class="post-header"> <h1 class="post-title" itemprop="name headline"> <a href="/2019/01/01/2018.html" class="post-title-link" itemprop="http://www.52cik.com/index.html">"再见\u2018你好\u2019"</a> </h1> <div class="post-meta"> <span class="post-time"> <span class="post-meta-item-icon"> <i class="fa fa-calendar-o"></i> </span> <span class="post-meta-item-text">发表于</span> <time title="创建时间:2019-01-01 23:20:15" itemprop="dateCreated datePublished" datetime="2019-01-01T23:20:15+08:00">2019-01-01</time> </span> <span class="post-category"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-folder-o"></i> </span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/狂人日妓/" itemprop="url" rel="index"><span itemprop="name">狂人日妓</span></a></span> </span> <span class="post-comments-count"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-comment-o"></i> </span> <a href="/2019/01/01/2018.html#comments" itemprop="discussionUrl"> <span class="post-meta-item-text">评论数:</span> <span class="post-comments-count valine-comment-count" data-xid="/2019/01/01/2018.html" itemprop="commentCount"></span> </a> </span> </div> </header> <div class="post-body" itemprop="articleBody"> <p>看了下去年总结,发现目标和愿望都实现的差不多了,甚至还做了去年都没想过的事情。<br>去年还是更加偏向浏览器端,今年几乎都在折腾 node, docker 开发运维一体化的东西上了。</p> <!--noindex--> <div class="post-button text-center"> <a class="btn" href="/2019/01/01/2018.html#more" rel="contents"> 阅读全文 » </a> </div> <!--/noindex--> </div> <footer class="post-footer"> <div class="post-eof"></div> </footer> </div> </article> <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article"> <div class="post-block"> <link itemprop="mainEntityOfPage" href="http://www.52cik.com/2018/12/31/chrome-puppeteer.html"> <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <meta itemprop="name" content="楼教主"> <meta itemprop="description" content="自称楼教主的前端小学生"> <meta itemprop="image" content="//q.qlogo.cn/qqapp/100229475/2EBF2E8D6BCE97787D5F3CDC6DDBECED/160"> </span> <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Web技术试炼地"> </span> <header class="post-header"> <h1 class="post-title" itemprop="name headline"> <a href="/2018/12/31/chrome-puppeteer.html" class="post-title-link" itemprop="http://www.52cik.com/index.html">chrome + puppeteer</a> </h1> <div class="post-meta"> <span class="post-time"> <span class="post-meta-item-icon"> <i class="fa fa-calendar-o"></i> </span> <span class="post-meta-item-text">发表于</span> <time title="创建时间:2018-12-31 20:43:20" itemprop="dateCreated datePublished" datetime="2018-12-31T20:43:20+08:00">2018-12-31</time> </span> <span class="post-category"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-folder-o"></i> </span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/前端技术/" itemprop="url" rel="index"><span itemprop="name">前端技术</span></a></span> </span> <span class="post-comments-count"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-comment-o"></i> </span> <a href="/2018/12/31/chrome-puppeteer.html#comments" itemprop="discussionUrl"> <span class="post-meta-item-text">评论数:</span> <span class="post-comments-count valine-comment-count" data-xid="/2018/12/31/chrome-puppeteer.html" itemprop="commentCount"></span> </a> </span> </div> </header> <div class="post-body" itemprop="articleBody"> <p>众所周知 puppeteer 模块大,是因为他包含了完整的 Chromium (~170MB Mac, ~282MB Linux, ~280MB Win) 。<br>那么,为什么不直接调用本机 chrome 呢?</p> <!--noindex--> <div class="post-button text-center"> <a class="btn" href="/2018/12/31/chrome-puppeteer.html#more" rel="contents"> 阅读全文 » </a> </div> <!--/noindex--> </div> <footer class="post-footer"> <div class="post-eof"></div> </footer> </div> </article> <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article"> <div class="post-block"> <link itemprop="mainEntityOfPage" href="http://www.52cik.com/2018/12/03/node-http-keep-alive-demo.html"> <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <meta itemprop="name" content="楼教主"> <meta itemprop="description" content="自称楼教主的前端小学生"> <meta itemprop="image" content="//q.qlogo.cn/qqapp/100229475/2EBF2E8D6BCE97787D5F3CDC6DDBECED/160"> </span> <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Web技术试炼地"> </span> <header class="post-header"> <h1 class="post-title" itemprop="name headline"> <a href="/2018/12/03/node-http-keep-alive-demo.html" class="post-title-link" itemprop="http://www.52cik.com/index.html">node http keep-alive demo</a> </h1> <div class="post-meta"> <span class="post-time"> <span class="post-meta-item-icon"> <i class="fa fa-calendar-o"></i> </span> <span class="post-meta-item-text">发表于</span> <time title="创建时间:2018-12-03 14:25:58" itemprop="dateCreated datePublished" datetime="2018-12-03T14:25:58+08:00">2018-12-03</time> </span> <span class="post-category"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-folder-o"></i> </span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/前端技术/" itemprop="url" rel="index"><span itemprop="name">前端技术</span></a></span> </span> <span class="post-comments-count"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-comment-o"></i> </span> <a href="/2018/12/03/node-http-keep-alive-demo.html#comments" itemprop="discussionUrl"> <span class="post-meta-item-text">评论数:</span> <span class="post-comments-count valine-comment-count" data-xid="/2018/12/03/node-http-keep-alive-demo.html" itemprop="commentCount"></span> </a> </span> </div> </header> <div class="post-body" itemprop="articleBody"> <p>http keep-alive 相关资料非常多,如果深挖,那可能就长篇大论了,不合适普及,这只是一篇新手入门引导,<br>主要讲解 node 下 http 请求的坑,以及 keep-alive 的简单使用,后续才会详细剖析原理。</p> <!--noindex--> <div class="post-button text-center"> <a class="btn" href="/2018/12/03/node-http-keep-alive-demo.html#more" rel="contents"> 阅读全文 » </a> </div> <!--/noindex--> </div> <footer class="post-footer"> <div class="post-eof"></div> </footer> </div> </article> <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article"> <div class="post-block"> <link itemprop="mainEntityOfPage" href="http://www.52cik.com/2018/12/01/ping-host.html"> <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <meta itemprop="name" content="楼教主"> <meta itemprop="description" content="自称楼教主的前端小学生"> <meta itemprop="image" content="//q.qlogo.cn/qqapp/100229475/2EBF2E8D6BCE97787D5F3CDC6DDBECED/160"> </span> <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Web技术试炼地"> </span> <header class="post-header"> <h1 class="post-title" itemprop="name headline"> <a href="/2018/12/01/ping-host.html" class="post-title-link" itemprop="http://www.52cik.com/index.html">ping 域名</a> </h1> <div class="post-meta"> <span class="post-time"> <span class="post-meta-item-icon"> <i class="fa fa-calendar-o"></i> </span> <span class="post-meta-item-text">发表于</span> <time title="创建时间:2018-12-01 21:11:20" itemprop="dateCreated datePublished" datetime="2018-12-01T21:11:20+08:00">2018-12-01</time> </span> <span class="post-category"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-folder-o"></i> </span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/前端技术/" itemprop="url" rel="index"><span itemprop="name">前端技术</span></a></span> </span> <span class="post-comments-count"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-comment-o"></i> </span> <a href="/2018/12/01/ping-host.html#comments" itemprop="discussionUrl"> <span class="post-meta-item-text">评论数:</span> <span class="post-comments-count valine-comment-count" data-xid="/2018/12/01/ping-host.html" itemprop="commentCount"></span> </a> </span> </div> </header> <div class="post-body" itemprop="articleBody"> <p>突然遇到这么个需求,需要判断是否内网环境。<br>这个问题,如果想通了就非常简单。</p> <!--noindex--> <div class="post-button text-center"> <a class="btn" href="/2018/12/01/ping-host.html#more" rel="contents"> 阅读全文 » </a> </div> <!--/noindex--> </div> <footer class="post-footer"> <div class="post-eof"></div> </footer> </div> </article> <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article"> <div class="post-block"> <link itemprop="mainEntityOfPage" href="http://www.52cik.com/2018/10/31/alinode-tutorial.html"> <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <meta itemprop="name" content="楼教主"> <meta itemprop="description" content="自称楼教主的前端小学生"> <meta itemprop="image" content="//q.qlogo.cn/qqapp/100229475/2EBF2E8D6BCE97787D5F3CDC6DDBECED/160"> </span> <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Web技术试炼地"> </span> <header class="post-header"> <h1 class="post-title" itemprop="name headline"> <a href="/2018/10/31/alinode-tutorial.html" class="post-title-link" itemprop="http://www.52cik.com/index.html">alinode 新手村生存指南</a> </h1> <div class="post-meta"> <span class="post-time"> <span class="post-meta-item-icon"> <i class="fa fa-calendar-o"></i> </span> <span class="post-meta-item-text">发表于</span> <time title="创建时间:2018-10-31 23:43:00" itemprop="dateCreated datePublished" datetime="2018-10-31T23:43:00+08:00">2018-10-31</time> </span> <span class="post-category"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-folder-o"></i> </span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/前端技术/" itemprop="url" rel="index"><span itemprop="name">前端技术</span></a></span> </span> <span class="post-comments-count"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-comment-o"></i> </span> <a href="/2018/10/31/alinode-tutorial.html#comments" itemprop="discussionUrl"> <span class="post-meta-item-text">评论数:</span> <span class="post-comments-count valine-comment-count" data-xid="/2018/10/31/alinode-tutorial.html" itemprop="commentCount"></span> </a> </span> </div> </header> <div class="post-body" itemprop="articleBody"> <p>alinode 是阿里云产品 <a href="https://www.aliyun.com/product/nodejs" target="_blank" rel="noopener">Node.js 性能平台</a> 的前身。<br>以前是收费项目,2018年初集成到阿里云后就完全免费了,我也是第一时间接入测试并上线使用。<br>在群里安利了不少小伙伴,但真正使用的不是很多,因为大部分都不知道 node 是怎么跑起来的。<br>说多了都是泪,所以打算写个简单教程,让小白也可以分分钟上手 alinode 这种神兵利器。</p> <!--noindex--> <div class="post-button text-center"> <a class="btn" href="/2018/10/31/alinode-tutorial.html#more" rel="contents"> 阅读全文 » </a> </div> <!--/noindex--> </div> <footer class="post-footer"> <div class="post-eof"></div> </footer> </div> </article> <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article"> <div class="post-block"> <link itemprop="mainEntityOfPage" href="http://www.52cik.com/2018/10/07/sizeup-patch.html"> <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <meta itemprop="name" content="楼教主"> <meta itemprop="description" content="自称楼教主的前端小学生"> <meta itemprop="image" content="//q.qlogo.cn/qqapp/100229475/2EBF2E8D6BCE97787D5F3CDC6DDBECED/160"> </span> <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Web技术试炼地"> </span> <header class="post-header"> <h1 class="post-title" itemprop="name headline"> <a href="/2018/10/07/sizeup-patch.html" class="post-title-link" itemprop="http://www.52cik.com/index.html">通过 node 打 patch 破解 mac 应用</a> </h1> <div class="post-meta"> <span class="post-time"> <span class="post-meta-item-icon"> <i class="fa fa-calendar-o"></i> </span> <span class="post-meta-item-text">发表于</span> <time title="创建时间:2018-10-07 23:30:00" itemprop="dateCreated datePublished" datetime="2018-10-07T23:30:00+08:00">2018-10-07</time> </span> <span class="post-category"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-folder-o"></i> </span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/前端技术/" itemprop="url" rel="index"><span itemprop="name">前端技术</span></a></span> </span> <span class="post-comments-count"> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-comment-o"></i> </span> <a href="/2018/10/07/sizeup-patch.html#comments" itemprop="discussionUrl"> <span class="post-meta-item-text">评论数:</span> <span class="post-comments-count valine-comment-count" data-xid="/2018/10/07/sizeup-patch.html" itemprop="commentCount"></span> </a> </span> </div> </header> <div class="post-body" itemprop="articleBody"> <p>升级 macos mojove 后,各种蛋疼,一些应用也要重新安装了。<br>其中 SizeUp 这款工具也失效了,找破解版的时候发现了一篇2016年3月的文章。<br>照着流程操作,竟然到现在还有用,单字节爆破,简单粗暴的方法,我喜欢。</p> <p>于是乎写成了 node 模块,方便自己和一些朋友使用。<br>有钱的支持正版,我这样的穷逼,自己写工具。。</p> <!--noindex--> <div class="post-button text-center"> <a class="btn" href="/2018/10/07/sizeup-patch.html#more" rel="contents"> 阅读全文 » </a> </div> <!--/noindex--> </div> <footer class="post-footer"> <div class="post-eof"></div> </footer> </div> </article> </section> <nav class="pagination"> <span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><span class="space">…</span><a class="page-number" href="/page/9/">9</a><a class="extend next" rel="next" href="/page/2/"><i class="fa fa-angle-right" aria-label="下一页"></i></a> </nav> </div> </div> <div class="sidebar-toggle"> <div class="sidebar-toggle-line-wrap"> <span class="sidebar-toggle-line sidebar-toggle-line-first"></span> <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span> <span class="sidebar-toggle-line sidebar-toggle-line-last"></span> </div> </div> <aside id="sidebar" class="sidebar"> <div class="sidebar-inner"> <section class="site-overview-wrap sidebar-panel sidebar-panel-active"> <div class="site-overview"> <div class="site-author motion-element" itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <img class="site-author-image" itemprop="image" src="//q.qlogo.cn/qqapp/100229475/2EBF2E8D6BCE97787D5F3CDC6DDBECED/160" alt="楼教主"> <p class="site-author-name" itemprop="name">楼教主</p> <p class="site-description motion-element" itemprop="description">自称楼教主的前端小学生</p> </div> <nav class="site-state motion-element"> <div class="site-state-item site-state-posts"> <a href="/archives/"> <span class="site-state-item-count">81</span> <span class="site-state-item-name">日志</span> </a> </div> <div class="site-state-item site-state-categories"> <a href="/categories/index.html"> <span class="site-state-item-count">7</span> <span class="site-state-item-name">分类</span> </a> </div> <div class="site-state-item site-state-tags"> <a href="/tags/index.html"> <span class="site-state-item-count">34</span> <span class="site-state-item-name">标签</span> </a> </div> </nav> <div class="feed-link motion-element"> <a href="/atom.xml" rel="alternate"> <i class="fa fa-rss"></i> RSS </a> </div> <div class="links-of-author motion-element"> <span class="links-of-author-item"> <a href="https://weibo.com/52cik" title="Weibo → https://weibo.com/52cik" rel="noopener" target="_blank"><i class="fa fa-fw fa-weibo"></i></a> </span> <span class="links-of-author-item"> <a href="https://github.com/52cik" title="GitHub → https://github.com/52cik" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i></a> </span> <span class="links-of-author-item"> <a href="mailto:[email protected]" title="E-Mail → mailto:[email protected]" rel="noopener" target="_blank"><i class="fa fa-fw fa-envelope"></i></a> </span> </div> <div class="cc-license motion-element" itemprop="license"> <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/" class="cc-opacity" rel="noopener" target="_blank"><img src="/assets/images/cc-by-nc-nd.svg" alt="Creative Commons"></a> </div> </div> </section> <div class="back-to-top"> <i class="fa fa-arrow-up"></i> <span id="scrollpercent"><span>0</span>%</span> </div> </div> </aside> </div> </main> <footer id="footer" class="footer"> <div class="footer-inner"> <div class="copyright">© 2015 – <span itemprop="copyrightYear">2020</span> <span class="with-love" id="animate"> <i class="fa fa-user"></i> </span> <span class="author" itemprop="copyrightHolder">楼教主</span> </div> <div class="powered-by">由 <a href="https://hexo.io" class="theme-link" rel="noopener" target="_blank">Hexo</a> 强力驱动</div> <span class="post-meta-divider">|</span> <div class="theme-info">主题 – <a href="https://theme-next.org" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a></div> </div> </footer> </div> <script type="text/javascript"> if (Object.prototype.toString.call(window.Promise) !== '[object Function]') { window.Promise = null; } </script> <script type="text/javascript" src="/assets/lib/jquery/index.js?v=2.1.3"></script> <script type="text/javascript" src="/assets/lib/velocity/velocity.min.js?v=1.2.1"></script> <script type="text/javascript" src="/assets/lib/velocity/velocity.ui.min.js?v=1.2.1"></script> <script type="text/javascript" src="/assets/js/src/utils.js?v=6.5.0"></script> <script type="text/javascript" src="/assets/js/src/motion.js?v=6.5.0"></script> <script type="text/javascript" src="/assets/js/src/affix.js?v=6.5.0"></script> <script type="text/javascript" src="/assets/js/src/schemes/pisces.js?v=6.5.0"></script> <script type="text/javascript" src="/assets/js/src/bootstrap.js?v=6.5.0"></script> <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script> <script src="//unpkg.com/valine/dist/Valine.min.js"></script> <script type="text/javascript"> var GUEST = ['nick','mail','link']; var guest = 'nick,mail,link'; guest = guest.split(',').filter(function (item) { return GUEST.indexOf(item)>-1; }); new Valine({ el: '#comments' , verify: false, notify: false, appId: '3lyfvmugVpBA4ta96278KBKs-gzGzoHsz', appKey: 'YNNL5ccJOrUWkJOOWW6wuzgv', placeholder: 'ヾノ≧∀≦)o 来啊,快活啊!', avatar:'robohash', meta:guest, pageSize:'10' || 10, visitor: false }); </script> <script type="text/javascript"> // Popup Window; var isfetched = false; var isXml = true; // Search DB path; var search_path = "search.xml"; if (search_path.length === 0) { search_path = "search.xml"; } else if (/json$/i.test(search_path)) { isXml = false; } var path = "/" + search_path; // monitor main search box; var onPopupClose = function (e) { $('.popup').hide(); $('#local-search-input').val(''); $('.search-result-list').remove(); $('#no-result').remove(); $(".local-search-pop-overlay").remove(); $('body').css('overflow', ''); } function proceedsearch() { $("body") .append('<div class="search-popup-overlay local-search-pop-overlay"></div>') .css('overflow', 'hidden'); $('.search-popup-overlay').click(onPopupClose); $('.popup').toggle(); var $localSearchInput = $('#local-search-input'); $localSearchInput.attr("autocapitalize", "none"); $localSearchInput.attr("autocorrect", "off"); $localSearchInput.focus(); } // search function; var searchFunc = function(path, search_id, content_id) { 'use strict'; // start loading animation $("body") .append('<div class="search-popup-overlay local-search-pop-overlay">' + '<div id="search-loading-icon">' + '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' + '</div>' + '</div>') .css('overflow', 'hidden'); $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center'); $.ajax({ url: path, dataType: isXml ? "xml" : "json", async: true, success: function(res) { // get the contents from search data isfetched = true; $('.popup').detach().appendTo('.header-inner'); var datas = isXml ? $("entry", res).map(function() { return { title: $("title", this).text(), content: $("content",this).text(), url: $("url" , this).text() }; }).get() : res; var input = document.getElementById(search_id); var resultContent = document.getElementById(content_id); var inputEventFunction = function() { var searchText = input.value.trim().toLowerCase(); var keywords = searchText.split(/[\s\-]+/); if (keywords.length > 1) { keywords.push(searchText); } var resultItems = []; if (searchText.length > 0) { // perform local searching datas.forEach(function(data) { var isMatch = false; var hitCount = 0; var searchTextCount = 0; var title = data.title.trim(); var titleInLowerCase = title.toLowerCase(); var content = data.content.trim().replace(/<[^>]+>/g,""); var contentInLowerCase = content.toLowerCase(); var articleUrl = decodeURIComponent(data.url); var indexOfTitle = []; var indexOfContent = []; // only match articles with not empty titles if(title != '') { keywords.forEach(function(keyword) { function getIndexByWord(word, text, caseSensitive) { var wordLen = word.length; if (wordLen === 0) { return []; } var startPosition = 0, position = [], index = []; if (!caseSensitive) { text = text.toLowerCase(); word = word.toLowerCase(); } while ((position = text.indexOf(word, startPosition)) > -1) { index.push({position: position, word: word}); startPosition = position + wordLen; } return index; } indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false)); indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false)); }); if (indexOfTitle.length > 0 || indexOfContent.length > 0) { isMatch = true; hitCount = indexOfTitle.length + indexOfContent.length; } } // show search results if (isMatch) { // sort index by position of keyword [indexOfTitle, indexOfContent].forEach(function (index) { index.sort(function (itemLeft, itemRight) { if (itemRight.position !== itemLeft.position) { return itemRight.position - itemLeft.position; } else { return itemLeft.word.length - itemRight.word.length; } }); }); // merge hits into slices function mergeIntoSlice(text, start, end, index) { var item = index[index.length - 1]; var position = item.position; var word = item.word; var hits = []; var searchTextCountInSlice = 0; while (position + word.length <= end && index.length != 0) { if (word === searchText) { searchTextCountInSlice++; } hits.push({position: position, length: word.length}); var wordEnd = position + word.length; // move to next position of hit index.pop(); while (index.length != 0) { item = index[index.length - 1]; position = item.position; word = item.word; if (wordEnd > position) { index.pop(); } else { break; } } } searchTextCount += searchTextCountInSlice; return { hits: hits, start: start, end: end, searchTextCount: searchTextCountInSlice }; } var slicesOfTitle = []; if (indexOfTitle.length != 0) { slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle)); } var slicesOfContent = []; while (indexOfContent.length != 0) { var item = indexOfContent[indexOfContent.length - 1]; var position = item.position; var word = item.word; // cut out 100 characters var start = position - 20; var end = position + 80; if(start < 0){ start = 0; } if (end < position + word.length) { end = position + word.length; } if(end > content.length){ end = content.length; } slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent)); } // sort slices in content by search text's count and hits' count slicesOfContent.sort(function (sliceLeft, sliceRight) { if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) { return sliceRight.searchTextCount - sliceLeft.searchTextCount; } else if (sliceLeft.hits.length !== sliceRight.hits.length) { return sliceRight.hits.length - sliceLeft.hits.length; } else { return sliceLeft.start - sliceRight.start; } }); // select top N slices in content var upperBound = parseInt('1'); if (upperBound >= 0) { slicesOfContent = slicesOfContent.slice(0, upperBound); } // highlight title and content function highlightKeyword(text, slice) { var result = ''; var prevEnd = slice.start; slice.hits.forEach(function (hit) { result += text.substring(prevEnd, hit.position); var end = hit.position + hit.length; result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>'; prevEnd = end; }); result += text.substring(prevEnd, slice.end); return result; } var resultItem = ''; if (slicesOfTitle.length != 0) { resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>"; } else { resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>"; } slicesOfContent.forEach(function (slice) { resultItem += "<a href='" + articleUrl + "'>" + "<p class=\"search-result\">" + highlightKeyword(content, slice) + "...</p>" + "</a>"; }); resultItem += "</li>"; resultItems.push({ item: resultItem, searchTextCount: searchTextCount, hitCount: hitCount, id: resultItems.length }); } }) }; if (keywords.length === 1 && keywords[0] === "") { resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>' } else if (resultItems.length === 0) { resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>' } else { resultItems.sort(function (resultLeft, resultRight) { if (resultLeft.searchTextCount !== resultRight.searchTextCount) { return resultRight.searchTextCount - resultLeft.searchTextCount; } else if (resultLeft.hitCount !== resultRight.hitCount) { return resultRight.hitCount - resultLeft.hitCount; } else { return resultRight.id - resultLeft.id; } }); var searchResultList = '<ul class=\"search-result-list\">'; resultItems.forEach(function (result) { searchResultList += result.item; }) searchResultList += "</ul>"; resultContent.innerHTML = searchResultList; } } if ('auto' === 'auto') { input.addEventListener('input', inputEventFunction); } else { $('.search-icon').click(inputEventFunction); input.addEventListener('keypress', function (event) { if (event.keyCode === 13) { inputEventFunction(); } }); } // remove loading animation $(".local-search-pop-overlay").remove(); $('body').css('overflow', ''); proceedsearch(); } }); } // handle and trigger popup window; $('.popup-trigger').click(function(e) { e.stopPropagation(); if (isfetched === false) { searchFunc(path, 'local-search-input', 'local-search-result'); } else { proceedsearch(); }; }); $('.popup-btn-close').click(onPopupClose); $('.popup').click(function(e){ e.stopPropagation(); }); $(document).on('keyup', function (event) { var shouldDismissSearchPopup = event.which === 27 && $('.search-popup').is(':visible'); if (shouldDismissSearchPopup) { onPopupClose(); } }); </script> <style> .copy-btn { display: inline-block; padding: 6px 12px; font-size: 13px; font-weight: 700; line-height: 20px; color: #333; white-space: nowrap; vertical-align: middle; cursor: pointer; background-color: #eee; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5; border-radius: 3px; user-select: none; outline: 0; } .highlight-wrap .copy-btn { transition: opacity .3s ease-in-out; opacity: 0; padding: 2px 6px; position: absolute; right: 4px; top: 8px; } .highlight-wrap:hover .copy-btn, .highlight-wrap .copy-btn:focus { opacity: 1 } .highlight-wrap { position: relative; } </style> <script> $('.highlight').each(function (i, e) { var $wrap = $('<div>').addClass('highlight-wrap') $(e).after($wrap) $wrap.append($('<button>').addClass('copy-btn').append('复制').on('click', function (e) { var code = $(this).parent().find('.code').find('.line').map(function (i, e) { return $(e).text() }).toArray().join('\n') var ta = document.createElement('textarea') document.body.appendChild(ta) ta.style.position = 'absolute' ta.style.top = '0px' ta.style.left = '0px' ta.value = code ta.select() ta.focus() var result = document.execCommand('copy') document.body.removeChild(ta) if(result)$(this).text('复制成功') else $(this).text('复制失败') $(this).blur() })).on('mouseleave', function (e) { var $b = $(this).find('.copy-btn') setTimeout(function () { $b.text('复制') }, 300) }).append(e) }) </script> </body> </html>