2017-05-26
Web push API
2017-05-25
PWA与ServiceWorker
2017-05-21
装饰模式与es7 decorator
2017-05-14
Event Loop
2017-05-11
浏览器端的setTimeout和setInterval
2017-05-10
TImer对象
2017-05-07
XSS漏洞
2017-05-06
JS私有化成员变量
2017-05-04
JS原型继承
2017-04-27
浏览器渲染原理
14 August, 2016
用node遍历某个文件夹下的所有js模块
30 July, 2016
generator
23 July, 2016
Node
21 July, 2016
Koa源码阅读
14 July, 2016
Koa
12 July, 2016
Koa
11 July, 2016
shell
8 July, 2016
异常处理
7 July, 2016
shell
6 July, 2016
koa
30 June, 2016
fetch
22 June, 2016
es6 generator && co
5 June, 2016
js while
2 June, 2016
yaml标记语法
31 May, 2016
jasmine
15 May, 2016
Object API
14 May, 2016
charAt && charCodeAt
11 May, 2016
原型链
8 May, 2016
Object.defineProperty(target: Object, propertyName: String, descriptor: Object)
7 May, 2016
innerHTML
4 May, 2016
如何把一个html字符串转换成fragment
7 May, 2016
innerHTML
25 April, 2016
Node Stream
24 April, 2016
算法
23 April, 2016
Function
22 April, 2016
position: sticky
20 April, 2016
git stash
19 April, 2016
Promise
14 April, 2016
Koa.js
13 April, 2016
Koa.js
12 April, 2016
Koa.js
6 April, 2016
Xtemplate
5 April, 2016
JSON.stringify
4 April, 2016
正向代理和反向代理
3 April, 2016
blog refactor
26 March, 2016
Redux-Async-Connct
23 March, 2016
Redux DevTool
22 March, 2016
Redux Presentational Component With Container
21 March, 2016
Http-Proxy
19 March, 2016
superagent
18 March, 2016
React Universal App
17 March, 2016
React Universal App
15 March, 2016
React Universal App
14 March, 2016
React-Router
13 March, 2016
React-Router
11 March, 2016
跟老大聊职业发展
9 March, 2016
Service Worker
8 March, 2016
uuid JS实现
7 March, 2016
Service Worker
6 March, 2016
Fetch
5 March, 2016
ServiceWorker
4 March, 2016
React
3 March, 2016
ServiceWorker
2 March, 2016
HTTP/2
1 March, 2016
BEM
29 February, 2016
零宽度断言(zero-width-assertions)
28 February, 2016
jsDoc
27 February, 2016
Vue
26 February, 2016
Mysql
25 February, 2016
Object.entries(obj: Object)
24 February, 2016
handleEvent写法
23 February, 2016
History
22 February, 2016
History API
21 Februray, 2016
Vue
17 February, 2016
Vue
16 February, 2016
设计模式
15 February, 2016
Arrow Function in Object literals
14 February, 2016
webpack
12 February, 2016
redux-api-middleware
5 Februray, 2016
npm scripts
4 Februray, 2016
js enum
3 February, 2016
promise
2 February, 2016
parallel.js
28 January, 2016
webapp事故总结
25 January, 2016
js运算符
24 January, 2016
webpack
22 January, 2016
h5“新增”API
15 January, 2016
Redux
14 January, 2016
HQL
13 January, 2016
继续学习webpack
12 January, 2016
继续学webpack
越来越觉得webpack好用,虽然对browserify没有深入研究过,不能跟webpack对比,但是很多复杂的功能几个配置就能搞定,还是很神奇的。
11 January, 2016
webpack配置
6 January, 2016
event.dataTransfer
拖拽事件(包括dragstart到drop)的event对象里,都有一个dataTransfer对象,之前做的文件拖拽上传,就是用dataTransfer.files来取文件信息的,今天学了它的其他几个api
5 January, 2016
flex
看了篇文章,重新理解了flex的几个属性
4 January, 2016
JS高编
3 January, 2016
火车上坐着无聊,看了两篇Fex周报上的文章
31 December, 2015
ajax level2 progress
30 December, 2015
Event Drag
其实该昨天写,忘了,今天补上。昨天做了一个简单的拖拽上传demo,用到了drag相关的一系列事件。drag事件支持dom0和dom2。
29 December, 2015
今天没上闹钟,睡到自然醒~~~
28 December, 2015
XMLHttpRequest
做*文件拖拽上传**的demo用到原生的ajax对象,于是就重新看了一遍,包括level 2。
26 December, 2015
阿里云session store
25 December, 2015
vscode
24 December, 2015
IOS9
23 December, 2015
node es6 env with babel
开发blog时用了node 4.2.3版本,支持一部分es6的特性。今天发布到阿里云上跑不动,打了日志才知道阿里云node版本是1.10.0。不想改代码,也不想放弃es6,于是用了babel-core/register,用hook在运行时编译es6的代码。配置如下:
22 December, 2015
jQuery源码阅读
21 December, 2015
gulp
使用gulp-rev-collector遇到的问题,牵出了之前学gulp遗留的债~~~
Node
网络部分,net模块的使用。
17~18 December, 2015
Rem
rem的用法和适配多屏的原理很简单,有点迷糊的是设计稿尺寸怎么转换成rem。今天结合手淘的flexible.js,又看了一遍手百的解决方案。总算是把换算的方法理清楚了。
16 December, 2015
rem
今天看了手百的rem解决方案,发现之前对rem的了解太浅薄了,也没有实践过。rem本身很简单,等于根节点html的font-size。一般来说,用rem实现多屏幕适配的方案,要么用js检测屏幕宽度,然后动态修改html的fontSize(淘宝的flexible.js);要么用media queries设断点,也是修改html的font-size。
15 December, 2015
Es6 Generator
在es6 feature里,generator和Symbol.iterator是一起讲的,他们都能简单的实现斐波那契数列
14 December, 2105
Function.prototype.bind
其实是昨天看的,懒,今天记一笔。之前对bind方法一知半解,只知道用来绑this。昨天看react的文档发现,bind可以传超过一个参数,于是重新翻了一遍MDN
12 December, 2015
let
- 今天在
switch语句里使用let报了一个变量重复使用let的语法错误,突然想起switch里的每个case都不是块级作用域。出错代码:
10 December, 2015
Node
jQuery源码
- 加载源码:jQuery源码放在
src目录下,分模块,用amd串起来。因此可以用requirejs来加载源码中的任何一个模块(jQuery的源码正是用requirejs来加载的,在github项目中可以找到external目录,里面就有requirejs)。jQuery的requirejs配置放在build/tasks/build.js里,我们只需要baseUrl和paths即可,其他的都是r.js的构建配置。
9 December, 2015
编码技巧
今天读了一篇关于编码技巧的文章,有几点还是挺管用的
8 december, 2015
jQuery源码阅读
javascript date对象
之前使用Date对象的地方不多,用的api也比较少,对于new Date()这样的构造函数返回的结果有些迷糊,今天重新看了下。
Mysql的date类型
Mysql一共4种Date类型可以存放时间格式的数据:
async function
继续学习es7的async和await
node
- node内存泄露,使用
node-menowatch等模块监测内存泄露问题
git
- git stash
git stashis used to save temporarily your working which don’t want to commit immediately and clean your working field to last commit.
PS:git stashonly save working field and stage
git
- git stash
git stashcan store your current working status in a git stack and then return you current working field to last commit. If you want recover your last stash, just usegit stash pop.
Difference between module.exports and exports in NodeJS
It’s a little confuse to me when I read handbook of browserify which explain how module works in Node. Here is the example to simulate how modules works:
gulp
- gulp watch
it watch files whichglobmatches, when any matched file changes gulp will revoke tasks you set or callback
study basic operation of git
- git remote
-vlist all remote branch- how to change https push to ssh?
- list remote branch
git remote -v, it’ll report like this:
origin https://github.com/YDSS/my_tech_diary.git (fetch)
origin https://github.com/YDSS/my_tech_diary.git (push) - remove the branch you want to change
git remote rm 'branch name like origin' - add new remote branch with ssh
git remote add origin git@github.com/YDSS/my_tech_diary.git - then check if it works
origin git@github.com:YDSS/my_tech_diary.git (fetch)
origin git@github.com:YDSS/my_tech_diary.git (push)
- list remote branch
- git submodule
addadd a new submodule with it’s https url or ssh
git submodule add <name> url(ssh)
example:git submodule add test_submodule git@github.com:YDSS/test_submodule.gitupdateupdate a submodule when your pwd is not in this submodule
git submodule update --remote <submodule name>
example:git submodule update --remote test_submodule- Of course submodule is treated as a sub module of git, so you can treat it a real module when you enter the dir of submodule.