Skip to content

Instantly share code, notes, and snippets.

View SherryQueen's full-sized avatar
😶
Learning.

MySherry SherryQueen

😶
Learning.
  • china
  • shanghai
View GitHub Profile
@SherryQueen
SherryQueen / 扩展
Created March 30, 2018 07:53
chrome
Vimium 快捷键操作
octotree Github
@SherryQueen
SherryQueen / ubuntu 相关备忘录
Created March 17, 2018 11:38
ubuntu 相关备忘录
gnome主题 flat remix 系列(https://github.com/daniruiz/flat-remix-gnome)
@SherryQueen
SherryQueen / .node-eslintrc.js
Last active March 3, 2018 07:34
eslint 规则
module.exports = {
env: {
node: true,
commonjs: true,
es6: true,
mocha: true,
},
extends: 'eslint:recommended',
parserOptions: {
sourceType: 'module',
protoc.exe --js_out=import_style=commonjs,binary:. .\proto\line.proto
out input
mongodump -h dbhost -d dbname -o dbdirectory
-h:
MongDB所在服务器地址,例如:127.0.0.1,当然也可以指定端口号:127.0.0.1:27017
-d:
需要备份的数据库实例,例如:test
-o:
备份的数据存放位置,例如:c:\data\dump,当然该目录需要提前建立,在备份完成后,系统自动在dump目录下建立一个test目录,这个目录里面存放该数据库实例的备份数据。
mongorestore -h <hostname><:port> -d dbname <path>
--host <:port>, -h <:port>:
@SherryQueen
SherryQueen / ps_alias.txt
Last active December 23, 2017 01:15
ps 别名
"g","git","","None"
"l","ls","","None"
"tnpm","npm --registry=https://registry.npm.taobao.org","","None"
@SherryQueen
SherryQueen / package.json
Created November 16, 2017 08:34
webpack 配置
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-es2015": "^6.24.1",
"css-loader": "^0.28.7",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.5",
"html-webpack-plugin": "^2.30.1",
"node-sass": "^4.5.3",
"optimize-css-assets-webpack-plugin": "^3.2.0",
@SherryQueen
SherryQueen / node
Last active September 13, 2018 13:23
编码相关
require/exports 社区规范 可动态加载模块 地址可寻找 传递值或引用
import/export es6规范 静态编译 地址不可寻 强制 值绑定 即 将所有模块加载到一个js里面
隐藏类
v8 会将拥有相同属性的(按相同顺序声明的同类型的对象 在vm中构建一个隐藏类 从而加快读取优化) 采用地址偏移从而避免高消耗的寻址
内联缓存
基于隐藏类, 在两次查找隐藏类后直接将偏移地址添加到对象上从而直接使用
事件队列
每个tick检查事件是否需要处理(检查已加入队列中的回调(完成的回调事件
@SherryQueen
SherryQueen / js
Last active February 27, 2018 09:02
前端
浏览器: setTimeout 与 setInterval 将队列加入任务队列中(只有当队列中任务执行完才会加入到执行栈中 在下一tick中检查计时——误差(若一tick执行过长
node: setImmediate 当前任务队列最后插入对应的事件 即总在下一个事件循环中开始执行对应的回调(在执行栈的栈顶
export default 时候 导出对象会 绑定到 default 对象
需要通过 import ans from '' 来引用 而不能使用解构语法
@SherryQueen
SherryQueen / nginx.conf
Created November 1, 2017 06:55
nginx location 学习
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;