Skip to content

chenky/library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

技术

程序员必读书目(单)

唤醒 qq 聊天窗口

window.open(http://wpa.qq.com/msgrd?v=3&uin=${qidianNumber}&site=qq&menu=yes) 移动端 h5: window.open(mqqwpa://im/chat?chat_type=wpa&uin=${qqNumber}&version=1&src_type=web&web_src=oicqzone.com); window.open(tencent://Message/?Uin=${qidianNumber}&websiteName=qtrade.com.cn&Menu=yes)

empty message submit

Quick links

缓存

  • 前端清理缓存
          <meta name="renderer" content="webkit">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
          <meta http-equiv="Cache-Control" content="max-age=0, no-cache, no-store, must-revalidate">
      <meta http-equiv="Pragma" content="no-cache">
          <meta http-equiv="Expires" content="-1">
    
  • nginx 配置缓存
     add_header "Cache-Control" "max-age=0, no-cache, no-store, must-revalidate";
    add_header "Pragma" "no-cache";
    add_header "Expires" "-1";
    }
    

搜索技巧

  • 搜索关键字,指南,流程,教程

教程

阮一峰技术博客

前端开发

技术博客

工具及工程化

  • gitlab
  • Snipaste.exe(可以把截图固定到屏幕上,很好用的软件)
  • jinkens
  • webpack
  • react react-router react-redux mobx
  • 淘宝镜像配置,node-sass
vi file in ~/.npmrc
这里使用了淘宝镜像,添加以下内容到文件中
registry=https://registry.npm.taobao.org
disturl=https://npm.taobao.org/dist
chromedriver-cdnurl=https://npm.taobao.org/mirrors/chromedriver
couchbase-binary-host-mirror=https://npm.taobao.org/mirrors/couchbase/v{version}
debug-binary-host-mirror=https://npm.taobao.org/mirrors/node-inspector
electron-mirror=https://npm.taobao.org/mirrors/electron/
flow-bin-binary-host-mirror=https://npm.taobao.org/mirrors/flow/v
fse-binary-host-mirror=https://npm.taobao.org/mirrors/fsevents
fuse-bindings-binary-host-mirror=https://npm.taobao.org/mirrors/fuse-bindings/v{version}
git4win-mirror=https://npm.taobao.org/mirrors/git-for-windows
gl-binary-host-mirror=https://npm.taobao.org/mirrors/gl/v{version}
grpc-node-binary-host-mirror=https://npm.taobao.org/mirrors
hackrf-binary-host-mirror=https://npm.taobao.org/mirrors/hackrf/v{version}
leveldown-binary-host-mirror=https://npm.taobao.org/mirrors/leveldown/v{version}
leveldown-hyper-binary-host-mirror=https://npm.taobao.org/mirrors/leveldown-hyper/v{version}
mknod-binary-host-mirror=https://npm.taobao.org/mirrors/mknod/v{version}
node-sqlite3-binary-host-mirror=https://npm.taobao.org/mirrors
node-tk5-binary-host-mirror=https://npm.taobao.org/mirrors/node-tk5/v{version}
nodegit-binary-host-mirror=https://npm.taobao.org/mirrors/nodegit/v{version}/
operadriver-cdnurl=https://npm.taobao.org/mirrors/operadriver
phantomjs-cdnurl=https://npm.taobao.org/mirrors/phantomjs
profiler-binary-host-mirror=https://npm.taobao.org/mirrors/node-inspector/
puppeteer-download-host=https://npm.taobao.org/mirrors
python-mirror=https://npm.taobao.org/mirrors/python
rabin-binary-host-mirror=https://npm.taobao.org/mirrors/rabin/v{version}
sass-binary-site=https://npm.taobao.org/mirrors/node-sass
sodium-prebuilt-binary-host-mirror=https://npm.taobao.org/mirrors/sodium-prebuilt/v{version}
sqlite3-binary-site=https://npm.taobao.org/mirrors/sqlite3
utf-8-validate-binary-host-mirror=https://npm.taobao.org/mirrors/utf-8-validate/v{version}
utp-native-binary-host-mirror=https://npm.taobao.org/mirrors/utp-native/v{version}
zmq-prebuilt-binary-host-mirror=https://npm.taobao.org/mirrors/zmq-prebuilt/v{version}

webapi

  • Apache
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>
  • nginx
location / {
  try_files $uri $uri/ /index.html;
}
  • 原生 node.js
const http = require("http");
const fs = require("fs");
const httpPort = 80;

http
  .createServer((req, res) => {
    fs.readFile("index.htm", "utf-8", (err, content) => {
      if (err) {
        console.log('We cannot open "index.htm" file.');
      }

      res.writeHead(200, {
        "Content-Type": "text/html; charset=utf-8",
      });

      res.end(content);
    });
  })
  .listen(httpPort, () => {
    console.log("Server listening on: http://localhost:%s", httpPort);
  });

类库

前端进阶知识点

  1. 惰性求值
  2. curry 化
  3. 闭包
  4. 高阶函数
  5. 函数式编程
  6. compose
  7. 中间件
  8. 依赖注入
  9. flex 和 grid
  10. 框架类库源码分析
  11. 精读《Vue3.0 Function API》
  12. 精读《Function Component 入门》
  13. 一篇看懂 React Hooks精读《React Hooks 最佳实践》
  14. promise, generator, async await
  15. 数据结构与算法
  16. how to build your own react
  17. 一个 TypeScript 写的 JavaScript 解析器,也就是说使用 JavaScript 解析 JavaScript,支持最新的 ES2020 语法

前端面试题

错误日志监控

Vue3.0

终端命令

  • mac
    • 批量创建文件夹,mkdir dir{1..20} 批量创建文件夹名字是 dir1-dir20
    • 批量创建文件, touch file{..20}.js 批量创建文件名字是 file1.js-file20.js
    • 批量删除空文件夹, rmdir dir{2..5} 如果非空文件夹需要使用 sudo rm -r -f dir{1..2}
    • 批量删除文件, rm file{1..5}.js
    • 单个文件重命名 mv 原名 新名, 如 mv 1.js 2.js 1.js->2.js
    • 批量重命名 for i in *.js; do mv $i ${i//.js/.html}; done
    • cd 跳转到某个目录
    • ls 查看目录下到文件

经济理财

  • 17 世纪荷兰郁金香泡沫,18 世纪英国南海公司发行股票大骗局,其中大科学家牛顿就亏损了 2 万多英镑,相当于他 10 年总收入之和,1929-1933 美国经济大萧条,1997-1998 亚洲金融危机,2000-2001 年互联网金融泡沫,2007-2008 次贷危机。

提升效率,小工具,批量处理命令

  • 微信双开批处理命令使用 windows 系统(其实可以扩展到多开任何应用程序)

    @echo off
    
    start "" "C:\Program Files (x86)\Tencent\WeChat\WeChat.exe"
    
    start "" "C:\Program Files (x86)\Tencent\WeChat\WeChat.exe"
    
    exit

各种技术问题汇总及解决方案

  • 在 windows win10 系统中把 git for windows sdk 中的完整 bash 功能(包括包管理工具 pacman 和 zsh,oh-my-zsh)集成到 vscode visual studio code 中
    // ctrl+shift+p, settings.json中
        "terminal.integrated.profiles.windows": {
          "Git Bash":null,
          "Command Prompt": null,
          "Ubuntu(WSL)": null,
          "Bash": {
            "path": "d:\\git-sdk-64\\usr\\bin\\bash.exe", // git for windows sdk安装的路径
            "args": ["--login"]
          }
        },
        "terminal.integrated.defaultProfile.windows": "Bash", // 默认打开的命令行
  • 前端设置 meta 可以强制跳转到 https
<meta
  http-equiv="Content-Security-Policy"
  content="upgrade-insecure-requests"
/>

About

知识库及项目实用工具小函数

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published