├── .gitignore ├── .travis.yml ├── README.md ├── _config.yml ├── archives ├── civet │ ├── README.md │ ├── app.js │ ├── index.css │ ├── index.html │ └── index.js ├── csssecrets │ ├── index.html │ └── src │ │ ├── content.md │ │ ├── css-animations.md │ │ └── css-backgrounds.md ├── datavis │ ├── index.html │ └── src │ │ └── content.md ├── docker-in-practice │ ├── index.html │ └── src │ │ ├── components.md │ │ ├── container.md │ │ ├── devops.md │ │ ├── image.md │ │ ├── index.md │ │ ├── network.md │ │ ├── other.md │ │ ├── volumn.md │ │ ├── what.md │ │ └── why.md ├── javascript-in-practice │ ├── index.html │ ├── index.md │ └── src │ │ ├── ajax.md │ │ ├── commonjs.md │ │ ├── event.md │ │ └── style.md ├── javascript │ ├── catch.js │ ├── closure.js │ ├── example.js │ ├── fun-dance.js │ ├── index.html │ ├── index.md │ ├── prototype.js │ ├── scope.js │ ├── temp.js │ └── this.js ├── macaca-community │ ├── README.md │ ├── index.html │ └── src │ │ └── content.md ├── macaca │ ├── index.html │ └── src │ │ └── content.md ├── machine-learning │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 6.jpg │ ├── 7.jpg │ ├── 8.jpg │ ├── index.html │ └── src │ │ └── content.md ├── native-in-practice │ ├── index.html │ └── src │ │ ├── android │ │ ├── data.md │ │ ├── env.md │ │ ├── fundamentals.md │ │ ├── index.md │ │ ├── lang.md │ │ ├── layout.md │ │ ├── net.md │ │ ├── pattern.md │ │ ├── test.md │ │ └── view.md │ │ ├── index.md │ │ └── ios │ │ ├── data.md │ │ ├── env.md │ │ ├── event.md │ │ ├── index.md │ │ ├── lang.md │ │ ├── layout.md │ │ ├── memory.md │ │ ├── net.md │ │ ├── pattern.md │ │ ├── test.md │ │ ├── uikit.md │ │ └── view.md ├── ningjs │ ├── index.html │ └── src │ │ └── content.md ├── nodejs-primer │ ├── index.html │ └── src │ │ └── content.md ├── pillow │ ├── README.md │ ├── app.css │ ├── app.js │ ├── images │ │ ├── 2v1.png │ │ ├── 2v2.png │ │ ├── b.png │ │ ├── bird.png │ │ ├── bunny.png │ │ ├── earth.png │ │ ├── f.png │ │ ├── mario.png │ │ ├── phone.png │ │ ├── pillow.png │ │ └── x.png │ ├── index.css │ ├── index.html │ ├── index.js │ └── pillow.css ├── react-component │ ├── index.html │ └── src │ │ └── content.md └── toolkit-for-developers │ ├── index.html │ └── src │ └── content.md ├── assets ├── css │ ├── custom.css │ ├── print │ │ ├── paper.css │ │ └── pdf.css │ ├── reveal.css │ └── theme │ │ ├── README.md │ │ ├── beige.css │ │ ├── black.css │ │ ├── blood.css │ │ ├── league.css │ │ ├── moon.css │ │ ├── night.css │ │ ├── serif.css │ │ ├── simple.css │ │ ├── sky.css │ │ ├── solarized.css │ │ ├── wd.css │ │ └── white.css ├── img │ ├── favicon.ico │ └── github-icon-black.svg ├── js │ └── reveal.js ├── lib │ ├── css │ │ ├── railscasts.css │ │ └── zenburn.css │ ├── font │ │ ├── league-gothic │ │ │ ├── LICENSE │ │ │ ├── league-gothic.css │ │ │ ├── league-gothic.eot │ │ │ ├── league-gothic.ttf │ │ │ └── league-gothic.woff │ │ └── source-sans-pro │ │ │ ├── LICENSE │ │ │ ├── source-sans-pro-italic.eot │ │ │ ├── source-sans-pro-italic.ttf │ │ │ ├── source-sans-pro-italic.woff │ │ │ ├── source-sans-pro-regular.eot │ │ │ ├── source-sans-pro-regular.ttf │ │ │ ├── source-sans-pro-regular.woff │ │ │ ├── source-sans-pro-semibold.eot │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ ├── source-sans-pro-semibold.woff │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ └── source-sans-pro.css │ └── js │ │ ├── classList.js │ │ ├── head.min.js │ │ └── html5shiv.js └── plugin │ ├── highlight │ └── highlight.js │ ├── leap │ └── leap.js │ ├── markdown │ ├── example.html │ ├── example.md │ ├── markdown.js │ └── marked.js │ ├── math │ └── math.js │ ├── multiplex │ ├── client.js │ ├── index.js │ └── master.js │ ├── notes-server │ ├── client.js │ ├── index.js │ └── notes.html │ ├── notes │ ├── notes.html │ └── notes.js │ ├── print-pdf │ └── print-pdf.js │ ├── remotes │ └── remotes.js │ ├── search │ └── search.js │ └── zoom-js │ └── zoom.js ├── build.js ├── keynote └── 大前端测试的思考和在语雀的实践.key ├── package.json └── pdf ├── D2-面向未来的 AI 研发和前端领域大模型-达峰.pdf ├── README.md └── WeaveFox智能研发体系设计与企业实践-0415.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | npm-debug.log 4 | .idea/* 5 | *.un~ 6 | *.sw* 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: false 3 | node_js: 4 | - 8 5 | script: 6 | - npm i 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # slide 2 | 3 | --- 4 | 5 | [![build status][travis-image]][travis-url] 6 | 7 | [travis-image]: https://img.shields.io/travis/xudafeng/slide.svg 8 | [travis-url]: https://travis-ci.org/xudafeng/slide 9 | 10 | [link](//xudafeng.github.io/slide) 11 | 12 | 13 | - [civet](./archives/civet) 14 | - [csssecrets](./archives/csssecrets) 15 | - [datavis](./archives/datavis) 16 | - [docker-in-practice](./archives/docker-in-practice) 17 | - [javascript](./archives/javascript) 18 | - [javascript-in-practice](./archives/javascript-in-practice) 19 | - [macaca](./archives/macaca) 20 | - [macaca-community](./archives/macaca-community) 21 | - [machine-learning](./archives/machine-learning) 22 | - [native-in-practice](./archives/native-in-practice) 23 | - [ningjs](./archives/ningjs) 24 | - [nodejs-primer](./archives/nodejs-primer) 25 | - [pillow](./archives/pillow) 26 | - [react-component](./archives/react-component) 27 | - [toolkit-for-developers](./archives/toolkit-for-developers) 28 | 29 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /archives/civet/README.md: -------------------------------------------------------------------------------- 1 | http://www.w3school.com.cn/xsl/ 2 | 3 | http://en.wikipedia.org/wiki/Template_engine_(web)#Comparison 4 | -------------------------------------------------------------------------------- /archives/civet/app.js: -------------------------------------------------------------------------------- 1 | (function(X) { 2 | new X.slide({ 3 | prefix: 'page', 4 | cls: 'page', 5 | arrow: '.arrow', 6 | style: 'default', 7 | switcher: '#switcher-left,#switcher-right', 8 | webSocket: true 9 | }); 10 | var animElm = X.DOM.get('#tmall'); 11 | var $ = X.$; 12 | X.Event.on(animElm,'click',function(e){ 13 | e.preventDefault(); 14 | document.getElementById('civet').style.backgroundColor = '#000'; 15 | animElm.style.backgroundColor = '#000'; 16 | $('.bowl')[0].style.backgroundColor = '#000'; 17 | $('.bowl-right')[0].style.backgroundColor = '#000'; 18 | $('.bowl-left')[0].style.backgroundColor = '#000'; 19 | $('.neck-right')[0].style.backgroundColor = '#000'; 20 | $('.neck-left')[0].style.backgroundColor = '#000'; 21 | }); 22 | var slide2Elm = $('#slide21'); 23 | X.Event.on(slide2Elm,'click',function(){ 24 | document.getElementById('slide22').style.display = 'block'; 25 | }) 26 | })(XDF); 27 | -------------------------------------------------------------------------------- /archives/csssecrets/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS揭秘-2016 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 26 | 27 | 28 | 29 |
30 |
31 |
32 |
33 |

CSS揭秘-2016

34 |
35 |
36 | 37 |
38 |
39 |
43 |
44 |
45 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 | 61 | 62 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /archives/csssecrets/src/content.md: -------------------------------------------------------------------------------- 1 | # W3C 2 | 3 | [w3.org/Style/CSS/](https://www.w3.org/Style/CSS/) 4 | 5 | - - - 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /archives/csssecrets/src/css-animations.md: -------------------------------------------------------------------------------- 1 | ## [w3.org/TR/css-animations/](https://www.w3.org/TR/css-animations/) 2 | 3 | - - - 4 | 5 | ## [w3.org/TR/web-animations/](https://www.w3.org/TR/web-animations/) 6 | 7 | - - - 8 | 9 | 10 | -------------------------------------------------------------------------------- /archives/csssecrets/src/css-backgrounds.md: -------------------------------------------------------------------------------- 1 | ## [w3.org/TR/css-backgrounds/](https://www.w3.org/TR/css-backgrounds/) 2 | 3 | - - - 4 | 5 | -------------------------------------------------------------------------------- /archives/datavis/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Data Visualization 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 28 | 39 | 40 | 41 | 42 |
Fork me on Github
43 |
44 |
45 |
49 |
50 |
51 |
52 | 53 | 54 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /archives/datavis/src/content.md: -------------------------------------------------------------------------------- 1 | # Data Visualization 2 | 3 | - - - 4 | 5 | ## No charting libraries intro inside 6 | 7 | - - - 8 | 9 | 10 | 11 | - - - 12 | 13 | # 数据使我们探索未知 14 | 15 | - - - 16 | 17 | # 而可视化能够洞察认知与未知之间的关系 18 | 19 | - - - 20 | 21 | ## Useful Theory 22 | 23 | [link](https://antv.alipay.com/zh-cn/vis/index.html) 24 | 25 | - - - 26 | 27 | ## Start with a simple sample - Wordle 28 | 29 | - - - 30 | 31 | 32 | 33 | [wordle](//github.com/xudafeng/wordle) - wordle based on Vue. 34 | 35 | - - - 36 | 37 | 38 | 39 | [jspiral](//github.com/xudafeng/jspiral) - 🌀JavaScript Implementation of 2D spiral 40 | 41 | - - - 42 | 43 | # 2D > 3D 44 | 45 | - - - 46 | 47 | 48 | 49 | - - - 50 | 51 | ## Something interesting 52 | 53 | - - - 54 | 55 | ### Inheritance Visualization 56 | 57 | - - - 58 | 59 | 60 | 61 | - [java_inheritance](//github.com/doing-data-science/java_inheritance) 62 | - [objc_inheritance](//github.com/doing-data-science/objc_inheritance) 63 | 64 | - - - 65 | 66 | ### Algorithm Visualization 67 | 68 | - - - 69 | 70 | ![](//ww1.sinaimg.cn/large/6d308bd9gw1fauyb4ybb7g20x40k0e84.gif) 71 | 72 | [doing-data-science/algorithm-collection](//github.com/doing-data-science/algorithm-collection) 73 | 74 | - - - 75 | 76 | 77 | 78 | [astar](//pillowjs.github.io/pillow-sample/astar/) 79 | 80 | - - - 81 | 82 | ### Color Visualization 83 | 84 | - - - 85 | 86 | 87 | 88 | - [color-viewer](//github.com/xudafeng/color-viewer) 89 | - [canvas-color](//github.com/xudafeng/canvas-color) 90 | 91 | - - - 92 | 93 | ### UML Visualization 94 | 95 | - - - 96 | 97 | 98 | 99 | - - - 100 | 101 | 102 | 103 | - - - 104 | 105 | 106 | 107 | - [macaca-reporter](//github.com/macacajs/macaca-reporter) 108 | - [d3-tree](//github.com/zhuyali/d3-tree) 109 | 110 | - - - 111 | 112 | # Python 113 | 114 | - [matplotlib](//github.com/matplotlib/matplotlib) 115 | 116 | - - - 117 | 118 | # R 119 | 120 | - [ggplot2](//github.com/tidyverse/ggplot2) 121 | - [rwork](//github.com/xudafeng/rwork) 122 | 123 | - - - 124 | 125 | ![](//wx1.sinaimg.cn/large/6d308bd9gy1foi71r9tmkj20dw09v3yv.jpg) 126 | 127 | - - - 128 | 129 | # END 130 | -------------------------------------------------------------------------------- /archives/docker-in-practice/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Docker从入门到实践 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 29 | 30 | 31 | 32 |
Fork me on Github
33 |
34 |
35 |
36 |
37 |

🐳Docker从入门到实践

38 |
39 |
40 |
44 |
45 |
49 |
50 |
54 |
55 |
59 |
60 |
64 |
65 |
69 |
70 |
74 |
75 |
79 |
80 |
84 |
85 |
89 |
90 |
91 |

END

92 |
93 |
94 |
95 | 96 | 97 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /archives/docker-in-practice/src/components.md: -------------------------------------------------------------------------------- 1 | # Components 2 | 3 | - - - 4 | 5 | ## Isolation 6 | 7 | - - - 8 | 9 | ## Go programming language 10 | 11 | - - - 12 | 13 | Why Go? 14 | 15 | - [lxc](//github.com/lxc/lxc) 16 | - [go-lxc](//github.com/lxc/go-lxc) 17 | - [opencontainers](https://github.com/opencontainers/runc) 18 | 19 | - - - 20 | 21 | ## cgroups and namespaces capabilities of the Linux kernel 22 | 23 | - - - 24 | 25 | ## [bocker](https://github.com/p8952/bocker) 26 | 27 | 😂Docker implemented in around 100 lines of bash 28 | 29 | - - - 30 | 31 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f8m9surr4aj20d50e4t9o.jpg) 32 | 33 | For mac user 34 | 35 | - - - 36 | 37 | ```shell 38 | # Display system-wide information 39 | $ docker info 40 | ``` 41 | -------------------------------------------------------------------------------- /archives/docker-in-practice/src/container.md: -------------------------------------------------------------------------------- 1 | # Container 2 | 3 | - - - 4 | 5 | ```shell 6 | # docker start|stop|kill|restart|pause|unpause|rm|commit|inspect|logs 7 | $ docker ps 8 | $ docker ps -a 9 | $ docker ps -s 10 | $ docker logs $CONTAINER 11 | $ docker rm $CONTAINER 12 | ``` 13 | 14 | - - - 15 | 16 | ```shell 17 | $ docker kill $(docker ps -a -q) # kill running container 18 | $ docker rm $(docker ps -a -q) # kill stoped container 19 | ``` 20 | 21 | - - - 22 | 23 | ```shell 24 | $ docker run -it -p 8085:8085 -v $(pwd):/home xudafeng/startserver 25 | ``` 26 | -------------------------------------------------------------------------------- /archives/docker-in-practice/src/devops.md: -------------------------------------------------------------------------------- 1 | # DevOps 2 | 3 | - - - 4 | 5 | ![](http://ww2.sinaimg.cn/large/6d308bd9gw1f8stcv08bdj20go0fu76a.jpg) 6 | -------------------------------------------------------------------------------- /archives/docker-in-practice/src/image.md: -------------------------------------------------------------------------------- 1 | # Image 2 | 3 | - - - 4 | 5 | ## [startserver-docker sample](https://github.com/startserver/startserver-docker) 6 | 7 | - - - 8 | 9 | ```shell 10 | $ docker images # List images 11 | $ docker pull xudafeng/startserver 12 | $ docker search xudafeng/startserver 13 | $ docker rmi xudafeng/startserver 14 | $ docker history xudafeng/startserver 15 | $ docker push 16 | $ docker save 17 | $ docker load 18 | ``` 19 | 20 | - - - 21 | 22 | ```shell 23 | $ docker rmi $(docker images -q -f dangling=true) 24 | ``` 25 | 26 | - - - 27 | 28 | ## Dockerfile 29 | 30 | - - - 31 | 32 | ``` 33 | FROM mhart/alpine-node:4 34 | 35 | ENV SERVER_PORT 8085 36 | 37 | MAINTAINER xdf 38 | 39 | RUN npm i startserver -g 40 | 41 | EXPOSE $SERVER_PORT 42 | 43 | COPY . /src 44 | 45 | WORKDIR /home 46 | 47 | ENTRYPOINT ["/src/entrypoint.sh"] 48 | ``` 49 | 50 | - - - 51 | 52 | ## Build Image 53 | 54 | ```shell 55 | $ docker build . 56 | $ docker build -t="startserver" . 57 | ``` 58 | -------------------------------------------------------------------------------- /archives/docker-in-practice/src/index.md: -------------------------------------------------------------------------------- 1 | - [What is Docker](#inner) 2 | - [Why Docker](#inner) 3 | - [Components](#inner) 4 | - [Image](#inner) 5 | - [Container](#inner) 6 | - [Data volumes](#inner) 7 | - [Network](#inner) 8 | - [Other](#inner) 9 | -------------------------------------------------------------------------------- /archives/docker-in-practice/src/network.md: -------------------------------------------------------------------------------- 1 | # Network 2 | 3 | - - - 4 | 5 | ```shell 6 | $ docker run -p ip:hostPort:containerPort $IMAGE 7 | ``` 8 | -------------------------------------------------------------------------------- /archives/docker-in-practice/src/other.md: -------------------------------------------------------------------------------- 1 | # Other 2 | 3 | - - - 4 | 5 | ## Registry 6 | 7 | - - - 8 | 9 | - --insecure-registry 10 | - --engine-registry-mirror 11 | 12 | - - - 13 | 14 | - Docker Hub 15 | - Docker Pool 16 | - Private Repo 17 | 18 | - - - 19 | 20 | ## Docker compose 21 | 22 | [reliable-macaca-docker-compose sample](//github.com/reliablejs/reliable-macaca-docker-compose) 23 | -------------------------------------------------------------------------------- /archives/docker-in-practice/src/volumn.md: -------------------------------------------------------------------------------- 1 | # Data volumes 2 | 3 | - - - 4 | 5 | ```shell 6 | $ docker run -v /opt/data:/data startserver 7 | $ docker rm -v CONTAINER 8 | ``` 9 | 10 | - - - 11 | 12 | ## Cross Container 13 | 14 | ```shell 15 | $ docker run -it --name CONTAINER1 --volumes-from CONTAINER2 startserver /bin/bash 16 | ``` 17 | 18 | - - - 19 | 20 | ## Backup 21 | 22 | ```shell 23 | $ docker run --rm --volumes-from dbdata -v $(pwd):/backup ubuntu tar zcvf /backup/mysql.tar.gz /var/lib/mysql 24 | ``` 25 | -------------------------------------------------------------------------------- /archives/docker-in-practice/src/what.md: -------------------------------------------------------------------------------- 1 | # What is Docker 2 | 3 | - - - 4 | 5 | ## Start with Cloud-Computing 6 | 7 | - - - 8 | 9 | ## Evolution -> Revolution 10 | 11 | - - - 12 | 13 | ## Mobile & BaaS 14 | 15 | - - - 16 | 17 | ## PaaS, SaaS, IaaS 18 | 19 | - - - 20 | 21 | ## dotcloud 22 | 23 | PaaS = runtime + service 24 | 25 | - - - 26 | 27 | ## Your PaaS has Docker ... so what? 28 | 29 | - - - 30 | 31 | ## Microsoft, Google, Amazon, and IBM 32 | 33 | - - - 34 | 35 | ```shell 36 | $ curl -i www.dotcloud.com 37 | ``` 38 | 39 | ``` 40 | HTTP/1.1 302 Moved Temporarily 41 | Server: Varnish 42 | Location: http://cloud.docker.com 43 | Content-Type: text/html; charset=utf-8 44 | Content-Length: 315 45 | Accept-Ranges: bytes 46 | Date: Sun, 09 Oct 2016 03:35:07 GMT 47 | Via: 1.1 varnish 48 | Connection: close 49 | Age: 0 50 | ... 51 | ``` 52 | -------------------------------------------------------------------------------- /archives/docker-in-practice/src/why.md: -------------------------------------------------------------------------------- 1 | # Why Docker 2 | 3 | - - - 4 | 5 | - Simple Management 6 | - Continuous Integration and Delivery 7 | - High Availability 8 | - Standardized Unit for Software Dev 9 | 10 | - - - 11 | 12 | | feature | container | vm | 13 | | ----------- | --------- | ------ | 14 | | launch | (s) | (min) | 15 | | hard disk | MB | GB | 16 | | perf | high | low | 17 | | system grid | thousands | dozens | 18 | 19 | - - - 20 | 21 | ## Why Now 22 | -------------------------------------------------------------------------------- /archives/javascript-in-practice/index.md: -------------------------------------------------------------------------------- 1 | Javascript in practice 2 | ====================== 3 | 4 | Ajax 5 | ==== 6 | 7 | Asynchronous Javascript And XML 8 | 9 | origin 10 | ====== 11 | 12 | ```javascript 13 | var api = 'https://api.github.com/users/xudafeng'; 14 | 15 | var xmlHttp = new XMLHttpRequest(); 16 | 17 | xmlHttp.open('GET', api, true); 18 | 19 | xmlHttp.onreadystatechange = function(d) { 20 | if (xmlHttp.readyState == 4) { 21 | console.log(xmlHttp.responseText); 22 | } 23 | }; 24 | 25 | xmlHttp.send(null); 26 | ``` 27 | 28 | log 29 | === 30 | 31 | ![](http://ww3.sinaimg.cn/mw1024/6d308bd9gw1eu3a5c099tj20ku0jmdil.jpg) 32 | 33 | jQuery 34 | ====== 35 | 36 | ```javascript 37 | var api = 'https://api.github.com/users/xudafeng'; 38 | 39 | $.ajax({ 40 | method: 'GET', 41 | url: api, 42 | data: { 43 | foo: 'bar' 44 | } 45 | }).done(function(msg) { 46 | console.log(msg); 47 | }); 48 | ``` 49 | 50 | JSON 51 | ==== 52 | 53 | JavaScript Object Notation 54 | 55 | ### JSONP 56 | 57 | JSON with Padding 58 | 59 | - script tag 60 | - javascript callback 61 | 62 | Reference 63 | ========= 64 | 65 | 0. [JSON](http://www.json.org/) 66 | 0. [jQuery.ajax](http://api.jquery.com/jQuery.ajax/) 67 | 0. [MDN, Using_XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest) 68 | 69 | 70 | commonjs 71 | ======== 72 | 73 | namespace 74 | ========= 75 | 76 | ```javascript 77 | var bar = function() { 78 | console.log('bar'); 79 | }; 80 | 81 | bar(); 82 | 83 | var obj = { 84 | foo: function() { 85 | console.log('foo'); 86 | } 87 | }; 88 | 89 | obj.foo(); 90 | ``` 91 | 92 | closure 93 | ======= 94 | 95 | start with closure 96 | 97 | ```javascript 98 | (function() { 99 | console.log(this) 100 | })() 101 | ``` 102 | 103 | module.exports 104 | ============== 105 | 106 | ```javascript 107 | module.exports = function() { 108 | console.log('foo'); 109 | } 110 | ``` 111 | 112 | exports 113 | ======= 114 | 115 | ```javascript 116 | exports.foo = function() { 117 | console.log('bar'); 118 | } 119 | 120 | ``` 121 | 122 | AMD 123 | === 124 | 125 | ```javascript 126 | define(function(require, exports, module) { 127 | var foo = require('foo'); 128 | var bar = require('bar'); 129 | 130 | console.log(foo); 131 | }); 132 | ``` 133 | 134 | webpack 135 | ======= 136 | 137 | 138 | Reference 139 | ========= 140 | 141 | 0. [commonjs](http://www.commonjs.org/) 142 | 0. [webpack](http://webpack.github.io/) 143 | 144 | event 145 | ===== 146 | 147 | publish/subscribe 148 | 149 | ```javascript 150 | var EventEmitter = require('events').EventEmitter; 151 | 152 | var foo = new EventEmitter(); 153 | 154 | foo.on('bar', function(d) { 155 | console.log(d) 156 | }); 157 | 158 | foo.emit('bar', { 159 | data: 'data' 160 | }); 161 | 162 | ``` 163 | 164 | Reference 165 | ========= 166 | 167 | 0. [nodejs, events](http://xudafeng.github.io/nodejs/events.html) 168 | 169 | style 170 | ===== 171 | 172 | 2 Spaces for indention 173 | ====================== 174 | 175 | ```javascript 176 | 177 | function() { 178 | 179 | // right 180 | var foo = 'bar'; 181 | 182 | // wrong 183 | var foo = 'bar'; 184 | } 185 | 186 | ``` 187 | 188 | Use Semicolons 189 | ============== 190 | 191 | ```javascript 192 | // right 193 | var foo = 'bar'; 194 | 195 | // wrong 196 | var foo = 'bar' 197 | ``` 198 | 199 | 80 characters per line 200 | ====================== 201 | 202 | Use single quotes 203 | ================= 204 | 205 | ```javascript 206 | // right 207 | var foo = 'bar'; 208 | 209 | // wrong 210 | 211 | var foo = "bar"; 212 | ``` 213 | 214 | Opening braces go on the same line 215 | ================================== 216 | 217 | ```javascript 218 | // right 219 | 220 | if (true) { 221 | console.log('winning'); 222 | } 223 | 224 | // wrong 225 | 226 | if (true) 227 | { 228 | console.log('losing'); 229 | } 230 | 231 | ``` 232 | 233 | Declare one variable per var statement 234 | ====================================== 235 | 236 | ```javascript 237 | // right 238 | 239 | var keys = ['foo', 'bar']; 240 | var values = [23, 42]; 241 | 242 | // wrong 243 | 244 | var keys = ['foo', 'bar'], 245 | values = [23, 42]; 246 | 247 | ``` 248 | 249 | Use the `===` operator 250 | ====================== 251 | 252 | ```javascript 253 | 254 | // right 255 | 256 | if (foo !== 1) { 257 | console.log('bar'); 258 | } 259 | 260 | //wrong 261 | 262 | if (foo != 1) { 263 | console.log('bar'); 264 | } 265 | 266 | ``` 267 | 268 | Reference 269 | ========= 270 | 271 | 0. [node-style-guide](https://github.com/felixge/node-style-guide) 272 | 0. [Airbnb, javascript](https://github.com/airbnb/javascript) 273 | -------------------------------------------------------------------------------- /archives/javascript-in-practice/src/ajax.md: -------------------------------------------------------------------------------- 1 | Ajax 2 | ==== 3 | 4 | Asynchronous Javascript And XML 5 | 6 | ### origin 7 | 8 | ```javascript 9 | var api = 'https://api.github.com/users/xudafeng'; 10 | 11 | var xmlHttp = new XMLHttpRequest(); 12 | 13 | xmlHttp.open('GET', api, true); 14 | 15 | xmlHttp.onreadystatechange = function(d) { 16 | if (xmlHttp.readyState == 4) { 17 | console.log(xmlHttp.responseText); 18 | } 19 | }; 20 | 21 | xmlHttp.send(null); 22 | ``` 23 | 24 | ![](http://ww3.sinaimg.cn/mw1024/6d308bd9gw1eu3a5c099tj20ku0jmdil.jpg) 25 | 26 | jQuery 27 | ====== 28 | 29 | ```javascript 30 | var api = 'https://api.github.com/users/xudafeng'; 31 | 32 | $.ajax({ 33 | method: 'GET', 34 | url: api, 35 | data: { 36 | foo: 'bar' 37 | } 38 | }).done(function(msg) { 39 | console.log(msg); 40 | }); 41 | ``` 42 | 43 | JSON 44 | ==== 45 | 46 | JavaScript Object Notation 47 | 48 | ### JSONP 49 | 50 | JSON with Padding 51 | 52 | - script tag 53 | - javascript callback 54 | 55 | Reference 56 | ========= 57 | 58 | 0. [JSON](http://www.json.org/) 59 | 0. [jQuery.ajax](http://api.jquery.com/jQuery.ajax/) 60 | 0. [MDN, Using_XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest) 61 | -------------------------------------------------------------------------------- /archives/javascript-in-practice/src/commonjs.md: -------------------------------------------------------------------------------- 1 | commonjs 2 | ======== 3 | 4 | namespace 5 | ========= 6 | 7 | ```javascript 8 | var bar = function() { 9 | console.log('bar'); 10 | }; 11 | 12 | bar(); 13 | 14 | var obj = { 15 | foo: function() { 16 | console.log('foo'); 17 | } 18 | }; 19 | 20 | obj.foo(); 21 | ``` 22 | 23 | closure 24 | ======= 25 | 26 | start with closure 27 | 28 | ```javascript 29 | (function() { 30 | console.log(this) 31 | })() 32 | ``` 33 | 34 | module.exports 35 | ============== 36 | 37 | ```javascript 38 | module.exports = function() { 39 | console.log('foo'); 40 | } 41 | ``` 42 | 43 | exports 44 | ======= 45 | 46 | ```javascript 47 | exports.foo = function() { 48 | console.log('bar'); 49 | } 50 | 51 | ``` 52 | 53 | AMD 54 | === 55 | 56 | ```javascript 57 | define(function(require, exports, module) { 58 | var foo = require('foo'); 59 | var bar = require('bar'); 60 | 61 | console.log(foo); 62 | }); 63 | ``` 64 | 65 | webpack 66 | ======= 67 | 68 | 69 | Reference 70 | ========= 71 | 72 | 0. [commonjs](http://www.commonjs.org/) 73 | 0. [webpack](http://webpack.github.io/) 74 | -------------------------------------------------------------------------------- /archives/javascript-in-practice/src/event.md: -------------------------------------------------------------------------------- 1 | event 2 | ===== 3 | 4 | publish/subscribe 5 | 6 | ```javascript 7 | var EventEmitter = require('events').EventEmitter; 8 | 9 | var foo = new EventEmitter(); 10 | 11 | foo.on('bar', function(d) { 12 | console.log(d) 13 | }); 14 | 15 | foo.emit('bar', { 16 | data: 'data' 17 | }); 18 | 19 | ``` 20 | 21 | Reference 22 | ========= 23 | 24 | 0. [nodejs, events](http://xudafeng.github.io/nodejs/events.html) 25 | -------------------------------------------------------------------------------- /archives/javascript-in-practice/src/style.md: -------------------------------------------------------------------------------- 1 | style 2 | ===== 3 | 4 | ### 2 Spaces for indention 5 | 6 | ```javascript 7 | 8 | function() { 9 | 10 | // right 11 | var foo = 'bar'; 12 | 13 | // wrong 14 | var foo = 'bar'; 15 | } 16 | 17 | ``` 18 | 19 | ### Use Semicolons 20 | 21 | ```javascript 22 | // right 23 | var foo = 'bar'; 24 | 25 | // wrong 26 | var foo = 'bar' 27 | ``` 28 | 29 | ### 80 characters per line 30 | 31 | ### Use single quotes 32 | 33 | ```javascript 34 | // right 35 | var foo = 'bar'; 36 | 37 | // wrong 38 | 39 | var foo = "bar"; 40 | ``` 41 | 42 | ### Opening braces go on the same line 43 | 44 | ```javascript 45 | // right 46 | 47 | if (true) { 48 | console.log('winning'); 49 | } 50 | 51 | // wrong 52 | 53 | if (true) 54 | { 55 | console.log('losing'); 56 | } 57 | 58 | ``` 59 | 60 | ### Declare one variable per var statement 61 | 62 | ```javascript 63 | // right 64 | 65 | var keys = ['foo', 'bar']; 66 | var values = [23, 42]; 67 | 68 | // wrong 69 | 70 | var keys = ['foo', 'bar'], 71 | values = [23, 42]; 72 | 73 | ``` 74 | 75 | ### Use the `===` operator 76 | 77 | ```javascript 78 | 79 | // right 80 | 81 | if (foo !== 1) { 82 | console.log('bar'); 83 | } 84 | 85 | //wrong 86 | 87 | if (foo != 1) { 88 | console.log('bar'); 89 | } 90 | 91 | ``` 92 | 93 | ### Reference 94 | 95 | 0. [node-style-guide](https://github.com/felixge/node-style-guide) 96 | 0. [Airbnb, javascript](https://github.com/airbnb/javascript) 97 | -------------------------------------------------------------------------------- /archives/javascript/catch.js: -------------------------------------------------------------------------------- 1 | process.on('uncaughtException', function(err) { 2 | console.error('Error caught in uncaughtException event:', err); 3 | }); 4 | 5 | try { 6 | setTimeout(function() { 7 | throw new Error("error"); 8 | }, 16); 9 | } catch(err) { 10 | console.log(err); 11 | } 12 | -------------------------------------------------------------------------------- /archives/javascript/closure.js: -------------------------------------------------------------------------------- 1 | function getStaffNum() { 2 | var staffNum = 5000; 3 | return function() { 4 | staffNum++; 5 | console.log("Num is " + staffNum); 6 | } 7 | } 8 | 9 | var staffNum = getStaffNum(); 10 | 11 | staffNum(); // 输出什么? 12 | 13 | staffNum(); // 输出什么? 14 | -------------------------------------------------------------------------------- /archives/javascript/example.js: -------------------------------------------------------------------------------- 1 | console.log('\nhello world!\n'); 2 | var iNum = 0; 3 | 4 | for (var i = 1; i < 10; i++) { 5 | if (i % 5 === 0) { 6 | break; //输出什么? 7 | //continue; //输出什么? 8 | } 9 | iNum++; 10 | } 11 | console.log(iNum); 12 | -------------------------------------------------------------------------------- /archives/javascript/fun-dance.js: -------------------------------------------------------------------------------- 1 | var a = "\r\n", max = 0; 2 | function tlist() { 3 | max = tlist.arguments.length; 4 | for (i = 0; i < max; i++) { 5 | this[i] = tlist.arguments[i]; 6 | } 7 | } 8 | var tl = new tlist( 9 | " o" + a + 10 | " /|\\" + a + 11 | " */ \\* 跳舞" + a, 12 | 13 | " o_" + a + 14 | " \<| *" + a + 15 | " *\>\\ 跳舞" + a, 16 | 17 | " _o/*" + a + 18 | " * |" + a + 19 | " / \\ 跳舞" + a, 20 | 21 | " *\o_" + a + 22 | " / *" + a + 23 | " \<\\ 跳舞" + a, 24 | 25 | " _o/*" + a + 26 | " * |" + a + 27 | " / \\ 跳舞" + a, 28 | 29 | " *\\c/*" + a + 30 | " )" + a + 31 | " / \> 跳舞" + a, 32 | 33 | " *" + a + 34 | " \\__/c" + a + 35 | " \> \\* 跳舞" + a, 36 | 37 | " __/" + a + 38 | " (o_*" + a + 39 | " \\* 跳舞" + a, 40 | 41 | " \\ /" + a + 42 | " |" + a + 43 | " */o\\* 跳舞" + a, 44 | 45 | " \\_" + a + 46 | " (" + a + 47 | " */o\\* 跳舞" + a, 48 | 49 | " \<_" + a + 50 | " __(" + a + 51 | " * o|* 跳舞" + a, 52 | 53 | " /_" + a + 54 | " __(" + a + 55 | " * o|* 跳舞" + a, 56 | 57 | " ___" + a + 58 | " *\/ \>" + a + 59 | " o|* 跳舞" + a, 60 | 61 | " *" + a + 62 | " o|_/" + a + 63 | " */ \\ 跳舞" + a, 64 | 65 | " *" + a + 66 | " _o|_" + a + 67 | " * \>\\ 跳舞" + a, 68 | 69 | " _o/*" + a + 70 | " * |" + a + 71 | " / \\ 跳舞" + a, 72 | 73 | " *\\o/*" + a + 74 | " |" + a + 75 | " / \\ 跳舞" + a, 76 | 77 | " c/*" + a + 78 | " \<\\" + a + 79 | " */\\ 跳舞" + a, 80 | 81 | " c__" + a + 82 | " \<\ *" + a + 83 | " */\\ 跳舞" + a, 84 | 85 | " c__" + a + 86 | " /\ *" + a + 87 | " * /\> 跳舞" + a, 88 | 89 | " c/*" + a + 90 | " /(__" + a + 91 | " * / 跳舞" + a, 92 | 93 | " __o/*" + a + 94 | " * (__" + a + 95 | " \< 跳舞" + a, 96 | 97 | " __o_" + a + 98 | " * / *" + a + 99 | " \<\\ 跳舞" + a, 100 | 101 | " *_o_" + a + 102 | " | *" + a + 103 | " \< \\ 跳舞" + a, 104 | 105 | " *_c_*" + a + 106 | " |" + a + 107 | " \>\\ 跳舞" + a, 108 | 109 | " *_c_*" + a + 110 | " |__" + a + 111 | " \> 跳舞" + a, 112 | 113 | " *_c_*" + a + 114 | " __|__" + a + 115 | " 跳舞" + a, 116 | 117 | " " + a + 118 | " *_c_*" + a + 119 | " __)__ 跳舞" + a, 120 | 121 | " " + a + 122 | " *\\c/*" + a + 123 | " __)__ 跳舞" + a 124 | 125 | ); 126 | var x = 0; 127 | var preVal = ''; 128 | function tick() { 129 | preVal = " " + a + tl[x]; 130 | console.log('\033[2J'); 131 | console.log(preVal); 132 | x++; 133 | 134 | if (x != max) { 135 | setTimeout(tick, 200); 136 | } else { 137 | x = 0; 138 | } 139 | } 140 | tick(); 141 | -------------------------------------------------------------------------------- /archives/javascript/prototype.js: -------------------------------------------------------------------------------- 1 | function Company(name) { 2 | this.name = name; 3 | } 4 | 5 | Company.prototype.showCompany = function() { 6 | console.log(this.name); 7 | }; 8 | 9 | function Google(name) { 10 | this.name = name; 11 | } 12 | 13 | Google.prototype = new Company(); 14 | Google.prototype.constructor = Google; 15 | 16 | // Google.prototype.showCompany = function() { 17 | // console.log('巨头公司' + this.name); 18 | // }; 19 | 20 | var google = new Google('谷歌'); 21 | 22 | google.showCompany(); 23 | 24 | var facebook = new Company('脸谱'); 25 | 26 | facebook.showCompany(); 27 | -------------------------------------------------------------------------------- /archives/javascript/scope.js: -------------------------------------------------------------------------------- 1 | // var a = '0'; 2 | function level0() { 3 | // var a = '1'; 4 | 5 | function level1() { 6 | // var a = '2'; 7 | function level2a() { 8 | console.log(a); 9 | } 10 | console.log(a); 11 | 12 | level2a(); 13 | } 14 | console.log(a); 15 | level1(); 16 | } 17 | console.log(aa); 18 | -------------------------------------------------------------------------------- /archives/javascript/temp.js: -------------------------------------------------------------------------------- 1 | var nameObj = { 2 | name: 'Tom', 3 | showName: function() { 4 | console.log(this.name); 5 | }, 6 | waitShowName: function() { 7 | this.showName(); 8 | setTimeout(function() { 9 | this.showName(); 10 | }, 1000); 11 | } 12 | }; 13 | 14 | nameObj.waitShowName(); 15 | -------------------------------------------------------------------------------- /archives/javascript/this.js: -------------------------------------------------------------------------------- 1 | var name = 'Bob'; 2 | var nameObj = { 3 | name: 'Tom', 4 | showName: function() { 5 | console.log(this.name); 6 | }, 7 | waitShowName: function() { 8 | setTimeout(this.showName, 1000); 9 | } 10 | }; 11 | 12 | nameObj.waitShowName(); 13 | -------------------------------------------------------------------------------- /archives/macaca-community/README.md: -------------------------------------------------------------------------------- 1 | For NingJS 2016 2 | 3 | https://github.com/jsconfcn/ningjs 4 | -------------------------------------------------------------------------------- /archives/macaca-community/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Macaca Community 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 28 | 29 | 30 | 31 |
32 |
33 |
34 |
35 |

Macaca Community

36 |
37 |
38 |
42 |
43 |
44 |
45 | 46 | 47 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /archives/macaca-community/src/content.md: -------------------------------------------------------------------------------- 1 | # Macaca 的中文社区之路 2 | 3 | - - - 4 | 5 | Macaca 是由支付宝国际无线团队研发的自动化测试方案,
6 | 是阿里巴巴年度开源产品之一。 7 | 8 | - - - 9 | 10 | # 正式开源 11 | 12 | 于 2016.03.16 正式开源后,Macaca 一直保持着平稳的节奏,持续将业内、阿里、蚂蚁国际的优秀实践带给社区。同年 4 月,在各位行业精英的促成下 TesterHome Macaca 专栏正式开通,使得 Macaca 自身也从社区汲取了大量的经验与反馈。 13 | 14 | - - - 15 | 16 | # 全面支持 Window 平台 17 | 18 | 基于大量用户的诉求,Macaca 在 **2016.05.22** 全面支持 Windows 平台,同时环境检具 Macaca-Doctor 问世。 19 | 20 | - - - 21 | 22 | # App-Inspector 诞生 23 | 24 | > https://macacajs.github.io/inspector 25 | 26 | 2016.09.19 业内首款多端 App 查看器 - App-Inspector 问世,能够同时支持 iOS 和 Android 平台,轻量化的设计为客户端研发和测试从业者带来了福音。 27 | 28 | - - - 29 | 30 | # UI Recorder 诞生 31 | 32 | > https://macacajs.github.io/recorder 33 | 34 | 2016.10.30 UI Recorder 正式支持移动端,业内首款三端录制器问世,在特定场景下极大降低了测试用例生产和维护的成本。 35 | 36 | - - - 37 | 38 | # 计算机视觉方案 39 | 40 | > https://macacajs.github.io/computer-vision 41 | 42 | 2017.04.09 计算机视觉测试方案出炉,Macaca 团队研发的 NodeCV 基础图像服务为测试断言带来了新选择,也为智能化测试打开了新空间。 43 | 44 | - - - 45 | 46 | # Macaca 迎来了 V2 47 | 48 | 2017.05.14 Macaca 各核心驱动模块完成 2.0 升级,接口更加标准化,稳定性也得到了很大的增强。 49 | 50 | - - - 51 | 52 | # NoSmoke 问世 53 | 54 | > https://macacajs.github.io/nosmoke 55 | 56 | 2017.05.16 业内首款三端自动遍历器 - NoSmoke 问世,基于描述和学习的遍历器为特定场景的自动化回归带来了极大的遍历。 57 | 58 | [开放产品图] 59 | 60 | - - - 61 | 62 | # Torch 问世 63 | 64 | > https://macacajs.github.io/browser 65 | 66 | 2017.06.10 浏览器运行时测试框架 Torch 问世,极简的接入方式和为图表类,游戏框架类工程提供了自动化解决方案。 67 | 68 | - - - 69 | 70 | # Macaca Reporter 71 | 72 | 2017.08.23 Macaca Reporter 发布,报告器趋于统一,支持多个工具平台的报告器给大家带来更好的体验。 73 | 74 | - - - 75 | 76 | # DataHub 问世 77 | 78 | > https://macacajs.github.io/datahub 79 | 80 | 2017.11.24 DataHub 可持续的数据提供服务问世,融合了场景编排和去中心化理念的设计,100% 的业务端到端覆盖成为可能。 81 | 82 | - - - 83 | 84 | # Reliable 问世 85 | 86 | > https://macacajs.github.io/reliable 87 | 88 | 2018.06.08 Reliable 问世,为各中小团队快速建立自建测试套件服务带来了更多想象。 89 | 90 | - - - 91 | 92 | # 全球化 93 | 94 | 基于大量境外用户的诉求,2018.05 正式全球化进程,2018.05.15 Macaca Bot 发布,自动处理外语,反馈 issue 处理1000+。目前 Macaca 的用户已覆盖中亚、东南亚、澳洲、欧洲、美西 等 34 个国家地区。 95 | 96 | [世界地图截图,国家占比扇形图] 97 | -------------------------------------------------------------------------------- /archives/macaca/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 自动化测试框架设计与实践 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 28 | 29 | 30 | 31 |
32 |
33 |
34 |
35 |

自动化测试框架设计与实践

36 |
37 |
38 | 39 |
40 |
41 |
42 |

Introduce

43 |
44 |
    45 |
  • 46 |

    47 | github@xudafeng 48 |

    49 |
  • 50 |
  • 51 |

    52 | weibo@达峰的夏天 53 |

    54 |
  • 55 |
  • 56 |

    57 | twitter@2009xdf 58 |

    59 |
  • 60 |
  • 61 |

    62 | sitexdf.me 64 |

    65 |
  • 66 |
  • 67 |

    68 | companyalipay.com 69 |

    70 |
  • 71 |
72 |
73 |
77 |
78 |
79 |
80 | 81 | 82 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /archives/macaca/src/content.md: -------------------------------------------------------------------------------- 1 | # Why Automated Testing 2 | 3 | - - - 4 | 5 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f6wvexvi63j20mi0erwhe.jpg) 6 | 7 | - - - 8 | 9 | - 移动WEB演进越来越快 10 | - 版本分化越来越频繁 11 | - 混合式的技术选型 12 | - 场景越来越多且愈发复杂 13 | 14 | - - - 15 | 16 | - 测试方案和手段被透明化 17 | - 可归档、复用、易重新组织 18 | 19 | - - - 20 | 21 | ![](http://ww4.sinaimg.cn/mw1024/6d308bd9gw1etym6axay9j20fj0a2t8u.jpg) 22 | 23 | ## 更直接的收效 24 | 25 | - - - 26 | 27 | ## 性能专项的驱动器 28 | 29 | - 耐久性测试 30 | - 性能基准测试 31 | 32 | - - - 33 | 34 | ![](http://ww3.sinaimg.cn/mw1024/6d308bd9gw1ethj7x0yl0j20bj09mmx6.jpg) 35 | 36 | - HTTP 或网关层面实现 37 | - 代理端注入测试套件 [testsuit](https://github.com/startserver/startserver-testsuit) 38 | - 代理端插入测试脚本 39 | 40 | - - - 41 | 42 | [anchor#1] movie 43 | 44 | - - - 45 | 46 | # 满足需求么? 47 | 48 | - - - 49 | 50 |
×
51 | 52 | - - - 53 | 54 | # 自动化本质是软件开发 55 | 56 | - - - 57 | 58 | ![](http://ww3.sinaimg.cn/mw1024/6d308bd9gw1etpjszhnpij21670m44dz.jpg) 59 | 60 | - - - 61 | 62 | ### 环境和配置差异 63 | 64 | - 多套部署环境 65 | 66 | - - - 67 | 68 | ### 需要考虑成本 69 | 70 | - 收敛覆盖 71 | - 数据剥离 72 | - 环境自动化 73 | 74 | - - - 75 | 76 | ![closed loop](http://ww3.sinaimg.cn/mw1024/6d308bd9gw1etxqcy1riij20kz0ifdgw.jpg) 77 | 78 | - - - 79 | 80 | ![macaca](http://ww1.sinaimg.cn/mw1024/6d308bd9gw1etxidh1ef4j20if0goab9.jpg) 81 | 82 | - - - 83 | 84 | # Macaca Theory 85 | 86 | - [W3C WebDriver Wire Protocol](https://w3c.github.io/webdriver/webdriver-spec.html) 87 | - Node.js 成为首要技术选型 88 | 89 | - - - 90 | 91 | - 一体化的测试体验 92 | - 可定制化和可扩展的 API 93 | 94 | - - - 95 | 96 | ## Device Proxy Layer 97 | 98 | - - - 99 | 100 | ![](http://ww4.sinaimg.cn/large/6d308bd9gw1f6wvvncacij20t60qgwgy.jpg) 101 | 102 | - - - 103 | 104 | # Continuous Integration 105 | 106 | - - - 107 | 108 | ![master-slave](http://ww2.sinaimg.cn/large/6d308bd9jw1f6yc2z78wcj20i70famy5.jpg) 109 | 110 | - - - 111 | 112 | # macaca-master 113 | 114 | - - - 115 | 116 | - 实现进程控制 117 | - 处理数据存档,沉淀数据、报表 118 | - 实现任务调度,调度策略 119 | - Docker 一键部署 120 | 121 | - - - 122 | 123 | ![macaca-master](http://ww4.sinaimg.cn/large/6d308bd9gw1f1xw9hnl45j21kw16cnlb.jpg) 124 | 125 | - - - 126 | 127 | ![task-manager](http://ww2.sinaimg.cn/large/6d308bd9gw1f24xtghjf1j21k4148wp7.jpg) 128 | 129 | - - - 130 | 131 | # macaca-slave 132 | 133 | - - - 134 | 135 | - 配置管理 136 | - 测试框架集成 137 | - 条件负载 138 | 139 | - - - 140 | 141 | # Performance 142 | 143 | - - - 144 | 145 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f6wvijr24gj20xk0ogaev.jpg) 146 | 147 | - - - 148 | 149 | ![](http://ww4.sinaimg.cn/large/6d308bd9gw1f6xkv3gcnqj20gr09sq3j.jpg) 150 | 151 | 152 | - - - 153 | 154 | ## Native Performance 155 | 156 | - - - 157 | 158 | ![](http://ww2.sinaimg.cn/large/6d308bd9gw1f6xqdd16wtj20m209zt9r.jpg) 159 | 160 | - - - 161 | 162 | ## WEB Performance 163 | 164 | - - - 165 | 166 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f6xqdbm364j213c0mmwso.jpg) 167 | 168 | - - - 169 | 170 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f6wvik4fdvj215o0hwjwc.jpg) 171 | 172 | - - - 173 | 174 | ![](http://ww2.sinaimg.cn/large/6d308bd9gw1f6wvikfltvj210z0pe41s.jpg) 175 | 176 | - - - 177 | 178 | # Macaca Enables Us 179 | 180 | - - - 181 | 182 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f6wvnasr6vg20ze0iwdv6.gif) 183 | 184 | - - - 185 | 186 | # [Hilo](//github.com/hiloteam/Hilo) 187 | 188 | > Hilo is a Cross-end HTML5 Game development solution developed by Alibaba Group. It could help developers build HTML5 games conveniently in minutes. 189 | 190 | - - - 191 | 192 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f6wst3v45gj20jh0hgn2q.jpg) 193 | 194 | - - - 195 | 196 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f6wsibnfldg20nk0gr7kg.gif) 197 | 198 | - - - 199 | 200 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f6wsic5dmxj20rl0qqtbi.jpg) 201 | 202 | - - - 203 | 204 | # Multi-lang 205 | 206 | - - - 207 | 208 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f6w2m4drpcj20m80fnt9x.jpg) 209 | 210 | - - - 211 | 212 | # Full Browser Stack 213 | 214 | - - - 215 | 216 | ![](http://ww4.sinaimg.cn/large/6d308bd9gw1f35rq6bpq9j20kq0cbwfj.jpg) 217 | 218 | - - - 219 | 220 | # Inspector 221 | 222 | - - - 223 | 224 | ![](http://ww4.sinaimg.cn/large/6d308bd9gw1f6jev6p7eog20uo0k0npk.gif) 225 | 226 | - - - 227 | 228 | ![](http://ww2.sinaimg.cn/large/6d308bd9gw1f6jevlycr4g20uo0k0u13.gif) 229 | 230 | - - - 231 | 232 | # Multi Driver 233 | 234 | - - - 235 | 236 | ## chat with robot ... 237 | 238 | - - - 239 | 240 | ![](http://ww4.sinaimg.cn/large/6d308bd9gw1f5mo6wfwweg20i20gfnpo.gif) 241 | 242 | - - - 243 | 244 | # Open Source 245 | 246 | [alibaba/macaca](https://github.com/alibaba/macaca) 247 | 248 | - - - 249 | 250 | # Ecosystem 251 | 252 | - [Macaca Site](https://macacajs.github.io) 253 | - [Testerhome.com](https://testerhome.com/topics/node68) 254 | - Cnodejs.org 255 | 256 | - - - 257 | 258 | # THANK YOU 259 | -------------------------------------------------------------------------------- /archives/machine-learning/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/machine-learning/1.jpg -------------------------------------------------------------------------------- /archives/machine-learning/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/machine-learning/2.jpg -------------------------------------------------------------------------------- /archives/machine-learning/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/machine-learning/3.jpg -------------------------------------------------------------------------------- /archives/machine-learning/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/machine-learning/4.jpg -------------------------------------------------------------------------------- /archives/machine-learning/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/machine-learning/5.jpg -------------------------------------------------------------------------------- /archives/machine-learning/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/machine-learning/6.jpg -------------------------------------------------------------------------------- /archives/machine-learning/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/machine-learning/7.jpg -------------------------------------------------------------------------------- /archives/machine-learning/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/machine-learning/8.jpg -------------------------------------------------------------------------------- /archives/machine-learning/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Machine Learning Practice 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 28 | 29 | 30 | 31 |
32 |
33 |
34 |
35 |

Machine Learning Practice

36 |

2019.10.17

37 |
38 |
39 |

介绍

40 |
41 |
42 |

形成概念

43 |
44 |
45 |

实战

46 |
47 |
48 |
52 |
53 |
54 |
55 | 56 | 57 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /archives/machine-learning/src/content.md: -------------------------------------------------------------------------------- 1 | # 背景 2 | 3 | - - - 4 | 5 | ![](./1.jpg) 6 | 7 | - - - 8 | 9 | # 适合 AI 做的事 10 | 11 | - - - 12 | 13 | ## Regression 拟合 14 | 15 | - - - 16 | 17 | ![](./2.jpg) 18 | 19 | - - - 20 | 21 | ## Classification 分类 22 | 23 | - - - 24 | 25 | ![](./3.jpg) 26 | 27 | - - - 28 | 29 | ## Clustering 聚类 30 | 31 | - - - 32 | 33 | ![](./4.jpg) 34 | 35 | - - - 36 | 37 | ## 机器学习 38 | 39 | - - - 40 | 41 | - ### Supervised learning 42 | - ### Unsupervised Learning 43 | - ### Reinforcement Learning 44 | 45 | - - - 46 | 47 | ![](./5.jpg) 48 | 49 | - - - 50 | 51 | ![](./6.jpg) 52 | 53 | - - - 54 | 55 | ![](./7.jpg) 56 | 57 | - - - 58 | 59 | ## 问题场景 60 | 61 | - - - 62 | 63 | ## 场景1 64 | 65 | - - - 66 | 67 | ## 场景2 68 | 69 | - - - 70 | 71 | ## 不适合 AI 做的事情 72 | 73 | - - - 74 | 75 | > 需要思考超过 1s 的事情 76 | 77 | Andrew Ng 78 | 79 | - - - 80 | 81 | ![](./8.jpg) 82 | 83 | - - - 84 | 85 | ### AI 发明的时代,美领先 86 | 87 | - - - 88 | 89 | ### 大数据 + AI的应用时代,中、美领跑 90 | 91 | - - - 92 | 93 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/android/data.md: -------------------------------------------------------------------------------- 1 | # Android-数据存储 2 | 3 | - - - 4 | 5 | ## Sqlite 6 | 7 | 单进程 8 | 9 | - - - 10 | 11 | ## SharedPrefrences 12 | 13 | - 基于`XML`文件存储`key-value`键值对数据 14 | - 存储位置在`/data/data/${PACKAGE_NAME}/shared_prefs` 15 | 16 | - - - 17 | 18 | ## 文件存储 19 | 20 | - openFileOutput() 21 | - `/data/data/${PACKAGE_NAME}/files/*.*` 22 | 23 | - - - 24 | 25 | ## SDCard 26 | 27 | ```java 28 | if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { 29 | File sdCardDir = Environment.getExternalStorageDirectory(); 30 | File saveFile = new File(sdCardDir, "test.file"); 31 | FileOutputStream outStream = new FileOutputStream(saveFile); 32 | outStream.write("test".getBytes()); 33 | outStream.close(); 34 | } 35 | ``` 36 | 37 | - - - 38 | 39 | ## 权限 40 | 41 | ```xml 42 | 43 | 44 | ``` 45 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/android/env.md: -------------------------------------------------------------------------------- 1 | # Android-开发环境和工具 2 | 3 | - - - 4 | 5 | ## 开发环境介绍 6 | 7 | - [上手示例](https://github.com/app-bootstrap/android-app-bootstrap) 8 | 9 | - - - 10 | 11 | ## SDK Manager 12 | 13 | - 正式版 14 | - 预览版 15 | - 模拟器镜像 16 | - 兼容扩展库 17 | - CPU 虚拟化支持 18 | 19 | - - - 20 | 21 | ## ADB 22 | 23 | - [macaca-adb](https://github.com/macacajs/macaca-adb) 24 | 25 | - - - 26 | 27 | ```shell 28 | # install uninstall pull push shell 29 | $ adb logcat -s TAG 30 | ``` 31 | 32 | - - - 33 | 34 | ## Emulators 35 | 36 | - - - 37 | 38 | Advanced RISC Machine 7 vs X86 39 | 40 | - - - 41 | 42 | Harvard architecture 43 | 44 | von Neumann architecture 45 | 46 | - - - 47 | 48 | ```shell 49 | $ android list avd 50 | $ emulator -avd $name 51 | ``` 52 | 53 | - - - 54 | 55 | ## DDMS 56 | 57 | ```shell 58 | $ ddms 59 | ``` 60 | 61 | - - - 62 | 63 | ## CM Tools 64 | 65 | - ant, [ant-lite](https://github.com/xudafeng/ant-lite) 66 | - gradle 67 | - maven 68 | 69 | - - - 70 | 71 | ## ARM 72 | 73 | [microarchitectures](https://en.wikipedia.org/wiki/List_of_ARM_microarchitectures) 74 | 75 | - - - 76 | 77 | ## ABI 78 | 79 | **Application Binary Interface** 80 | 81 | > armeabi,armeabi-v7a,x86,mips,arm64-v8a,mips64,x86_64 82 | 83 | - - - 84 | 85 | ## NDK 86 | 87 | **Native Development Kit** 88 | 89 | > A set of tools that allow you to leverage C and C++ code in your Android apps 90 | 91 | - - - 92 | 93 | ## JNI 94 | 95 | Java Native Interface 96 | 97 | - - - 98 | 99 | ## *.jar 100 | 101 | - - - 102 | 103 | ## *.arr 104 | 105 | 包括资源文件 106 | 107 | - - - 108 | 109 | ## *.so 110 | 111 | - - - 112 | 113 | ## Remote dependencies 114 | 115 | Add the following line to your build.gradle file: 116 | 117 | ``` 118 | dependencies { 119 | compile 'com.facebook.fresco:fresco:0.10.0' 120 | } 121 | ``` 122 | 123 | ``` 124 | allprojects { 125 | repositories { 126 | jcenter() 127 | mavenCentral() 128 | } 129 | } 130 | ``` 131 | 132 | - - - 133 | 134 | ## [AndFix](https://github.com/alibaba/AndFix) 135 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/android/fundamentals.md: -------------------------------------------------------------------------------- 1 | # Android-基本组成 2 | 3 | - - - 4 | 5 | ## 基本组件 6 | 7 | - - - 8 | 9 | ## Activity 10 | 11 | 具有用户界面的单一屏幕 12 | 13 | - - - 14 | 15 | 16 | 17 | - - - 18 | 19 | ``` 20 | 启动: onCreate() —> onStart() —> onResume() 21 | 压后台: onPause() —> onStop() 22 | 重新激活: onRestart() —> onStart() —> onResume() 23 | 锁屏: onPause()、onResume() 24 | ``` 25 | 26 | - - - 27 | 28 | 29 | 30 | - - - 31 | 32 | [unlock-apk](https://github.com/macacajs/unlock-apk) 33 | 34 | - - - 35 | 36 | ### 保存 Activity 状态 37 | 38 | - onSaveInstanceState 39 | - onRestoreInstanceState 40 | 41 | - - - 42 | 43 | 44 | 45 | - - - 46 | 47 | ### Activity Launch mode 48 | 49 | - standard 50 | - singleTop 51 | - singleTask 52 | - singleInstance 53 | 54 | - - - 55 | 56 | ## Service 57 | 58 | - [services](https://developer.android.com/guide/components/services.html) 59 | - 不提供用户界面 60 | - 与Activity都运行在UI主线程 61 | 62 | - - - 63 | 64 | 65 | 66 | - - - 67 | 68 | ## Broadcast Receiver 69 | 70 | - - - 71 | 72 | ## Content Provider 73 | 74 | - 多进程 75 | - 对外提供数据 76 | - 例如联系人,短信 77 | 78 | - - - 79 | 80 | ## Intent 启动组件 81 | 82 | - - - 83 | 84 | ## Intent传递数据(thisActivity) 85 | 86 | ```java 87 | Intent intent = new Intent(); 88 | intent.setClass(thisActivity,thatActivity.class); 89 | intent.putExtra(key, value); 90 | startActivity(intent); 91 | ``` 92 | 93 | - - - 94 | 95 | ## Intent获取数据(thatActivity) 96 | 97 | ```java 98 | Intent intent = getIntent(); 99 | value = intent.getStringExtra(key); 100 | ``` 101 | 102 | - - - 103 | 104 | # AndroidManifest 105 | 106 | - 任何用户权限,如互联网访问权限或对用户联系人的读取权限 107 | - 应用使用的 API,声明应用所需的最低 API 108 | - 声明应用使用或需要的硬件和软件功能,如相机、蓝牙服务或多点触摸屏幕 109 | - 应用需要链接的 API 库 110 | 111 | - - - 112 | 113 | # 声明组件 114 | 115 | - Activity 的 元素 116 | - 服务的 元素 117 | - 广播接收器的 元素 118 | - 内容提供程序的 元素 119 | 120 | - - - 121 | 122 | # 应用资源 123 | 124 | - `res/drawable/`目录 125 | - i18n `res/values-fr/` 126 | 127 | - - - 128 | 129 | # 文件系统 130 | 131 | ``` 132 | /sdcard SD 卡 FAT32 文件系统挂载目录 133 | /etc => /system/etc 134 | /system/lib 绝大部分的系统 so 135 | /system/app 应用目录 136 | /system/framework 核心程序或 Java 类库 137 | /data/local/tmp 临时目录 138 | /data/data 每个软件的包名来命名,配置和存储文件 139 | ``` 140 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/android/index.md: -------------------------------------------------------------------------------- 1 | Android篇 2 | 3 | - [Android-开发环境和工具](#inner) 4 | - [Android-编程语言](#inner) 5 | - [Android-基本组成](#inner) 6 | - [Android-应用布局](#inner) 7 | - [Android-视图控制](#inner) 8 | - [Android-网络编程](#inner) 9 | - [Android-数据存储](#inner) 10 | - [Android-设计模式](#inner) 11 | - [Android-测试](#inner) 12 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/android/lang.md: -------------------------------------------------------------------------------- 1 | # Android-编程语言 2 | 3 | - [C++, Objective-C, Java, C#](http://hyperpolyglot.org/cpp) 4 | 5 | - - - 6 | 7 | # JAVA 8 | 9 | - - - 10 | 11 | ### Sun vs MS 12 | 13 | open vs close 14 | 15 | - - - 16 | 17 | ### Oracle and Sun Microsystems 18 | 19 | Since Oracle acquired Sun in 2010 20 | 21 | - - - 22 | 23 | ## [java inheritance](https://xudafeng.github.io/java_inheritance) 24 | 25 | - - - 26 | 27 | ### JVM 28 | 29 | resolve `.class` 30 | 31 | - - - 32 | 33 | - inherit: `java.lang.Object` 34 | - abstract: 派生子类,不能用它来创建对象 35 | - final: 创建对象,不能被继承 36 | - package: 类和接口的集合 37 | 38 | - - - 39 | 40 | - polymorphism 41 | - interface 42 | - overloaded 43 | - override 44 | 45 | - - - 46 | 47 | ## Swift? 48 | 49 | [SwiftAndroid](https://github.com/SwiftAndroid) 50 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/android/layout.md: -------------------------------------------------------------------------------- 1 | # Android-应用布局 2 | 3 | 布局可相互嵌套 4 | 5 | - - - 6 | 7 | 8 | 9 | - - - 10 | 11 | ## FrameLayout(框架布局) 12 | 13 | ```java 14 | 基于左上角、重叠 15 | android:layout_margin 16 | android:layout_gravity 17 | ``` 18 | 19 | - - - 20 | 21 | ## LinearLayout(线性布局) 22 | 23 | ```java 24 | android:orientation="horizontal|vertical" 25 | ``` 26 | 27 | - - - 28 | 29 | ## AbsoluteLayout(绝对布局) 30 | 31 | 绝对定位 32 | 33 | - - - 34 | 35 | ## RelativeLayout(相对布局) 36 | 37 | ```java 38 | 相对于某一个元素 39 | android:layout_below 40 | android:layout_toLeftOf 41 | 42 | 相对于父元素的地方 43 | android:layout_alignParentLeft 44 | android:layout_alignParentRigh 45 | ``` 46 | 47 | - - - 48 | 49 | ## TableLayout(表格布局) 50 | 51 | 若干TableRow 52 | 53 | - - - 54 | 55 | ## GridLayout(网格布局) 56 | 57 | - - - 58 | 59 | ## Sample 60 | 61 | [iscanner_android](https://github.com/iscanner/iscanner_android) 62 | 63 | - - - 64 | 65 | ## Supporting Different Devices 66 | 67 | - Different Languages 68 | - Different Screens 69 | - Different Platform Versions 70 | 71 | - - - 72 | 73 | 74 | 75 | - - - 76 | 77 | 78 | 79 | - - - 80 | 81 | | index | px | size | name | dpi | 82 | | ----- | -------- | ------- | --------------- | ------ | 83 | | xxh | 1280×960 | 3.5英寸 | drawable-xxhdpi | 480dpi | 84 | | xh | 960×640 | 3.5英寸 | drawable-xhdpi | 320dpi | 85 | | h | 640×480 | 3.5英寸 | drawable-hdpi | 240dpi | 86 | | m | 480×320 | 3.5英寸 | drawable-mdpi | 160dpi | 87 | | l | 320×240 | 3.5英寸 | drawable-ldpi | 120dpi | 88 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/android/net.md: -------------------------------------------------------------------------------- 1 | # Android-网络编程 2 | 3 | - - - 4 | 5 | ## 线程 6 | 7 | UI主线程和工作线程 8 | 9 | - - - 10 | 11 | ## Socket 12 | 13 | ```java 14 | new Socket(ip, port); 15 | 16 | Socket.getOutputStream(); 17 | 18 | Socket.getInputStream(); 19 | 20 | ``` 21 | 22 | - - - 23 | 24 | ## Make HTTP 25 | 26 | - HttpURLConnection 27 | - DefaultHttpClient 28 | - WebView 29 | 30 | - - - 31 | 32 | ## android.webkit.WebView 33 | 34 | - addJavascriptInterface 35 | - [WebViewJsBridge](https://github.com/app-bootstrap/WebViewJsBridge) 36 | - onPageFinished 37 | - shouldOverrideUrlLoading 38 | 39 | - - - 40 | 41 | ## [feedit_android sample](https://github.com/feedit/feedit_android) 42 | 43 | - - - 44 | 45 | ## 线程使用原则 46 | 47 | - 网络操作使用非UI线程(工作线程),主线程会阻塞,导致无响应 48 | - 工作线程不允许操作UI元素 49 | - 操作UI元素的API都是线程不安全的,只能在一个线程中调用以保证线程安全 50 | 51 | - - - 52 | 53 | ```java 54 | class JsObject { 55 | @JavascriptInterface 56 | public String toString() { return "injectedObject"; } 57 | } 58 | webView.addJavascriptInterface(new JsObject(), "injectedObject"); 59 | webView.loadData("", "text/html", null); 60 | webView.loadUrl("javascript:alert(injectedObject.toString())"); 61 | ``` 62 | 63 | - - - 64 | 65 | ## Android Manifest file: 66 | 67 | ``` 68 | 69 | 70 | ``` 71 | 72 | - - - 73 | 74 | ## Android Cookie 75 | 76 | - - - 77 | 78 | ## Android Session 79 | 80 | - - - 81 | 82 | ## React Native 83 | 84 | [autoresponsive_react_native_sample](https://github.com/xudafeng/autoresponsive_react_native_sample) 85 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/android/pattern.md: -------------------------------------------------------------------------------- 1 | # Android-设计模式 2 | 3 | - - - 4 | 5 | ## MVC 6 | 7 | - - - 8 | 9 | ## MVVM 10 | 11 | - - - 12 | 13 | ## MVP 14 | 15 | - - - 16 | 17 | [sample](https://github.com/app-bootstrap/android-app-bootstrap) 18 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/android/test.md: -------------------------------------------------------------------------------- 1 | # Android-测试 2 | 3 | - AndroidJUnitRunner: JUnit 4-compatible test runner for Android 4 | - Espresso: UI testing framework; suitable for functional UI testing within an app 5 | - UI Automator: UI testing framework; suitable for cross-app functional UI testing across system and installed apps 6 | 7 | - - - 8 | 9 | [Testing Support Library](http://developer.android.com/intl/zh-cn/tools/testing-support-library/index.html) 10 | 11 | `/android-sdks/extras/android/m2repository/com/android/support/test` 12 | 13 | - - - 14 | 15 | ## UIAutomator 16 | 17 | [uiautomator](https://xudafeng.github.io/java_inheritance/uiautomator.html) 18 | 19 | - - - 20 | 21 | ## Macaca 22 | 23 | - [macaca-android](https://github.com/macacajs/macaca-android) 24 | - [uiautomator-client](https://github.com/macacajs/uiautomator-client) 25 | - [macaca-chromedriver](https://github.com/macacajs/macaca-chromedriver) 26 | - [android-performance](https://github.com/macacajs/android-performance) 27 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/android/view.md: -------------------------------------------------------------------------------- 1 | # Android-视图控制 2 | 3 | - - - 4 | 5 | ## [gestures](https://material.google.com/patterns/gestures.html) 6 | 7 | - - - 8 | 9 | ## Types of activities 10 | 11 | - Scroll 12 | - Reveal upon scroll 13 | - Pan 14 | - Dismiss 15 | - Swipe to refresh 16 | - Edge swipe 17 | - Paging swipe 18 | - Overscroll collapse 19 | - Menu open 20 | - Tilt 21 | 22 | - - - 23 | 24 | ## OOM 25 | 26 | - 主动释放Bitmap的内存 27 | - Cache 28 | - AsyncTask<> 29 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/index.md: -------------------------------------------------------------------------------- 1 | ## 新手误区 2 | 3 | - 学习客户端开发与学习一门或者两门语言是两码事 4 | - 长期的实践是完全掌握客户端开发的唯一途径 5 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/ios/data.md: -------------------------------------------------------------------------------- 1 | # iOS-数据存储 2 | 3 | - - - 4 | 5 | ``` 6 | UserDefaut 存储简单的数据结构 7 | FileManager 存储复杂量级较大的文件 8 | Sqilte 依赖 libsqlite3.dylib 9 | CoreData 数据变更管理、对象存储、对象读取 10 | ``` 11 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/ios/env.md: -------------------------------------------------------------------------------- 1 | # iOS-开发环境和工具 2 | 3 | - - - 4 | 5 | ## 开发环境介绍 6 | 7 | - Xcode 介绍 8 | - 使用模拟器 9 | - [iOS Developer Library](https://developer.apple.com/library/ios) 10 | - [上手示例](https://github.com/app-bootstrap/ios-app-bootstrap) 11 | 12 | - - - 13 | 14 | ```shell 15 | # open normal workspace 16 | $ open -a Xcode 17 | # open pod project workspace 18 | $ open *.xcworkspace 19 | ``` 20 | 21 | - - - 22 | 23 | ## xcodebuild 24 | 25 | ```shell 26 | # 查看xcode的版本号和build版本 27 | $ xcodebuild -version 28 | # 查看系统的所有SDK 29 | $ xcodebuild -showsdks 30 | # 显示工程信息 31 | $ xcodebuild -list 32 | # 构建目标工程 33 | $ xcodebuild -sdk iphonesimulator9.2 34 | # 构建运行 35 | $ xcodebuild -workspace '' -scheme '' -destination id='' build 36 | ``` 37 | 38 | - - - 39 | 40 | ## xcrun 41 | 42 | ```shell 43 | # 查看模拟器列表 44 | $ xcrun simctl list 45 | # 清除模拟器 46 | $ xcrun simctl erase '' 47 | ``` 48 | 49 | - - - 50 | 51 | ## plist 52 | 53 | ```shell 54 | $ /usr/libexec/PlistBuddy -c "print CFBundleShortVersionString" 55 | ``` 56 | 57 | - - - 58 | 59 | ## launchctl 60 | 61 | ```shell 62 | # list service 63 | $ launchctl list | grep com.apple.iphonesimulator 64 | # kill service 65 | $ launchctl stop com.apple.iphonesimulator.xxx 66 | # yet another kill method 67 | $ pkill -9 -f "Simulator" 68 | ``` 69 | 70 | - - - 71 | 72 | ## CocoaPods 73 | 74 | ```shell 75 | # 安装CocoaPods 76 | $ sudo gem install cocoapods 77 | # 安装依赖 78 | $ pod install --verbose --no-repo-update 79 | # 源变更 80 | $ gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/ 81 | $ gem sources -l 82 | ``` 83 | 84 | - - - 85 | 86 | ## Carthage 87 | 88 | ```shell 89 | # 安装 90 | $ brew install carthage 91 | # 更新依赖 92 | $ carthage update --platform iOS --verbose 93 | ``` 94 | 95 | - - - 96 | 97 | ## Framework 98 | 99 | [Logger.swift sample](https://github.com/app-bootstrap/Logger.swift) 100 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/ios/event.md: -------------------------------------------------------------------------------- 1 | # iOS-事件手势动画 2 | 3 | - - - 4 | 5 | 6 | 7 | - - - 8 | 9 | ## GestureRecognizer 10 | 11 | - - - 12 | 13 | ## CABasicAnimation 14 | 15 | Responder Chain 16 | 17 | - - - 18 | 19 | 20 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/ios/index.md: -------------------------------------------------------------------------------- 1 | iOS篇 2 | 3 | - [iOS-开发环境和工具](#inner) 4 | - [iOS-编程语言](#inner) 5 | - [iOS-UIKit](#inner) 6 | - [iOS-视图控制](#inner) 7 | - [iOS-应用布局](#inner) 8 | - [iOS-网络编程](#inner) 9 | - [iOS-事件手势动画](#inner) 10 | - [iOS-数据存储](#inner) 11 | - [iOS-内存管理](#inner) 12 | - [iOS-设计模式](#inner) 13 | - [iOS-测试](#inner) 14 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/ios/layout.md: -------------------------------------------------------------------------------- 1 | # iOS-应用布局 2 | 3 | - 动态创建: 自由灵活,代码管理方便(适用于大型项目) 4 | - `Xibs`, `Storyborad` 更易适应更多屏幕 5 | 6 | - - - 7 | 8 | ## iOS布局-动态创建 9 | 10 | - 任何视图控件都是继承自 UIView 11 | - 控制视图布局的属性`frame`, `center`, `bounds` 12 | - `frame`:在父view坐标系统中的位置和大小,参照点是父亲的坐标系统 13 | - `center`:控制位置中心点 14 | - `bounds`:在本身坐标系统中的位置和大小,参照点是本身坐标系统 15 | - Auto Layout `NSLayoutConstraint` 界面布局 16 | 17 | - - - 18 | 19 | ```objc 20 | - (CGRect) frame { 21 | return CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, self.frame.size.height); 22 | } 23 | - (CGRect) bounds { 24 | return CGRectMake(0, 0, self.frame.size.width, self.frame.size.height); 25 | } 26 | ``` 27 | 28 | - - - 29 | 30 | ## iOS布局-Xibs 31 | 32 | - `xib` 的本质就是 `xml` 33 | - 一个 `xib` 文件对应一个 `ViewController` 34 | - `自定义view` 可以使用单个 `xib` 并从 `main bundle` 进行动态加载的方式来载入 35 | - 可以在代码中被动态覆盖 36 | - 必要地,较少地使用 `IBOutlet` 与 `IBAction` 37 | 38 | - - - 39 | 40 | ## iOS布局-storyboard 41 | 42 | - 一组 `ViewController` 对应的 `xib` 集合 43 | - 拖拽产生的控件都是绝对定位的 44 | 45 | - - - 46 | 47 | ## iOS布局-AutoLayout 48 | 49 | - NSLayoutConstraint 50 | - [Masonry](https://github.com/SnapKit/Masonry) 51 | - [autoresponsive](https://xudafeng.github.io/autoresponsive-react) 52 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/ios/memory.md: -------------------------------------------------------------------------------- 1 | # iOS-内存管理 2 | 3 | - - - 4 | 5 | ## Automatic Reference Counting 6 | 7 | ARC并不是GC,只是一种代码静态分析工具 8 | 9 | - - - 10 | 11 | ## GCD 12 | 13 | Grand Central Dispatch 14 | 15 | - 可以让程序长时间压后台 16 | 17 | - - - 18 | 19 | ```objc 20 | // 后台执行: 21 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 22 | // something 23 | }); 24 | 25 | // 主线程执行: 26 | dispatch_async(dispatch_get_main_queue(), ^{ 27 | // something 28 | }); 29 | 30 | // 一次性执行: 31 | static dispatch_once_t onceToken; 32 | dispatch_once(&onceToken, ^{ 33 | // code to be executed once 34 | }); 35 | 36 | // 延迟2秒执行: 37 | double delayInSeconds = 2.0; 38 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC); 39 | dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ 40 | // code to be executed on the main queue after delay 41 | }); 42 | 43 | // 自定义dispatch_queue_t 44 | dispatch_queue_t urls_queue = dispatch_queue_create("blog.devtang.com", NULL); 45 | dispatch_async(urls_queue, ^{ 46 | // your code 47 | }); 48 | dispatch_release(urls_queue); 49 | 50 | // 合并汇总结果 51 | dispatch_group_t group = dispatch_group_create(); 52 | dispatch_group_async(group, dispatch_get_global_queue(0,0), ^{ 53 | // 并行执行的线程一 54 | }); 55 | dispatch_group_async(group, dispatch_get_global_queue(0,0), ^{ 56 | // 并行执行的线程二 57 | }); 58 | dispatch_group_notify(group, dispatch_get_global_queue(0,0), ^{ 59 | // 汇总结果 60 | }); 61 | ``` 62 | 63 | - - - 64 | 65 | ## GC 66 | 67 | Garbage collection 68 | 69 | Apple的移动终端中,是不支持GC的,Mac桌面系统开发中是支持的,移动终端主要靠ARC 70 | 71 | - - - 72 | 73 | ## 自动引用计数 ARC 74 | 75 | 自动引用计数不再需要调用retain、release、autorelease 76 | 77 | - - - 78 | 79 | - alloc, retain, copy 80 | - release, autorelease 81 | - 循环引用,内存泄露 82 | - 错误释放内存,引起crash 83 | 84 | 85 | - - - 86 | 87 | ## 循环引用 88 | 89 | - 在合理的位置主动断开一个引用,对象回收 90 | - 使用弱引用的方法 91 | 92 | - - - 93 | 94 | ## 分清strong,weak 95 | 96 | 97 | ``` 98 | strong修饰的指针变量指向对象时,当指针指向新值或者指针不复存在,相关联的对象就会自动释放 99 | weak修饰的指针变量指向对象,当对象的拥有者指向新值或者不存在时weak修饰的指针会自动置为nil 100 | ``` 101 | 102 | - - - 103 | 104 | ## block 105 | 106 | ```objc 107 | //脱字符(^)是块的语法标记 108 | void (^printBlock)(NSString *x); 109 | printBlock = ^(NSString* str) { 110 | NSLog(@"print:%@", str); 111 | }; 112 | printBlock(@"hello world!"); 113 | ``` 114 | 115 | - - - 116 | 117 | ## 优化点 118 | 119 | UI要在主线程刷新 120 | 121 | - - - 122 | 123 | - 静态方法(类方法)创建一个对象时,对象已被放入自动释放池 124 | - NSArray 和 NSMutableArray,后者可以添加,动态申请新的内存空间 125 | - import不会引起交叉编译,确保头文件只会被导入一次 126 | - 不要使用太复杂的XIB/Storyboard,避免一次载入消耗过多 127 | - UITableViewCells、UICollectionViewCells、UITableViewHeaderFooterViews设置正确的reuseIdentifier 128 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/ios/net.md: -------------------------------------------------------------------------------- 1 | # iOS-网络编程 2 | 3 | - - - 4 | 5 | ## WEB 6 | 7 | - 这里的WEB指[W3C](https://www.w3.org/TR/)标准的广义WEB 8 | 9 | - - - 10 | 11 | ## Make HTTP requests 12 | 13 | - NSURL 14 | - NSURLRequest 15 | - NSURLConnection 16 | - [AFNetworking](https://github.com/AFNetworking/AFNetworking) 17 | 18 | - - - 19 | 20 | ## [SDWebImage](https://github.com/rs/SDWebImage) 21 | 22 | - 缓存,性能 23 | - 支持GIF,WebP 24 | - 不要在主线程请求网络数据 25 | 26 | - - - 27 | 28 | ## Webview 29 | 30 | - [swifty-webview](https://github.com/app-bootstrap/swifty-webview) 31 | - WKWebview 32 | 33 | - - - 34 | 35 | ## Render Extension 36 | 37 | - React Native 38 | - Samurai Native 39 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/ios/pattern.md: -------------------------------------------------------------------------------- 1 | # iOS-设计模式 2 | 3 | [MVC](https://developer.apple.com/library/ios/documentation/General/Conceptual/DevPedia-CocoaCore/MVC.html), MVP, [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel) 4 | 5 | - - - 6 | 7 | ## Observer 8 | 9 | - - - 10 | 11 | ### NSNotificationCenter 12 | 13 | ```swift 14 | let notificationCenter = NSNotificationCenter.defaultCenter() 15 | let operationQueue = NSOperationQueue.mainQueue() 16 | let applicationDidEnterBackgroundObserver = notificationCenter.addObserverForName(UIApplicationDidEnterBackgroundNotification, object: nil, queue: operationQueue, usingBlock: { 17 | (notification: NSNotification!) in self.logger.info("run in background") 18 | }) 19 | //notificationCenter.removeObserver(applicationDidEnterBackgroundObserver) 20 | ``` 21 | 22 | - - - 23 | 24 | ## MVC 25 | 26 | - - - 27 | 28 | ### MVC 29 | 30 | 31 | 32 | - - - 33 | 34 | ### Strong Coupling 35 | 36 | 37 | 38 | - - - 39 | 40 | ## MV(*) 41 | 42 | - - - 43 | 44 | ## MVP 45 | 46 | Presenter(Supervising Controller) 47 | 48 | 49 | 50 | - - - 51 | 52 | ## MVVM 53 | 54 | ViewController ≈ View 55 | 56 | View and Model has on Coupling 57 | 58 | - - - 59 | 60 | ## MVVM 61 | 62 | 63 | 64 | - - - 65 | 66 | ## Data Binding 67 | 68 | Key-Value Observing 69 | 70 | [Bond-swift](https://github.com/SwiftBond/Bond) 71 | 72 | - - - 73 | 74 | ### Functional Programming 75 | 76 | [RxSwift](https://github.com/ReactiveX/RxSwift) 77 | 78 | [ReactiveCocoa](https://github.com/ReactiveCocoa/ReactiveCocoa) 79 | 80 | - - - 81 | 82 | 83 | 84 | - - - 85 | 86 | 87 | 88 | - - - 89 | 90 | 91 | 92 | - - - 93 | 94 | ## VIPER 95 | 96 | objc.io/issues#13 97 | 98 | - [Generamba](https://github.com/rambler-ios/Generamba) 99 | - [viper-to-be-or-not-to-be](https://swifting.io/blog/2016/03/07/8-viper-to-be-or-not-to-be/) 100 | 101 | - - - 102 | 103 | [issue-13-viper](https://github.com/objcio/issue-13-viper) 104 | 105 | 106 | 107 | - - - 108 | 109 | Thx 2 [ios-architecture-patterns](https://medium.com/ios-os-x-development/ios-architecture-patterns-ecba4c38de52) 110 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/ios/test.md: -------------------------------------------------------------------------------- 1 | # iOS-测试 2 | 3 | - - - 4 | 5 | ## Instruments 6 | 7 | - - - 8 | 9 | ## XCTest 10 | 11 | - Unit Testing 12 | - UnitTest UI 13 | 14 | - - - 15 | 16 | ## [Macaca](https://macacajs.github.io/macaca) 17 | 18 | - [macaca-ios](https://github.com/macacajs/macaca-ios) 19 | - [XCTestWD](https://github.com/macacajs/XCTestWD) 20 | - [ios-simulator](https://github.com/macacajs/ios-simulator) 21 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/ios/uikit.md: -------------------------------------------------------------------------------- 1 | # iOS-UIKit 2 | 3 | - - - 4 | 5 | ## Cocoa 6 | 7 | - Cocoa Touch 8 | - [UIKit_Framework_Reference](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIKit_Framework/index.html) 9 | 10 | - - - 11 | 12 | ## UIKit类继承 13 | 14 | 15 | 16 | - - - 17 | 18 | 19 | 20 | [Objc Inheritance](http://xudafeng.github.io/objc_inheritance/tree.html) 21 | 22 | - - - 23 | 24 | ## NSObject 25 | 26 | - UIColor,UIFont 27 | - UIBarItem 28 | - UIBarButtonItem, UITabBarItem 29 | - UIDevice 30 | - UIEvent 31 | - UIFont 32 | - UIGestureRecognizer 33 | - UIImage 34 | - UINavigationItem 35 | - UINib 36 | - UIResponder 37 | - UIApplication, UIView, UIViewController 38 | - UIScreen 39 | - UITouch 40 | - ... 41 | -------------------------------------------------------------------------------- /archives/native-in-practice/src/ios/view.md: -------------------------------------------------------------------------------- 1 | # iOS-视图控制 2 | 3 | - 视图也是容器 4 | - 子视图遮盖了父视图内容 5 | - 同级后面的视图遮盖前面视图 6 | - 事件层层透传直到应用对象 7 | - GPU 渲染 Tile-Based 机制 8 | 9 | - - - 10 | 11 | 0. View Management 12 | 0. Data Marshalling 13 | 0. User Interactions 14 | 0. Resource Management 15 | 0. Adaptivity 16 | 17 | - - - 18 | 19 | ## OSX(MacOS) vs iOS 20 | 21 | - iOS 应用程序只有一个窗口 22 | - iOS 通常不设关闭框,淡化常规窗口操作 23 | - NSWindow 的父类是 NSResponder, UIWindow 的父类是 UIView 24 | - iOS 通常默认是满屏 25 | - iOS 不应创建额外的窗口 26 | 27 | - - - 28 | 29 | - UIView 包含了一个 CALayer 30 | - CALayer 基于 QuartzCore 库 31 | 32 | - - - 33 | 34 | ## UIView 35 | 36 | - UIWindow 37 | - UIScrollView 38 | - UITextView 39 | - UITableView 40 | - UILabel 41 | - UIControl 42 | - UIButton 43 | - UITextField 44 | - UIImageView 45 | - UIWebView 46 | - UINavigationBar 47 | - ... 48 | 49 | - - - 50 | 51 | ## UIViewController 52 | 53 | [The Role of View Controllers](https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/index.html) 54 | 55 | - ViewController 56 | - UITableViewController 57 | - UITabBarController 58 | - UINavigationController 59 | - ... 60 | 61 | - - - 62 | 63 | ```objc 64 | - [ViewController initWithNibName:bundle:]; 65 | - [ViewController init]; 66 | - [ViewController loadView]; 67 | - [ViewController viewDidLoad]; 68 | - [ViewController viewWillDisappear:]; 69 | - [ViewController viewWillAppear:]; 70 | - [ViewController viewDidAppear:]; 71 | - [ViewController viewDidDisappear:]; 72 | ``` 73 | 74 | - - - 75 | 76 | ## Navigation Stack 77 | 78 | - pushViewController 79 | - pushViewController 80 | - popViewController 81 | - popToViewController 82 | - popToRootViewController 83 | - ... 84 | 85 | - - - 86 | 87 | 88 | 89 | - - - 90 | 91 | ## UIViewController LifeCircle 92 | 93 | - - - 94 | 95 | ## 视图控制原则 96 | 97 | - 尽所能使用属性方法改变视图,而非定制新视图 98 | - 滚动会导致数个视图在短时间内更新 99 | - 控制内存用量,例如 UITableViewCell 复用 100 | 101 | [iscanner_ios](https://github.com/iscanner/iscanner_ios) 102 | 103 | - - - 104 | 105 | ## HomeWork 106 | 107 | - [Holland](https://github.com/xudafeng/Holland) 108 | -------------------------------------------------------------------------------- /archives/ningjs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Automation Facing The Future 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 28 | 29 | 30 | 31 |
32 |
33 |
34 |
35 |

Automation Facing The Future

36 |
37 |
38 | 39 |
40 |
41 |
42 |

Introduce

43 |
44 |
    45 |
  • 46 |

    47 | github@xudafeng 48 |

    49 |
  • 50 |
  • 51 |

    52 | weibo@达峰的夏天 53 |

    54 |
  • 55 |
  • 56 |

    57 | twitter@2009xdf 58 |

    59 |
  • 60 |
  • 61 |

    62 | sitexdf.me 64 |

    65 |
  • 66 |
  • 67 |

    68 | companyAlipay Co. 69 |

    70 |
  • 71 |
72 |
73 |
77 |
78 |
79 |

all passing (45min)

80 |

2016.09.04 @ NingJS

81 |
82 |
83 |
84 | 85 | 86 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /archives/ningjs/src/content.md: -------------------------------------------------------------------------------- 1 | # Why Automated Testing 2 | 3 | - - - 4 | 5 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f6wvexvi63j20mi0erwhe.jpg) 6 | 7 | - - - 8 | 9 | - WEB工程化演进越来越快 10 | - 版本分化越来越频繁 11 | - 技术选型趋向于混合 12 | - 场景越来越多且愈发复杂 13 | 14 | - - - 15 | 16 | - 测试方案和手段被透明化 17 | - 可归档、复用、重新组织 18 | 19 | - - - 20 | 21 | ![](http://ww4.sinaimg.cn/mw1024/6d308bd9gw1etym6axay9j20fj0a2t8u.jpg) 22 | 23 | - - - 24 | 25 | ![](http://ww3.sinaimg.cn/mw1024/6d308bd9gw1ethj7x0yl0j20bj09mmx6.jpg) 26 | 27 | inject [testsuit](https://github.com/startserver/startserver-testsuit) 28 | 29 | - - - 30 | 31 | [anchor#1] movie 32 | 33 | - - - 34 | 35 | # Meet our needs? 36 | 37 | - - - 38 | 39 | - Runtime 40 | - Environment Differences 41 | - Data Source 42 | - Statistical Indicator 43 | 44 | - - - 45 | 46 | ## Automation ≈ Software Development 47 | 48 | - - - 49 | 50 | # ROI 51 | 52 | - - - 53 | 54 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f2xmott0jyj20fv0dujs5.jpg) 55 | 56 | - - - 57 | 58 | ![closed loop](http://ww3.sinaimg.cn/mw1024/6d308bd9gw1etxqcy1riij20kz0ifdgw.jpg) 59 | 60 | - - - 61 | 62 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f7g8rllsuuj20ok0blmxo.jpg) 63 | 64 | - - - 65 | 66 | # Macaca Theory 67 | 68 | - [W3C WebDriver Wire Protocol](//w3c.github.io/webdriver/webdriver-spec.html) 69 | - Based on Node.js 70 | 71 | - - - 72 | 73 | # Device Proxy Layer 74 | 75 | - - - 76 | 77 | 78 | 79 | - - - 80 | 81 | ![](http://ww4.sinaimg.cn/large/6d308bd9gw1f35rq6bpq9j20kq0cbwfj.jpg) 82 | 83 | Full Runtime Stack 84 | 85 | - - - 86 | 87 | # Continuous Integration 88 | 89 | - - - 90 | 91 | - GitLab-CI 92 | - Jenkins 93 | - Gerrit 94 | - Travis-CI 95 | - **[Reliable](https://github.com/reliablejs)** 96 | 97 | - - - 98 | 99 | ![master-slave](http://ww2.sinaimg.cn/large/6d308bd9jw1f6yc2z78wcj20i70famy5.jpg) 100 | 101 | - - - 102 | 103 | 104 | 105 | - - - 106 | 107 | # Performance Benchmark 108 | 109 | ### Driven By The Automation 110 | 111 | - - - 112 | 113 | 114 | 115 | - - - 116 | 117 | ![](http://ww4.sinaimg.cn/large/6d308bd9gw1f6xkv3gcnqj20gr09sq3j.jpg) 118 | 119 | - - - 120 | 121 | ![](http://ww2.sinaimg.cn/large/6d308bd9gw1f6xqdd16wtj20m209zt9r.jpg) 122 | 123 | - - - 124 | 125 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f6wvik4fdvj215o0hwjwc.jpg) 126 | 127 | - - - 128 | 129 | 130 | 131 | - - - 132 | 133 | # Macaca Enables Us 134 | 135 | - - - 136 | 137 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f6wvnasr6vg20ze0iwdv6.gif) 138 | 139 | - - - 140 | 141 | # Webdriver Cloud 142 | 143 | - [F2ETest](https://github.com/alibaba/f2etest) 144 | 145 | - - - 146 | 147 | # [React Native Testing](https://testerhome.com/topics/4922) 148 | 149 | - - - 150 | 151 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f3ymytc3mzj21kw0xpjx1.jpg) 152 | 153 | - - - 154 | 155 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f7g9kwx9igj20ai02czkb.jpg) 156 | 157 | - - - 158 | 159 | # Game Testing 160 | 161 | - - - 162 | 163 | # [Hilo](//github.com/hiloteam/Hilo) 164 | 165 | > Hilo is a Cross-end HTML5 Game development solution developed by Alibaba Group. It could help developers build HTML5 games conveniently in minutes. 166 | 167 | - - - 168 | 169 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f6wst3v45gj20jh0hgn2q.jpg) 170 | 171 | - - - 172 | 173 | 174 | 175 | - - - 176 | 177 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f6wsibnfldg20nk0gr7kg.gif) 178 | 179 | - - - 180 | 181 | # Multi Driver 182 | 183 | - - - 184 | 185 | ![](http://ww4.sinaimg.cn/large/6d308bd9gw1f5mo6wfwweg20i20gfnpo.gif) 186 | 187 | chat with robot ... 188 | 189 | - - - 190 | 191 | # Multi-lang 192 | 193 | - - - 194 | 195 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f6w2m4drpcj20m80fnt9x.jpg) 196 | 197 | - - - 198 | 199 | # Inspector 200 | 201 | - - - 202 | 203 | ![](http://ww4.sinaimg.cn/large/7dfcf2f7gw1f7bwlhpakwg20s40kge3k.gif) 204 | 205 | - - - 206 | 207 | ![](http://ww4.sinaimg.cn/large/7dfcf2f7gw1f7bwp1mgiyg20s40kg7wh.gif) 208 | 209 | - - - 210 | 211 | # Issues 212 | 213 | - Windows Compatibility 214 | - [Android unicode UTF-7 input](https://github.com/macacajs/android-unicode) 215 | - Android Arm7 Emulator VS raspberrypi 216 | - iOS Virtualization 217 | 218 | - - - 219 | 220 | # Improvement Plan 221 | 222 | - - - 223 | 224 | # Cross End Recorder 225 | 226 | - - - 227 | 228 | ## Desktop Driver 229 | 230 | - Apple Script 231 | - Robotjs 232 | 233 | - - - 234 | 235 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f7ea2aitt3g20w00k0he2.gif) 236 | 237 | - - - 238 | 239 | # Open Source 240 | 241 | - [macacajs.github.io](https://macacajs.github.io) 242 | - [github.com/alibaba/macaca](https://github.com/alibaba/macaca) 243 | 244 | - - - 245 | 246 | # Collaborators 247 | 248 | 249 | 250 | - - - 251 | 252 | ![](http://ww1.sinaimg.cn/large/6d308bd9gw1f7gaxu57brj20l20ei0tt.jpg) 253 | 254 | - - - 255 | 256 | # Community Ecosystem 257 | 258 | - [yunqi.aliyun.com](https://yunqi.aliyun.com/2016/hangzhou/schedule) 259 | - [Testerhome.com](https://testerhome.com/topics/node68) 260 | - Cnodejs.org 261 | -------------------------------------------------------------------------------- /archives/nodejs-primer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Node.js Primer 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 30 | 31 | 32 | 33 | 34 |
35 |
36 |
40 |
41 |
42 |
43 | 44 | 45 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /archives/pillow/README.md: -------------------------------------------------------------------------------- 1 | pillow 2 | -------------------------------------------------------------------------------- /archives/pillow/images/2v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/images/2v1.png -------------------------------------------------------------------------------- /archives/pillow/images/2v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/images/2v2.png -------------------------------------------------------------------------------- /archives/pillow/images/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/images/b.png -------------------------------------------------------------------------------- /archives/pillow/images/bird.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/images/bird.png -------------------------------------------------------------------------------- /archives/pillow/images/bunny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/images/bunny.png -------------------------------------------------------------------------------- /archives/pillow/images/earth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/images/earth.png -------------------------------------------------------------------------------- /archives/pillow/images/f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/images/f.png -------------------------------------------------------------------------------- /archives/pillow/images/mario.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/images/mario.png -------------------------------------------------------------------------------- /archives/pillow/images/phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/images/phone.png -------------------------------------------------------------------------------- /archives/pillow/images/pillow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/images/pillow.png -------------------------------------------------------------------------------- /archives/pillow/images/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/images/x.png -------------------------------------------------------------------------------- /archives/pillow/index.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/index.css -------------------------------------------------------------------------------- /archives/pillow/index.js: -------------------------------------------------------------------------------- 1 | (function(X) { 2 | new X.slide({ 3 | prefix: 'page', 4 | cls: 'page', 5 | arrow: '.arrow', 6 | style: 'default', 7 | switcher: '#switcher-left,#switcher-right', 8 | webSocket: true 9 | }); 10 | var $ = X.$; 11 | setInterval(function(){ 12 | location.reload() 13 | }, 30000) 14 | })(XDF); 15 | -------------------------------------------------------------------------------- /archives/pillow/pillow.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/archives/pillow/pillow.css -------------------------------------------------------------------------------- /archives/react-component/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React组件开发与测试 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 28 | 29 | 30 | 31 |
32 |
33 |
34 |
35 |

React组件开发与测试

36 |
37 |
38 | 39 |
40 |
41 |
42 |

Introduce

43 |
44 |
    45 |
  • 46 |

    47 | github@xudafeng 48 |

    49 |
  • 50 |
  • 51 |

    52 | weibo@达峰的夏天 53 |

    54 |
  • 55 |
  • 56 |

    57 | twitter@2009xdf 58 |

    59 |
  • 60 |
  • 61 |

    62 | sitexdf.me 64 |

    65 |
  • 66 |
  • 67 |

    68 | companyalipay.com 69 |

    70 |
  • 71 |
72 |
73 |
77 |
78 |
79 |
80 | 81 | 82 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /archives/react-component/src/content.md: -------------------------------------------------------------------------------- 1 | # Component-based UI 2 | 3 | - tile based rendering 4 | - [normal-flow](https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#normal-flow) 5 | 6 | - - - 7 | 8 | # Components 9 | 10 | [WebComponents](http://w3c.github.io/webcomponents) 11 | 12 | - - - 13 | 14 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f345kcfv4jj20kb0flwew.jpg) 15 | 16 | 17 | 18 | - - - 19 | 20 | # [autoresponsive-react](https://github.com/xudafeng/autoresponsive-react) 21 | 22 | - - - 23 | 24 | ```javascript 25 | ... 26 | render() { 27 | return ( 28 | 29 | 30 | 31 | ); 32 | } 33 | ... 34 | ``` 35 | 36 | - - - 37 | 38 | [![](http://ww4.sinaimg.cn/large/6d308bd9gw1ettap20q1cg20b80dc7pv.gif)](http://xudafeng.github.io/autoresponsive-react) 39 | 40 | - - - 41 | 42 | [![](http://ww4.sinaimg.cn/bmiddle/6d308bd9gw1ettap4hkvxg20a209de2d.gif)](http://xudafeng.github.io/autoresponsive-react) 43 | 44 | - - - 45 | 46 | # [Isomorphic](http://isomorphic.net) 47 | 48 | - - - 49 | 50 | ![](http://ww4.sinaimg.cn/large/6d308bd9gw1f34arplhhfj208t082glq.jpg) 51 | 52 | - - - 53 | 54 | ### e.g. 55 | 56 | - [director](https://github.com/flatiron/director) 57 | - [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) 58 | - rendering 59 | 60 | - - - 61 | 62 | # Native 63 | 64 | ```bash 65 | $ react run app.js 66 | ``` 67 | 68 | - - - 69 | 70 | 71 | 72 | - - - 73 | 74 | 75 | 76 | 77 | Android    iOS 78 | 79 | 80 | 81 | 82 | - - - 83 | 84 | ## learn once >> write once 85 | 86 | - - - 87 | 88 | ![weex](http://ww2.sinaimg.cn/large/6d308bd9gw1f34c8di6c3j20jh0c0t9q.jpg) 89 | 90 | - - - 91 | 92 | [![](http://ww1.sinaimg.cn/large/6d308bd9gw1f36bsmuzf3j20sz0kdgpd.jpg)](https://github.com/xudafeng/autoresponsive-react/issues/33) 93 | 94 | - - - 95 | 96 | ![](http://ww2.sinaimg.cn/large/6d308bd9gw1f36bsl1crij20ll0j1q5u.jpg) 97 | 98 | - - - 99 | 100 | ## Improvement plan 101 | 102 | - infinite scroll support 103 | - offline rendering with visual dom intergration 104 | - mixed typesetting practice 105 | - extendible & configurable 106 | 107 | - - - 108 | 109 | # Testing 110 | 111 | - - - 112 | 113 | ![](http://ww3.sinaimg.cn/large/6d308bd9gw1f2xmott0jyj20fv0dujs5.jpg) 114 | 115 | - - - 116 | 117 | ### E2E 118 | 119 | ```javascript 120 | 121 | 122 | describe('test/example.test.js', () => { 123 | describe('page func testing', () => { 124 | before(() => { 125 | return driver 126 | .initWindow({ 127 | width: 375, 128 | height: 667, 129 | deviceScaleFactor: 2 130 | }); 131 | }); 132 | 133 | afterEach(function () { 134 | return driver 135 | .coverage() 136 | .saveScreenshots(this); 137 | }); 138 | 139 | after(() => { 140 | return driver 141 | .openReporter(false) 142 | .quit(); 143 | }); 144 | 145 | it('page render should be ok', () => { 146 | return driver 147 | .getUrl(`${BASE_URL}/examples`) 148 | .setWindowSize(800, 600) 149 | .sleep(1000); 150 | }); 151 | }); 152 | }); 153 | 154 | ``` 155 | 156 | - - - 157 | 158 | ### Unit 159 | 160 | - - - 161 | 162 | ## Coverage 163 | 164 | - [macaca-coverage](//github.com/macacajs/macaca-coverage) 165 | 166 | - - - 167 | 168 | ### More Samples 169 | 170 | - [react-sample](//github.com/macaca-sample/react-sample) - Macaca test sample for browser React 171 | - [vue-sample](//github.com/macaca-sample/vue-sample) - Macaca test sample for browser framework Vue.js 172 | - [coverage-sample](//github.com/macaca-sample/coverage-sample) - Coverage sample 173 | - [awesome-macaca](//github.com/macacajs/awesome-macaca) List of awesome things regarding Macaca. 174 | 175 | - - - 176 | 177 | # END 178 | -------------------------------------------------------------------------------- /archives/toolkit-for-developers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Toolkit For Developers 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 28 | 33 | 34 | 35 | 36 |
37 |
38 |
42 |
43 |
44 |
45 | 46 | 47 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /archives/toolkit-for-developers/src/content.md: -------------------------------------------------------------------------------- 1 | # Toolkit For Developers 2 | 3 | - - - 4 | 5 | ## openit 6 | 7 | Open remote git website 8 | 9 | ```bash 10 | $ npm i openit -g 11 | ``` 12 | 13 | - - - 14 | 15 | ```bash 16 | $ openit 17 | ``` 18 | 19 | - - - 20 | 21 | https://github.com/xudafeng/openit 22 | 23 | - - - 24 | 25 | ## pullgit 26 | 27 | An easy `git pull` 28 | 29 | ```bash 30 | $ npm i pullgit -g 31 | ``` 32 | 33 | - - - 34 | 35 | ```bash 36 | # in any git directory 37 | $ pullgit 38 | ``` 39 | 40 | - - - 41 | 42 | https://github.com/xudafeng/pullgit 43 | 44 | - - - 45 | 46 | ## detect-port 47 | 48 | Node.js implementation of port detector. 49 | 50 | ```bash 51 | $ npm i detect-port -g 52 | ``` 53 | 54 | - - - 55 | 56 | ```bash 57 | $ detect 8080 58 | ``` 59 | 60 | - - - 61 | 62 | https://github.com/node-modules/detect-port 63 | 64 | - - - 65 | 66 | ## killing 67 | 68 | ```bash 69 | $ npm i killing -g 70 | ``` 71 | 72 | - - - 73 | 74 | ```bash 75 | $ killing node 76 | ``` 77 | 78 | - - - 79 | 80 | https://github.com/xudafeng/killing 81 | 82 | - - - 83 | 84 | ## ipv4 85 | 86 | ```bash 87 | $ npm i ipv4 -g 88 | ``` 89 | 90 | - - - 91 | 92 | ```bash 93 | $ ipv4 94 | ``` 95 | 96 | - - - 97 | 98 | https://github.com/xudafeng/ipv4 99 | 100 | - - - 101 | 102 | ## startserver 103 | 104 | Yet another http server just for fun. 105 | 106 | ```bash 107 | $ npm i startserver -g 108 | ``` 109 | 110 | - - - 111 | 112 | ```bash 113 | $ startserver 114 | ``` 115 | 116 | - - - 117 | 118 | https://github.com/xudafeng/startserver 119 | 120 | - - - 121 | 122 | ## net-tool 123 | 124 | ```bash 125 | $ npm i net-tools -g 126 | ``` 127 | 128 | - - - 129 | 130 | ```bash 131 | $ net-tools 132 | ``` 133 | 134 | - - - 135 | 136 | https://github.com/xudafeng/net-tools 137 | 138 | - - - 139 | 140 | ## his 141 | 142 | - - - 143 | 144 | ```bash 145 | $ his git 146 | $ his git 8 147 | ``` 148 | 149 | - - - 150 | 151 | ``` 152 | alias his="history | node ~/.bash/scripts/history.js" 153 | ``` 154 | 155 | - - - 156 | 157 | https://github.com/xudafeng/bash/blob/master/scripts/history.js 158 | 159 | - - - 160 | 161 | https://xudafeng.github.io/color-viewer/ 162 | 163 | - - - 164 | 165 | ## Finder <-> Terminal <-> Editor 166 | 167 | - - - 168 | 169 | ``` 170 | ## sublime 171 | SUBLIMEBIN="/Applications/Sublime.app/Contents/SharedSupport/bin/subl" 172 | if [ -f $SUBLIMEBIN ]; then 173 | alias sublime=${SUBLIMEBIN}" ." 174 | fi 175 | ## visual code 176 | VISUALSTUDIOCODE="/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" 177 | 178 | if [[ -f $VISUALSTUDIOCODE ]]; then 179 | alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code ." 180 | fi 181 | ``` 182 | 183 | - - - 184 | 185 | - go2shell 186 | 187 | - - - 188 | 189 | ## iScanner 190 | 191 | Fast exact and light scanner. 192 | 193 | - - - 194 | 195 | 196 | 197 | - - - 198 | 199 | https://iscanner.github.io 200 | 201 | - - - 202 | 203 | ## END 204 | 205 | > just enjoy your life 206 | -------------------------------------------------------------------------------- /assets/css/custom.css: -------------------------------------------------------------------------------- 1 | .reveal section img { 2 | border: none; 3 | border-radius: 10px; 4 | box-shadow: none; 5 | } 6 | -------------------------------------------------------------------------------- /assets/css/print/paper.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | @media print { 10 | 11 | /* SECTION 1: Set default width, margin, float, and 12 | background. This prevents elements from extending 13 | beyond the edge of the printed page, and prevents 14 | unnecessary background images from printing */ 15 | html { 16 | background: #fff; 17 | width: auto; 18 | height: auto; 19 | overflow: visible; 20 | } 21 | body { 22 | background: #fff; 23 | font-size: 20pt; 24 | width: auto; 25 | height: auto; 26 | border: 0; 27 | margin: 0 5%; 28 | padding: 0; 29 | overflow: visible; 30 | float: none !important; 31 | } 32 | 33 | /* SECTION 2: Remove any elements not needed in print. 34 | This would include navigation, ads, sidebars, etc. */ 35 | .export-pdf, 36 | .nestedarrow, 37 | .controls, 38 | .fork-reveal, 39 | .share-reveal, 40 | .state-background, 41 | .reveal .progress, 42 | .reveal .backgrounds { 43 | display: none !important; 44 | } 45 | 46 | /* SECTION 3: Set body font face, size, and color. 47 | Consider using a serif font for readability. */ 48 | body, p, td, li, div { 49 | font-size: 20pt!important; 50 | font-family: 'Source Sans Pro', Helvetica, sans-serif!important; 51 | color: #000; 52 | } 53 | 54 | /* SECTION 4: Set heading font face, sizes, and color. 55 | Differentiate your headings from your body text. 56 | Perhaps use a large sans-serif for distinction. */ 57 | h1,h2,h3,h4,h5,h6 { 58 | color: #000!important; 59 | height: auto; 60 | line-height: normal; 61 | font-family: 'Source Sans Pro', Helvetica, sans-serif!important; 62 | text-shadow: 0 0 0 #000 !important; 63 | text-align: center; 64 | letter-spacing: normal; 65 | } 66 | /* Need to reduce the size of the fonts for printing */ 67 | h1 { font-size: 48pt !important; } 68 | h2 { font-size: 34pt !important; } 69 | h3 { font-size: 32pt !important; } 70 | h4 { font-size: 32pt !important; font-variant: small-caps; } 71 | h5 { font-size: 31pt !important; } 72 | h6 { font-size: 30pt !important; font-style: italic; } 73 | 74 | /* SECTION 5: Make hyperlinks more usable. 75 | Ensure links are underlined, and consider appending 76 | the URL to the end of the link for usability. */ 77 | a:link, 78 | a:visited { 79 | color: #000 !important; 80 | font-weight: bold; 81 | text-decoration: underline; 82 | } 83 | /* 84 | .reveal a:link:after, 85 | .reveal a:visited:after { 86 | content: " (" attr(href) ") "; 87 | color: #222 !important; 88 | font-size: 90%; 89 | } 90 | */ 91 | 92 | 93 | /* SECTION 6: more reveal.js specific additions by @skypanther */ 94 | ul, ol, div, p { 95 | visibility: visible; 96 | position: static; 97 | width: auto; 98 | height: auto; 99 | display: block; 100 | overflow: visible; 101 | margin: 0; 102 | text-align: left !important; 103 | } 104 | p { 105 | text-align: center !important; 106 | } 107 | .reveal pre, 108 | .reveal table { 109 | margin-left: 0; 110 | margin-right: 0; 111 | } 112 | .reveal pre code { 113 | padding: 20px; 114 | border: 1px solid #ddd; 115 | } 116 | .reveal blockquote { 117 | margin: 20px 0; 118 | } 119 | .reveal .slides { 120 | position: static !important; 121 | width: auto !important; 122 | height: auto !important; 123 | 124 | left: 0 !important; 125 | top: 0 !important; 126 | margin-left: 0 !important; 127 | margin-top: 0 !important; 128 | padding: 0 !important; 129 | zoom: 1 !important; 130 | 131 | overflow: visible !important; 132 | display: block !important; 133 | 134 | text-align: center !important; 135 | -webkit-perspective: none; 136 | -moz-perspective: none; 137 | -ms-perspective: none; 138 | perspective: none; 139 | 140 | -webkit-perspective-origin: 50% 50%; 141 | -moz-perspective-origin: 50% 50%; 142 | -ms-perspective-origin: 50% 50%; 143 | perspective-origin: 50% 50%; 144 | } 145 | .reveal .slides section { 146 | visibility: visible !important; 147 | position: static !important; 148 | width: 100% !important; 149 | height: auto !important; 150 | display: block !important; 151 | overflow: visible !important; 152 | 153 | left: 0 !important; 154 | top: 0 !important; 155 | margin-left: 0 !important; 156 | margin-top: 0 !important; 157 | padding: 60px 20px !important; 158 | z-index: auto !important; 159 | 160 | opacity: 1 !important; 161 | 162 | page-break-after: always !important; 163 | 164 | -webkit-transform-style: flat !important; 165 | -moz-transform-style: flat !important; 166 | -ms-transform-style: flat !important; 167 | transform-style: flat !important; 168 | 169 | -webkit-transform: none !important; 170 | -moz-transform: none !important; 171 | -ms-transform: none !important; 172 | transform: none !important; 173 | 174 | -webkit-transition: none !important; 175 | -moz-transition: none !important; 176 | -ms-transition: none !important; 177 | transition: none !important; 178 | } 179 | .reveal .slides section.stack { 180 | padding: 0 !important; 181 | } 182 | .reveal section:last-of-type { 183 | page-break-after: avoid !important; 184 | } 185 | .reveal section .fragment { 186 | opacity: 1 !important; 187 | visibility: visible !important; 188 | 189 | -webkit-transform: none !important; 190 | -moz-transform: none !important; 191 | -ms-transform: none !important; 192 | transform: none !important; 193 | } 194 | .reveal section img { 195 | display: block; 196 | margin: 0 auto; 197 | background: rgba(255,255,255,1); 198 | box-shadow: none; 199 | } 200 | 201 | .reveal section small { 202 | font-size: 0.8em; 203 | } 204 | 205 | #introduce h3{ 206 | text-align: left!important; 207 | } 208 | } 209 | -------------------------------------------------------------------------------- /assets/css/print/pdf.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | /* SECTION 1: Set default width, margin, float, and 10 | background. This prevents elements from extending 11 | beyond the edge of the printed page, and prevents 12 | unnecessary background images from printing */ 13 | 14 | * { 15 | -webkit-print-color-adjust: exact; 16 | } 17 | 18 | body { 19 | margin: 0 auto !important; 20 | border: 0; 21 | padding: 0; 22 | float: none !important; 23 | overflow: visible; 24 | } 25 | 26 | html { 27 | width: 100%; 28 | height: 100%; 29 | overflow: visible; 30 | } 31 | 32 | /* SECTION 2: Remove any elements not needed in print. 33 | This would include navigation, ads, sidebars, etc. */ 34 | .export-pdf, 35 | .nestedarrow, 36 | .reveal .controls, 37 | .reveal .progress, 38 | .reveal .slide-number, 39 | .reveal .playback, 40 | .reveal.overview, 41 | .fork-reveal, 42 | .share-reveal, 43 | .state-background { 44 | display: none !important; 45 | } 46 | 47 | /* SECTION 3: Set body font face, size, and color. 48 | Consider using a serif font for readability. */ 49 | body, p, td, li, div { 50 | 51 | } 52 | 53 | /* SECTION 4: Set heading font face, sizes, and color. 54 | Differentiate your headings from your body text. 55 | Perhaps use a large sans-serif for distinction. */ 56 | h1,h2,h3,h4,h5,h6 { 57 | text-shadow: 0 0 0 #000 !important; 58 | } 59 | 60 | .reveal pre code { 61 | overflow: hidden !important; 62 | font-family: Courier, 'Courier New', monospace !important; 63 | } 64 | 65 | 66 | /* SECTION 5: more reveal.js specific additions by @skypanther */ 67 | ul, ol, div, p { 68 | visibility: visible; 69 | position: static; 70 | width: auto; 71 | height: auto; 72 | display: block; 73 | overflow: visible; 74 | margin: auto; 75 | } 76 | .reveal { 77 | width: auto !important; 78 | height: auto !important; 79 | overflow: hidden !important; 80 | } 81 | .reveal .slides { 82 | position: static; 83 | width: 100%; 84 | height: auto; 85 | 86 | left: auto; 87 | top: auto; 88 | margin: 0 !important; 89 | padding: 0 !important; 90 | 91 | overflow: visible; 92 | display: block; 93 | 94 | -webkit-perspective: none; 95 | -moz-perspective: none; 96 | -ms-perspective: none; 97 | perspective: none; 98 | 99 | -webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */ 100 | -moz-perspective-origin: 50% 50%; 101 | -ms-perspective-origin: 50% 50%; 102 | perspective-origin: 50% 50%; 103 | } 104 | .reveal .slides section { 105 | page-break-after: always !important; 106 | 107 | visibility: visible !important; 108 | position: relative !important; 109 | display: block !important; 110 | position: relative !important; 111 | 112 | margin: 0 !important; 113 | padding: 0 !important; 114 | box-sizing: border-box !important; 115 | min-height: 1px; 116 | 117 | opacity: 1 !important; 118 | 119 | -webkit-transform-style: flat !important; 120 | -moz-transform-style: flat !important; 121 | -ms-transform-style: flat !important; 122 | transform-style: flat !important; 123 | 124 | -webkit-transform: none !important; 125 | -moz-transform: none !important; 126 | -ms-transform: none !important; 127 | transform: none !important; 128 | } 129 | .reveal section.stack { 130 | margin: 0 !important; 131 | padding: 0 !important; 132 | page-break-after: avoid !important; 133 | height: auto !important; 134 | min-height: auto !important; 135 | } 136 | .reveal img { 137 | box-shadow: none; 138 | } 139 | .reveal .roll { 140 | overflow: visible; 141 | line-height: 1em; 142 | } 143 | 144 | /* Slide backgrounds are placed inside of their slide when exporting to PDF */ 145 | .reveal section .slide-background { 146 | display: block !important; 147 | position: absolute; 148 | top: 0; 149 | left: 0; 150 | width: 100%; 151 | z-index: -1; 152 | } 153 | /* All elements should be above the slide-background */ 154 | .reveal section>* { 155 | position: relative; 156 | z-index: 1; 157 | } 158 | 159 | -------------------------------------------------------------------------------- /assets/css/theme/README.md: -------------------------------------------------------------------------------- 1 | ## Dependencies 2 | 3 | Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceding: https://github.com/hakimel/reveal.js#full-setup 4 | 5 | You also need to install Ruby and then Sass (with `gem install sass`). 6 | 7 | ## Creating a Theme 8 | 9 | To create your own theme, start by duplicating any ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source) and adding it to the compilation list in the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js). 10 | 11 | Each theme file does four things in the following order: 12 | 13 | 1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)** 14 | Shared utility functions. 15 | 16 | 2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)** 17 | Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3. 18 | 19 | 3. **Override** 20 | This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding full selectors with hardcoded styles. 21 | 22 | 4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)** 23 | The template theme file which will generate final CSS output based on the currently defined variables. 24 | 25 | When you are done, run `grunt css-themes` to compile the Sass file to CSS and you are ready to use your new theme. 26 | -------------------------------------------------------------------------------- /assets/css/theme/moon.css: -------------------------------------------------------------------------------- 1 | @import url(../../lib/font/league-gothic/league-gothic.css); 2 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 3 | /** 4 | * Solarized Dark theme for reveal.js. 5 | * Author: Achim Staebler 6 | */ 7 | /** 8 | * Solarized colors by Ethan Schoonover 9 | */ 10 | html * { 11 | color-profile: sRGB; 12 | rendering-intent: auto; } 13 | 14 | /********************************************* 15 | * GLOBAL STYLES 16 | *********************************************/ 17 | body { 18 | background: #002b36; 19 | background-color: #002b36; } 20 | 21 | .reveal { 22 | font-family: 'Lato', sans-serif; 23 | font-size: 36px; 24 | font-weight: normal; 25 | color: #93a1a1; } 26 | 27 | ::selection { 28 | color: #fff; 29 | background: #d33682; 30 | text-shadow: none; } 31 | 32 | .reveal .slides > section, .reveal .slides > section > section { 33 | line-height: 1.3; 34 | font-weight: inherit; } 35 | 36 | /********************************************* 37 | * HEADERS 38 | *********************************************/ 39 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 40 | margin: 0 0 20px 0; 41 | color: #eee8d5; 42 | font-family: 'League Gothic', Impact, sans-serif; 43 | font-weight: normal; 44 | line-height: 1.2; 45 | letter-spacing: normal; 46 | text-transform: uppercase; 47 | text-shadow: none; 48 | word-wrap: break-word; } 49 | 50 | .reveal h1 { 51 | font-size: 3.77em; } 52 | 53 | .reveal h2 { 54 | font-size: 2.11em; } 55 | 56 | .reveal h3 { 57 | font-size: 1.55em; } 58 | 59 | .reveal h4 { 60 | font-size: 1em; } 61 | 62 | .reveal h1 { 63 | text-shadow: none; } 64 | 65 | /********************************************* 66 | * OTHER 67 | *********************************************/ 68 | .reveal p { 69 | margin: 20px 0; 70 | line-height: 1.3; } 71 | 72 | /* Ensure certain elements are never larger than the slide itself */ 73 | .reveal img, .reveal video, .reveal iframe { 74 | max-width: 95%; 75 | max-height: 95%; } 76 | 77 | .reveal strong, .reveal b { 78 | font-weight: bold; } 79 | 80 | .reveal em { 81 | font-style: italic; } 82 | 83 | .reveal ol, .reveal dl, .reveal ul { 84 | display: inline-block; 85 | text-align: left; 86 | margin: 0 0 0 1em; } 87 | 88 | .reveal ol { 89 | list-style-type: decimal; } 90 | 91 | .reveal ul { 92 | list-style-type: disc; } 93 | 94 | .reveal ul ul { 95 | list-style-type: square; } 96 | 97 | .reveal ul ul ul { 98 | list-style-type: circle; } 99 | 100 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 101 | display: block; 102 | margin-left: 40px; } 103 | 104 | .reveal dt { 105 | font-weight: bold; } 106 | 107 | .reveal dd { 108 | margin-left: 40px; } 109 | 110 | .reveal q, .reveal blockquote { 111 | quotes: none; } 112 | 113 | .reveal blockquote { 114 | display: block; 115 | position: relative; 116 | width: 70%; 117 | margin: 20px auto; 118 | padding: 5px; 119 | font-style: italic; 120 | background: rgba(255, 255, 255, 0.05); 121 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 122 | 123 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 124 | display: inline-block; } 125 | 126 | .reveal q { 127 | font-style: italic; } 128 | 129 | .reveal pre { 130 | display: block; 131 | position: relative; 132 | width: 90%; 133 | margin: 20px auto; 134 | text-align: left; 135 | font-size: 0.55em; 136 | font-family: monospace; 137 | line-height: 1.2em; 138 | word-wrap: break-word; 139 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 140 | 141 | .reveal code { 142 | font-family: monospace; } 143 | 144 | .reveal pre code { 145 | display: block; 146 | padding: 5px; 147 | overflow: auto; 148 | max-height: 400px; 149 | word-wrap: normal; 150 | background: #3F3F3F; 151 | color: #DCDCDC; } 152 | 153 | .reveal table { 154 | margin: auto; 155 | border-collapse: collapse; 156 | border-spacing: 0; } 157 | 158 | .reveal table th { 159 | font-weight: bold; } 160 | 161 | .reveal table th, .reveal table td { 162 | text-align: left; 163 | padding: 0.2em 0.5em 0.2em 0.5em; 164 | border-bottom: 1px solid; } 165 | 166 | .reveal table tr:last-child td { 167 | border-bottom: none; } 168 | 169 | .reveal sup { 170 | vertical-align: super; } 171 | 172 | .reveal sub { 173 | vertical-align: sub; } 174 | 175 | .reveal small { 176 | display: inline-block; 177 | font-size: 0.6em; 178 | line-height: 1.2em; 179 | vertical-align: top; } 180 | 181 | .reveal small * { 182 | vertical-align: top; } 183 | 184 | /********************************************* 185 | * LINKS 186 | *********************************************/ 187 | .reveal a { 188 | color: #268bd2; 189 | text-decoration: none; 190 | -webkit-transition: color 0.15s ease; 191 | -moz-transition: color 0.15s ease; 192 | transition: color 0.15s ease; } 193 | 194 | .reveal a:hover { 195 | color: #78bae6; 196 | text-shadow: none; 197 | border: none; } 198 | 199 | .reveal .roll span:after { 200 | color: #fff; 201 | background: #1a6291; } 202 | 203 | /********************************************* 204 | * IMAGES 205 | *********************************************/ 206 | .reveal section img { 207 | margin: 15px 0px; 208 | background: rgba(255, 255, 255, 0.12); 209 | border: 4px solid #93a1a1; 210 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 211 | 212 | .reveal a img { 213 | -webkit-transition: all 0.15s linear; 214 | -moz-transition: all 0.15s linear; 215 | transition: all 0.15s linear; } 216 | 217 | .reveal a:hover img { 218 | background: rgba(255, 255, 255, 0.2); 219 | border-color: #268bd2; 220 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 221 | 222 | /********************************************* 223 | * NAVIGATION CONTROLS 224 | *********************************************/ 225 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 226 | border-right-color: #268bd2; } 227 | 228 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 229 | border-left-color: #268bd2; } 230 | 231 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 232 | border-bottom-color: #268bd2; } 233 | 234 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 235 | border-top-color: #268bd2; } 236 | 237 | .reveal .controls div.navigate-left.enabled:hover { 238 | border-right-color: #78bae6; } 239 | 240 | .reveal .controls div.navigate-right.enabled:hover { 241 | border-left-color: #78bae6; } 242 | 243 | .reveal .controls div.navigate-up.enabled:hover { 244 | border-bottom-color: #78bae6; } 245 | 246 | .reveal .controls div.navigate-down.enabled:hover { 247 | border-top-color: #78bae6; } 248 | 249 | /********************************************* 250 | * PROGRESS BAR 251 | *********************************************/ 252 | .reveal .progress { 253 | background: rgba(0, 0, 0, 0.2); } 254 | 255 | .reveal .progress span { 256 | background: #268bd2; 257 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 258 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 259 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 260 | 261 | /********************************************* 262 | * SLIDE NUMBER 263 | *********************************************/ 264 | .reveal .slide-number { 265 | color: #268bd2; } 266 | -------------------------------------------------------------------------------- /assets/css/theme/night.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 2 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 3 | /** 4 | * Black theme for reveal.js. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | /********************************************* 9 | * GLOBAL STYLES 10 | *********************************************/ 11 | body { 12 | background: #111; 13 | background-color: #111; } 14 | 15 | .reveal { 16 | font-family: 'Open Sans', sans-serif; 17 | font-size: 30px; 18 | font-weight: normal; 19 | color: #eee; } 20 | 21 | ::selection { 22 | color: #fff; 23 | background: #e7ad52; 24 | text-shadow: none; } 25 | 26 | .reveal .slides > section, .reveal .slides > section > section { 27 | line-height: 1.3; 28 | font-weight: inherit; } 29 | 30 | /********************************************* 31 | * HEADERS 32 | *********************************************/ 33 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 34 | margin: 0 0 20px 0; 35 | color: #eee; 36 | font-family: 'Montserrat', Impact, sans-serif; 37 | font-weight: normal; 38 | line-height: 1.2; 39 | letter-spacing: -0.03em; 40 | text-transform: none; 41 | text-shadow: none; 42 | word-wrap: break-word; } 43 | 44 | .reveal h1 { 45 | font-size: 3.77em; } 46 | 47 | .reveal h2 { 48 | font-size: 2.11em; } 49 | 50 | .reveal h3 { 51 | font-size: 1.55em; } 52 | 53 | .reveal h4 { 54 | font-size: 1em; } 55 | 56 | .reveal h1 { 57 | text-shadow: none; } 58 | 59 | /********************************************* 60 | * OTHER 61 | *********************************************/ 62 | .reveal p { 63 | margin: 20px 0; 64 | line-height: 1.3; } 65 | 66 | /* Ensure certain elements are never larger than the slide itself */ 67 | .reveal img, .reveal video, .reveal iframe { 68 | max-width: 95%; 69 | max-height: 95%; } 70 | 71 | .reveal strong, .reveal b { 72 | font-weight: bold; } 73 | 74 | .reveal em { 75 | font-style: italic; } 76 | 77 | .reveal ol, .reveal dl, .reveal ul { 78 | display: inline-block; 79 | text-align: left; 80 | margin: 0 0 0 1em; } 81 | 82 | .reveal ol { 83 | list-style-type: decimal; } 84 | 85 | .reveal ul { 86 | list-style-type: disc; } 87 | 88 | .reveal ul ul { 89 | list-style-type: square; } 90 | 91 | .reveal ul ul ul { 92 | list-style-type: circle; } 93 | 94 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 95 | display: block; 96 | margin-left: 40px; } 97 | 98 | .reveal dt { 99 | font-weight: bold; } 100 | 101 | .reveal dd { 102 | margin-left: 40px; } 103 | 104 | .reveal q, .reveal blockquote { 105 | quotes: none; } 106 | 107 | .reveal blockquote { 108 | display: block; 109 | position: relative; 110 | width: 70%; 111 | margin: 20px auto; 112 | padding: 5px; 113 | font-style: italic; 114 | background: rgba(255, 255, 255, 0.05); 115 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 116 | 117 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 118 | display: inline-block; } 119 | 120 | .reveal q { 121 | font-style: italic; } 122 | 123 | .reveal pre { 124 | display: block; 125 | position: relative; 126 | width: 90%; 127 | margin: 20px auto; 128 | text-align: left; 129 | font-size: 0.55em; 130 | font-family: monospace; 131 | line-height: 1.2em; 132 | word-wrap: break-word; 133 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 134 | 135 | .reveal code { 136 | font-family: monospace; } 137 | 138 | .reveal pre code { 139 | display: block; 140 | padding: 5px; 141 | overflow: auto; 142 | max-height: 400px; 143 | word-wrap: normal; 144 | background: #3F3F3F; 145 | color: #DCDCDC; } 146 | 147 | .reveal table { 148 | margin: auto; 149 | border-collapse: collapse; 150 | border-spacing: 0; } 151 | 152 | .reveal table th { 153 | font-weight: bold; } 154 | 155 | .reveal table th, .reveal table td { 156 | text-align: left; 157 | padding: 0.2em 0.5em 0.2em 0.5em; 158 | border-bottom: 1px solid; } 159 | 160 | .reveal table tr:last-child td { 161 | border-bottom: none; } 162 | 163 | .reveal sup { 164 | vertical-align: super; } 165 | 166 | .reveal sub { 167 | vertical-align: sub; } 168 | 169 | .reveal small { 170 | display: inline-block; 171 | font-size: 0.6em; 172 | line-height: 1.2em; 173 | vertical-align: top; } 174 | 175 | .reveal small * { 176 | vertical-align: top; } 177 | 178 | /********************************************* 179 | * LINKS 180 | *********************************************/ 181 | .reveal a { 182 | color: #e7ad52; 183 | text-decoration: none; 184 | -webkit-transition: color 0.15s ease; 185 | -moz-transition: color 0.15s ease; 186 | transition: color 0.15s ease; } 187 | 188 | .reveal a:hover { 189 | color: #f3d7ac; 190 | text-shadow: none; 191 | border: none; } 192 | 193 | .reveal .roll span:after { 194 | color: #fff; 195 | background: #d0881d; } 196 | 197 | /********************************************* 198 | * IMAGES 199 | *********************************************/ 200 | .reveal section img { 201 | margin: 15px 0px; 202 | background: rgba(255, 255, 255, 0.12); 203 | border: 4px solid #eee; 204 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 205 | 206 | .reveal a img { 207 | -webkit-transition: all 0.15s linear; 208 | -moz-transition: all 0.15s linear; 209 | transition: all 0.15s linear; } 210 | 211 | .reveal a:hover img { 212 | background: rgba(255, 255, 255, 0.2); 213 | border-color: #e7ad52; 214 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 215 | 216 | /********************************************* 217 | * NAVIGATION CONTROLS 218 | *********************************************/ 219 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 220 | border-right-color: #e7ad52; } 221 | 222 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 223 | border-left-color: #e7ad52; } 224 | 225 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 226 | border-bottom-color: #e7ad52; } 227 | 228 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 229 | border-top-color: #e7ad52; } 230 | 231 | .reveal .controls div.navigate-left.enabled:hover { 232 | border-right-color: #f3d7ac; } 233 | 234 | .reveal .controls div.navigate-right.enabled:hover { 235 | border-left-color: #f3d7ac; } 236 | 237 | .reveal .controls div.navigate-up.enabled:hover { 238 | border-bottom-color: #f3d7ac; } 239 | 240 | .reveal .controls div.navigate-down.enabled:hover { 241 | border-top-color: #f3d7ac; } 242 | 243 | /********************************************* 244 | * PROGRESS BAR 245 | *********************************************/ 246 | .reveal .progress { 247 | background: rgba(0, 0, 0, 0.2); } 248 | 249 | .reveal .progress span { 250 | background: #e7ad52; 251 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 252 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 253 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 254 | 255 | /********************************************* 256 | * SLIDE NUMBER 257 | *********************************************/ 258 | .reveal .slide-number { 259 | color: #e7ad52; } 260 | -------------------------------------------------------------------------------- /assets/css/theme/serif.css: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | .reveal a { 8 | line-height: 1.3em; } 9 | 10 | /********************************************* 11 | * GLOBAL STYLES 12 | *********************************************/ 13 | body { 14 | background: #F0F1EB; 15 | background-color: #F0F1EB; } 16 | 17 | .reveal { 18 | font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 19 | font-size: 36px; 20 | font-weight: normal; 21 | color: #000; } 22 | 23 | ::selection { 24 | color: #fff; 25 | background: #26351C; 26 | text-shadow: none; } 27 | 28 | .reveal .slides > section, .reveal .slides > section > section { 29 | line-height: 1.3; 30 | font-weight: inherit; } 31 | 32 | /********************************************* 33 | * HEADERS 34 | *********************************************/ 35 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 36 | margin: 0 0 20px 0; 37 | color: #383D3D; 38 | font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 39 | font-weight: normal; 40 | line-height: 1.2; 41 | letter-spacing: normal; 42 | text-transform: none; 43 | text-shadow: none; 44 | word-wrap: break-word; } 45 | 46 | .reveal h1 { 47 | font-size: 3.77em; } 48 | 49 | .reveal h2 { 50 | font-size: 2.11em; } 51 | 52 | .reveal h3 { 53 | font-size: 1.55em; } 54 | 55 | .reveal h4 { 56 | font-size: 1em; } 57 | 58 | .reveal h1 { 59 | text-shadow: none; } 60 | 61 | /********************************************* 62 | * OTHER 63 | *********************************************/ 64 | .reveal p { 65 | margin: 20px 0; 66 | line-height: 1.3; } 67 | 68 | /* Ensure certain elements are never larger than the slide itself */ 69 | .reveal img, .reveal video, .reveal iframe { 70 | max-width: 95%; 71 | max-height: 95%; } 72 | 73 | .reveal strong, .reveal b { 74 | font-weight: bold; } 75 | 76 | .reveal em { 77 | font-style: italic; } 78 | 79 | .reveal ol, .reveal dl, .reveal ul { 80 | display: inline-block; 81 | text-align: left; 82 | margin: 0 0 0 1em; } 83 | 84 | .reveal ol { 85 | list-style-type: decimal; } 86 | 87 | .reveal ul { 88 | list-style-type: disc; } 89 | 90 | .reveal ul ul { 91 | list-style-type: square; } 92 | 93 | .reveal ul ul ul { 94 | list-style-type: circle; } 95 | 96 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 97 | display: block; 98 | margin-left: 40px; } 99 | 100 | .reveal dt { 101 | font-weight: bold; } 102 | 103 | .reveal dd { 104 | margin-left: 40px; } 105 | 106 | .reveal q, .reveal blockquote { 107 | quotes: none; } 108 | 109 | .reveal blockquote { 110 | display: block; 111 | position: relative; 112 | width: 70%; 113 | margin: 20px auto; 114 | padding: 5px; 115 | font-style: italic; 116 | background: rgba(255, 255, 255, 0.05); 117 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 118 | 119 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 120 | display: inline-block; } 121 | 122 | .reveal q { 123 | font-style: italic; } 124 | 125 | .reveal pre { 126 | display: block; 127 | position: relative; 128 | width: 90%; 129 | margin: 20px auto; 130 | text-align: left; 131 | font-size: 0.55em; 132 | font-family: monospace; 133 | line-height: 1.2em; 134 | word-wrap: break-word; 135 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 136 | 137 | .reveal code { 138 | font-family: monospace; } 139 | 140 | .reveal pre code { 141 | display: block; 142 | padding: 5px; 143 | overflow: auto; 144 | max-height: 400px; 145 | word-wrap: normal; 146 | background: #3F3F3F; 147 | color: #DCDCDC; } 148 | 149 | .reveal table { 150 | margin: auto; 151 | border-collapse: collapse; 152 | border-spacing: 0; } 153 | 154 | .reveal table th { 155 | font-weight: bold; } 156 | 157 | .reveal table th, .reveal table td { 158 | text-align: left; 159 | padding: 0.2em 0.5em 0.2em 0.5em; 160 | border-bottom: 1px solid; } 161 | 162 | .reveal table tr:last-child td { 163 | border-bottom: none; } 164 | 165 | .reveal sup { 166 | vertical-align: super; } 167 | 168 | .reveal sub { 169 | vertical-align: sub; } 170 | 171 | .reveal small { 172 | display: inline-block; 173 | font-size: 0.6em; 174 | line-height: 1.2em; 175 | vertical-align: top; } 176 | 177 | .reveal small * { 178 | vertical-align: top; } 179 | 180 | /********************************************* 181 | * LINKS 182 | *********************************************/ 183 | .reveal a { 184 | color: #51483D; 185 | text-decoration: none; 186 | -webkit-transition: color 0.15s ease; 187 | -moz-transition: color 0.15s ease; 188 | transition: color 0.15s ease; } 189 | 190 | .reveal a:hover { 191 | color: #8b7b69; 192 | text-shadow: none; 193 | border: none; } 194 | 195 | .reveal .roll span:after { 196 | color: #fff; 197 | background: #25211c; } 198 | 199 | /********************************************* 200 | * IMAGES 201 | *********************************************/ 202 | .reveal section img { 203 | margin: 15px 0px; 204 | background: rgba(255, 255, 255, 0.12); 205 | border: 4px solid #000; 206 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 207 | 208 | .reveal a img { 209 | -webkit-transition: all 0.15s linear; 210 | -moz-transition: all 0.15s linear; 211 | transition: all 0.15s linear; } 212 | 213 | .reveal a:hover img { 214 | background: rgba(255, 255, 255, 0.2); 215 | border-color: #51483D; 216 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 217 | 218 | /********************************************* 219 | * NAVIGATION CONTROLS 220 | *********************************************/ 221 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 222 | border-right-color: #51483D; } 223 | 224 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 225 | border-left-color: #51483D; } 226 | 227 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 228 | border-bottom-color: #51483D; } 229 | 230 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 231 | border-top-color: #51483D; } 232 | 233 | .reveal .controls div.navigate-left.enabled:hover { 234 | border-right-color: #8b7b69; } 235 | 236 | .reveal .controls div.navigate-right.enabled:hover { 237 | border-left-color: #8b7b69; } 238 | 239 | .reveal .controls div.navigate-up.enabled:hover { 240 | border-bottom-color: #8b7b69; } 241 | 242 | .reveal .controls div.navigate-down.enabled:hover { 243 | border-top-color: #8b7b69; } 244 | 245 | /********************************************* 246 | * PROGRESS BAR 247 | *********************************************/ 248 | .reveal .progress { 249 | background: rgba(0, 0, 0, 0.2); } 250 | 251 | .reveal .progress span { 252 | background: #51483D; 253 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 254 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 255 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 256 | 257 | /********************************************* 258 | * SLIDE NUMBER 259 | *********************************************/ 260 | .reveal .slide-number { 261 | color: #51483D; } 262 | -------------------------------------------------------------------------------- /assets/css/theme/solarized.css: -------------------------------------------------------------------------------- 1 | @import url(../../lib/font/league-gothic/league-gothic.css); 2 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 3 | /** 4 | * Solarized Light theme for reveal.js. 5 | * Author: Achim Staebler 6 | */ 7 | /** 8 | * Solarized colors by Ethan Schoonover 9 | */ 10 | html * { 11 | color-profile: sRGB; 12 | rendering-intent: auto; } 13 | 14 | /********************************************* 15 | * GLOBAL STYLES 16 | *********************************************/ 17 | body { 18 | background: #fdf6e3; 19 | background-color: #fdf6e3; } 20 | 21 | .reveal { 22 | font-family: 'Lato', sans-serif; 23 | font-size: 36px; 24 | font-weight: normal; 25 | color: #657b83; } 26 | 27 | ::selection { 28 | color: #fff; 29 | background: #d33682; 30 | text-shadow: none; } 31 | 32 | .reveal .slides > section, .reveal .slides > section > section { 33 | line-height: 1.3; 34 | font-weight: inherit; } 35 | 36 | /********************************************* 37 | * HEADERS 38 | *********************************************/ 39 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 40 | margin: 0 0 20px 0; 41 | color: #586e75; 42 | font-family: 'League Gothic', Impact, sans-serif; 43 | font-weight: normal; 44 | line-height: 1.2; 45 | letter-spacing: normal; 46 | text-transform: uppercase; 47 | text-shadow: none; 48 | word-wrap: break-word; } 49 | 50 | .reveal h1 { 51 | font-size: 3.77em; } 52 | 53 | .reveal h2 { 54 | font-size: 2.11em; } 55 | 56 | .reveal h3 { 57 | font-size: 1.55em; } 58 | 59 | .reveal h4 { 60 | font-size: 1em; } 61 | 62 | .reveal h1 { 63 | text-shadow: none; } 64 | 65 | /********************************************* 66 | * OTHER 67 | *********************************************/ 68 | .reveal p { 69 | margin: 20px 0; 70 | line-height: 1.3; } 71 | 72 | /* Ensure certain elements are never larger than the slide itself */ 73 | .reveal img, .reveal video, .reveal iframe { 74 | max-width: 95%; 75 | max-height: 95%; } 76 | 77 | .reveal strong, .reveal b { 78 | font-weight: bold; } 79 | 80 | .reveal em { 81 | font-style: italic; } 82 | 83 | .reveal ol, .reveal dl, .reveal ul { 84 | display: inline-block; 85 | text-align: left; 86 | margin: 0 0 0 1em; } 87 | 88 | .reveal ol { 89 | list-style-type: decimal; } 90 | 91 | .reveal ul { 92 | list-style-type: disc; } 93 | 94 | .reveal ul ul { 95 | list-style-type: square; } 96 | 97 | .reveal ul ul ul { 98 | list-style-type: circle; } 99 | 100 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 101 | display: block; 102 | margin-left: 40px; } 103 | 104 | .reveal dt { 105 | font-weight: bold; } 106 | 107 | .reveal dd { 108 | margin-left: 40px; } 109 | 110 | .reveal q, .reveal blockquote { 111 | quotes: none; } 112 | 113 | .reveal blockquote { 114 | display: block; 115 | position: relative; 116 | width: 70%; 117 | margin: 20px auto; 118 | padding: 5px; 119 | font-style: italic; 120 | background: rgba(255, 255, 255, 0.05); 121 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 122 | 123 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 124 | display: inline-block; } 125 | 126 | .reveal q { 127 | font-style: italic; } 128 | 129 | .reveal pre { 130 | display: block; 131 | position: relative; 132 | width: 90%; 133 | margin: 20px auto; 134 | text-align: left; 135 | font-size: 0.55em; 136 | font-family: monospace; 137 | line-height: 1.2em; 138 | word-wrap: break-word; 139 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 140 | 141 | .reveal code { 142 | font-family: monospace; } 143 | 144 | .reveal pre code { 145 | display: block; 146 | padding: 5px; 147 | overflow: auto; 148 | max-height: 400px; 149 | word-wrap: normal; 150 | background: #3F3F3F; 151 | color: #DCDCDC; } 152 | 153 | .reveal table { 154 | margin: auto; 155 | border-collapse: collapse; 156 | border-spacing: 0; } 157 | 158 | .reveal table th { 159 | font-weight: bold; } 160 | 161 | .reveal table th, .reveal table td { 162 | text-align: left; 163 | padding: 0.2em 0.5em 0.2em 0.5em; 164 | border-bottom: 1px solid; } 165 | 166 | .reveal table tr:last-child td { 167 | border-bottom: none; } 168 | 169 | .reveal sup { 170 | vertical-align: super; } 171 | 172 | .reveal sub { 173 | vertical-align: sub; } 174 | 175 | .reveal small { 176 | display: inline-block; 177 | font-size: 0.6em; 178 | line-height: 1.2em; 179 | vertical-align: top; } 180 | 181 | .reveal small * { 182 | vertical-align: top; } 183 | 184 | /********************************************* 185 | * LINKS 186 | *********************************************/ 187 | .reveal a { 188 | color: #268bd2; 189 | text-decoration: none; 190 | -webkit-transition: color 0.15s ease; 191 | -moz-transition: color 0.15s ease; 192 | transition: color 0.15s ease; } 193 | 194 | .reveal a:hover { 195 | color: #78bae6; 196 | text-shadow: none; 197 | border: none; } 198 | 199 | .reveal .roll span:after { 200 | color: #fff; 201 | background: #1a6291; } 202 | 203 | /********************************************* 204 | * IMAGES 205 | *********************************************/ 206 | .reveal section img { 207 | margin: 15px 0px; 208 | background: rgba(255, 255, 255, 0.12); 209 | border: 4px solid #657b83; 210 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 211 | 212 | .reveal a img { 213 | -webkit-transition: all 0.15s linear; 214 | -moz-transition: all 0.15s linear; 215 | transition: all 0.15s linear; } 216 | 217 | .reveal a:hover img { 218 | background: rgba(255, 255, 255, 0.2); 219 | border-color: #268bd2; 220 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 221 | 222 | /********************************************* 223 | * NAVIGATION CONTROLS 224 | *********************************************/ 225 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 226 | border-right-color: #268bd2; } 227 | 228 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 229 | border-left-color: #268bd2; } 230 | 231 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 232 | border-bottom-color: #268bd2; } 233 | 234 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 235 | border-top-color: #268bd2; } 236 | 237 | .reveal .controls div.navigate-left.enabled:hover { 238 | border-right-color: #78bae6; } 239 | 240 | .reveal .controls div.navigate-right.enabled:hover { 241 | border-left-color: #78bae6; } 242 | 243 | .reveal .controls div.navigate-up.enabled:hover { 244 | border-bottom-color: #78bae6; } 245 | 246 | .reveal .controls div.navigate-down.enabled:hover { 247 | border-top-color: #78bae6; } 248 | 249 | /********************************************* 250 | * PROGRESS BAR 251 | *********************************************/ 252 | .reveal .progress { 253 | background: rgba(0, 0, 0, 0.2); } 254 | 255 | .reveal .progress span { 256 | background: #268bd2; 257 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 258 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 259 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 260 | 261 | /********************************************* 262 | * SLIDE NUMBER 263 | *********************************************/ 264 | .reveal .slide-number { 265 | color: #268bd2; } 266 | -------------------------------------------------------------------------------- /assets/css/theme/wd.css: -------------------------------------------------------------------------------- 1 | @import url(./white.css); 2 | 3 | @font-face { 4 | font-family: 'iconfont'; 5 | src: url('//at.alicdn.com/t/font_1429589277_537646.eot'); /* IE9*/ 6 | src: url('//at.alicdn.com/t/font_1429589277_537646.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ 7 | url('//at.alicdn.com/t/font_1429589277_537646.woff') format('woff'), /* chrome、firefox */ 8 | url('//at.alicdn.com/t/font_1429589277_537646.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ 9 | url('//at.alicdn.com/t/font_1429589277_537646.svg#iconfont') format('svg'); /* iOS 4.1- */ 10 | } 11 | 12 | [icon] { 13 | position: relative; 14 | display: inline-block; 15 | font-style: normal; 16 | font-weight: normal; 17 | font-variant: normal; 18 | line-height: inherit; 19 | vertical-align: baseline; 20 | text-align: center; 21 | text-transform: none; 22 | -webkit-font-smoothing: antialiased; 23 | -webkit-text-stroke-width: 0px; 24 | -moz-osx-font-smoothing: grayscale; 25 | font-family: sans-serif; 26 | } 27 | 28 | [icon]:before { 29 | display: block; 30 | font-family: "iconfont"!important; 31 | } 32 | 33 | [icon="practice"]:before { content: "\e600"; } 34 | [icon="artical"]:before { content: "\e601"; } 35 | [icon="img"]:before { content: "\e602"; } 36 | [icon="break"]:before { content: "\e603"; } 37 | [icon="break2"]:before { content: "\e604"; } 38 | [icon="correct"]:before { content: "\e605"; } 39 | [icon="wrong"]:before { content: "\e606"; } 40 | [icon="forbbiden"]:before { content: "\e607"; } 41 | [icon="warning"]:before { content: "\e608"; } 42 | [icon="question"]:before { content: "\e609"; } 43 | [icon="lock"]:before { content: "\e60a"; } 44 | [icon="tip"]:before { content: "\e60b"; } 45 | [icon="sample"]:before { content: "\e60c"; } 46 | [icon="html"]:before { content: "\e60d"; } 47 | [icon="css"]:before { content: "\e60e"; } 48 | 49 | .reveal code, 50 | .reveal pre { 51 | font-family: Menlo,Monaco,Consolas,"Courier New",monospace; 52 | } 53 | 54 | .reveal a[show]:before { 55 | font-family: "iconfont"!important; 56 | content: "\e60c"; 57 | padding-right: 15px; 58 | } 59 | 60 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 61 | text-transform: none; } 62 | 63 | -------------------------------------------------------------------------------- /assets/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/img/favicon.ico -------------------------------------------------------------------------------- /assets/img/github-icon-black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /assets/lib/css/railscasts.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Railscasts-like style (c) Visoft, Inc. (Damien White) 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #232323; 12 | color: #e6e1dc; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | .hljs-comment, 17 | .hljs-javadoc, 18 | .hljs-shebang { 19 | color: #bc9458; 20 | font-style: italic; 21 | } 22 | 23 | .hljs-keyword, 24 | .ruby .hljs-function .hljs-keyword, 25 | .hljs-request, 26 | .hljs-status, 27 | .nginx .hljs-title, 28 | .method, 29 | .hljs-list .hljs-title { 30 | color: #c26230; 31 | } 32 | 33 | .hljs-string, 34 | .hljs-number, 35 | .hljs-regexp, 36 | .hljs-tag .hljs-value, 37 | .hljs-cdata, 38 | .hljs-filter .hljs-argument, 39 | .hljs-attr_selector, 40 | .apache .hljs-cbracket, 41 | .hljs-date, 42 | .tex .hljs-command, 43 | .asciidoc .hljs-link_label, 44 | .markdown .hljs-link_label { 45 | color: #a5c261; 46 | } 47 | 48 | .hljs-subst { 49 | color: #519f50; 50 | } 51 | 52 | .hljs-tag, 53 | .hljs-tag .hljs-keyword, 54 | .hljs-tag .hljs-title, 55 | .hljs-doctype, 56 | .hljs-sub .hljs-identifier, 57 | .hljs-pi, 58 | .input_number { 59 | color: #e8bf6a; 60 | } 61 | 62 | .hljs-identifier { 63 | color: #d0d0ff; 64 | } 65 | 66 | .hljs-class .hljs-title, 67 | .hljs-type, 68 | .smalltalk .hljs-class, 69 | .hljs-javadoctag, 70 | .hljs-yardoctag, 71 | .hljs-phpdoc, 72 | .hljs-dartdoc { 73 | text-decoration: none; 74 | } 75 | 76 | .hljs-constant, 77 | .hljs-name { 78 | color: #da4939; 79 | } 80 | 81 | 82 | .hljs-symbol, 83 | .hljs-built_in, 84 | .ruby .hljs-symbol .hljs-string, 85 | .ruby .hljs-symbol .hljs-identifier, 86 | .asciidoc .hljs-link_url, 87 | .markdown .hljs-link_url, 88 | .hljs-attribute { 89 | color: #6d9cbe; 90 | } 91 | 92 | .asciidoc .hljs-link_url, 93 | .markdown .hljs-link_url { 94 | text-decoration: underline; 95 | } 96 | 97 | 98 | 99 | .hljs-params, 100 | .hljs-variable, 101 | .clojure .hljs-attribute { 102 | color: #d0d0ff; 103 | } 104 | 105 | .css .hljs-tag, 106 | .hljs-rule .hljs-property, 107 | .hljs-pseudo, 108 | .tex .hljs-special { 109 | color: #cda869; 110 | } 111 | 112 | .css .hljs-class { 113 | color: #9b703f; 114 | } 115 | 116 | .hljs-rule .hljs-keyword { 117 | color: #c5af75; 118 | } 119 | 120 | .hljs-rule .hljs-value { 121 | color: #cf6a4c; 122 | } 123 | 124 | .css .hljs-id { 125 | color: #8b98ab; 126 | } 127 | 128 | .hljs-annotation, 129 | .apache .hljs-sqbracket, 130 | .nginx .hljs-built_in { 131 | color: #9b859d; 132 | } 133 | 134 | .hljs-preprocessor, 135 | .hljs-preprocessor *, 136 | .hljs-pragma { 137 | color: #8996a8 !important; 138 | } 139 | 140 | .hljs-hexcolor, 141 | .css .hljs-value .hljs-number { 142 | color: #a5c261; 143 | } 144 | 145 | .hljs-title, 146 | .hljs-decorator, 147 | .css .hljs-function { 148 | color: #ffc66d; 149 | } 150 | 151 | .diff .hljs-header, 152 | .hljs-chunk { 153 | background-color: #2f33ab; 154 | color: #e6e1dc; 155 | display: inline-block; 156 | width: 100%; 157 | } 158 | 159 | .diff .hljs-change { 160 | background-color: #4a410d; 161 | color: #f8f8f8; 162 | display: inline-block; 163 | width: 100%; 164 | } 165 | 166 | .hljs-addition { 167 | background-color: #144212; 168 | color: #e6e1dc; 169 | display: inline-block; 170 | width: 100%; 171 | } 172 | 173 | .hljs-deletion { 174 | background-color: #600; 175 | color: #e6e1dc; 176 | display: inline-block; 177 | width: 100%; 178 | } 179 | 180 | .coffeescript .javascript, 181 | .javascript .xml, 182 | .tex .hljs-formula, 183 | .xml .javascript, 184 | .xml .vbscript, 185 | .xml .css, 186 | .xml .hljs-cdata { 187 | opacity: 0.7; 188 | } 189 | -------------------------------------------------------------------------------- /assets/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; padding: 0.5em; 10 | background: #3F3F3F; 11 | color: #DCDCDC; 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-tag, 16 | .css .hljs-class, 17 | .css .hljs-id, 18 | .lisp .hljs-title, 19 | .nginx .hljs-title, 20 | .hljs-request, 21 | .hljs-status, 22 | .clojure .hljs-attribute { 23 | color: #E3CEAB; 24 | } 25 | 26 | .django .hljs-template_tag, 27 | .django .hljs-variable, 28 | .django .hljs-filter .hljs-argument { 29 | color: #DCDCDC; 30 | } 31 | 32 | .hljs-number, 33 | .hljs-date { 34 | color: #8CD0D3; 35 | } 36 | 37 | .dos .hljs-envvar, 38 | .dos .hljs-stream, 39 | .hljs-variable, 40 | .apache .hljs-sqbracket { 41 | color: #EFDCBC; 42 | } 43 | 44 | .dos .hljs-flow, 45 | .diff .hljs-change, 46 | .python .exception, 47 | .python .hljs-built_in, 48 | .hljs-literal, 49 | .tex .hljs-special { 50 | color: #EFEFAF; 51 | } 52 | 53 | .diff .hljs-chunk, 54 | .hljs-subst { 55 | color: #8F8F8F; 56 | } 57 | 58 | .dos .hljs-keyword, 59 | .python .hljs-decorator, 60 | .hljs-title, 61 | .haskell .hljs-type, 62 | .diff .hljs-header, 63 | .ruby .hljs-class .hljs-parent, 64 | .apache .hljs-tag, 65 | .nginx .hljs-built_in, 66 | .tex .hljs-command, 67 | .hljs-prompt { 68 | color: #efef8f; 69 | } 70 | 71 | .dos .hljs-winutils, 72 | .ruby .hljs-symbol, 73 | .ruby .hljs-symbol .hljs-string, 74 | .ruby .hljs-string { 75 | color: #DCA3A3; 76 | } 77 | 78 | .diff .hljs-deletion, 79 | .hljs-string, 80 | .hljs-tag .hljs-value, 81 | .hljs-preprocessor, 82 | .hljs-pragma, 83 | .hljs-built_in, 84 | .sql .hljs-aggregate, 85 | .hljs-javadoc, 86 | .smalltalk .hljs-class, 87 | .smalltalk .hljs-localvars, 88 | .smalltalk .hljs-array, 89 | .css .hljs-rules .hljs-value, 90 | .hljs-attr_selector, 91 | .hljs-pseudo, 92 | .apache .hljs-cbracket, 93 | .tex .hljs-formula, 94 | .coffeescript .hljs-attribute { 95 | color: #CC9393; 96 | } 97 | 98 | .hljs-shebang, 99 | .diff .hljs-addition, 100 | .hljs-comment, 101 | .java .hljs-annotation, 102 | .hljs-template_comment, 103 | .hljs-pi, 104 | .hljs-doctype { 105 | color: #7F9F7F; 106 | } 107 | 108 | .coffeescript .javascript, 109 | .javascript .xml, 110 | .tex .hljs-formula, 111 | .xml .javascript, 112 | .xml .vbscript, 113 | .xml .css, 114 | .xml .hljs-cdata { 115 | opacity: 0.5; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /assets/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /assets/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /assets/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /assets/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /assets/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License 2 | 3 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. 4 | 5 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 6 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 7 | 8 | —————————————————————————————- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | —————————————————————————————- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 14 | 15 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 16 | 17 | DEFINITIONS 18 | “Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 19 | 20 | “Reserved Font Name” refers to any names specified as such after the copyright statement(s). 21 | 22 | “Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s). 23 | 24 | “Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 25 | 26 | “Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 27 | 28 | PERMISSION & CONDITIONS 29 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 30 | 31 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 32 | 33 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 34 | 35 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 36 | 37 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 38 | 39 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 40 | 41 | TERMINATION 42 | This license becomes null and void if any of the above conditions are not met. 43 | 44 | DISCLAIMER 45 | THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/assets/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /assets/lib/font/source-sans-pro/source-sans-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | src: url('source-sans-pro-regular.eot'); 4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'), 5 | url('source-sans-pro-regular.woff') format('woff'), 6 | url('source-sans-pro-regular.ttf') format('truetype'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: 'Source Sans Pro'; 13 | src: url('source-sans-pro-italic.eot'); 14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'), 15 | url('source-sans-pro-italic.woff') format('woff'), 16 | url('source-sans-pro-italic.ttf') format('truetype'); 17 | font-weight: normal; 18 | font-style: italic; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Source Sans Pro'; 23 | src: url('source-sans-pro-semibold.eot'); 24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'), 25 | url('source-sans-pro-semibold.woff') format('woff'), 26 | url('source-sans-pro-semibold.ttf') format('truetype'); 27 | font-weight: 600; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: 'Source Sans Pro'; 33 | src: url('source-sans-pro-semibolditalic.eot'); 34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'), 35 | url('source-sans-pro-semibolditalic.woff') format('woff'), 36 | url('source-sans-pro-semibolditalic.ttf') format('truetype'); 37 | font-weight: 600; 38 | font-style: italic; 39 | } -------------------------------------------------------------------------------- /assets/lib/js/classList.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p 3 | Copyright Tero Piirainen (tipiirai) 4 | License MIT / http://bit.ly/mit-license 5 | Version 0.96 6 | 7 | http://headjs.com 8 | */(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Markdown Demo 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 |
26 | 36 |
37 | 38 | 39 |
40 | 54 |
55 | 56 | 57 |
58 | 69 |
70 | 71 | 72 |
73 | 77 |
78 | 79 | 80 |
81 | 86 |
87 | 88 | 89 |
90 | 100 |
101 | 102 |
103 |
104 | 105 | 106 | 107 | 108 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /assets/plugin/markdown/example.md: -------------------------------------------------------------------------------- 1 | # Markdown Demo 2 | 3 | 4 | 5 | ## External 1.1 6 | 7 | Content 1.1 8 | 9 | Note: This will only appear in the speaker notes window. 10 | 11 | 12 | ## External 1.2 13 | 14 | Content 1.2 15 | 16 | 17 | 18 | ## External 2 19 | 20 | Content 2.1 21 | 22 | 23 | 24 | ## External 3.1 25 | 26 | Content 3.1 27 | 28 | 29 | ## External 3.2 30 | 31 | Content 3.2 32 | -------------------------------------------------------------------------------- /assets/plugin/math/math.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A plugin which enables rendering of math equations inside 3 | * of reveal.js slides. Essentially a thin wrapper for MathJax. 4 | * 5 | * @author Hakim El Hattab 6 | */ 7 | var RevealMath = window.RevealMath || (function(){ 8 | 9 | var options = Reveal.getConfig().math || {}; 10 | options.mathjax = options.mathjax || 'http://cdn.mathjax.org/mathjax/latest/MathJax.js'; 11 | options.config = options.config || 'TeX-AMS_HTML-full'; 12 | 13 | loadScript( options.mathjax + '?config=' + options.config, function() { 14 | 15 | MathJax.Hub.Config({ 16 | messageStyle: 'none', 17 | tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }, 18 | skipStartupTypeset: true 19 | }); 20 | 21 | // Typeset followed by an immediate reveal.js layout since 22 | // the typesetting process could affect slide height 23 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] ); 24 | MathJax.Hub.Queue( Reveal.layout ); 25 | 26 | // Reprocess equations in slides when they turn visible 27 | Reveal.addEventListener( 'slidechanged', function( event ) { 28 | 29 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] ); 30 | 31 | } ); 32 | 33 | } ); 34 | 35 | function loadScript( url, callback ) { 36 | 37 | var head = document.querySelector( 'head' ); 38 | var script = document.createElement( 'script' ); 39 | script.type = 'text/javascript'; 40 | script.src = url; 41 | 42 | // Wrapper for callback to make sure it only fires once 43 | var finish = function() { 44 | if( typeof callback === 'function' ) { 45 | callback.call(); 46 | callback = null; 47 | } 48 | } 49 | 50 | script.onload = finish; 51 | 52 | // IE 53 | script.onreadystatechange = function() { 54 | if ( this.readyState === 'loaded' ) { 55 | finish(); 56 | } 57 | } 58 | 59 | // Normal browsers 60 | head.appendChild( script ); 61 | 62 | } 63 | 64 | })(); 65 | -------------------------------------------------------------------------------- /assets/plugin/multiplex/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var multiplex = Reveal.getConfig().multiplex; 3 | var socketId = multiplex.id; 4 | var socket = io.connect(multiplex.url); 5 | 6 | socket.on(multiplex.id, function(data) { 7 | // ignore data from sockets that aren't ours 8 | if (data.socketId !== socketId) { return; } 9 | if( window.location.host === 'localhost:1947' ) return; 10 | 11 | Reveal.slide(data.indexh, data.indexv, data.indexf, 'remote'); 12 | }); 13 | }()); 14 | -------------------------------------------------------------------------------- /assets/plugin/multiplex/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var fs = require('fs'); 3 | var io = require('socket.io'); 4 | var crypto = require('crypto'); 5 | 6 | var app = express.createServer(); 7 | var staticDir = express.static; 8 | 9 | io = io.listen(app); 10 | 11 | var opts = { 12 | port: 1948, 13 | baseDir : __dirname + '/../../' 14 | }; 15 | 16 | io.sockets.on('connection', function(socket) { 17 | socket.on('slidechanged', function(slideData) { 18 | if (typeof slideData.secret == 'undefined' || slideData.secret == null || slideData.secret === '') return; 19 | if (createHash(slideData.secret) === slideData.socketId) { 20 | slideData.secret = null; 21 | socket.broadcast.emit(slideData.socketId, slideData); 22 | }; 23 | }); 24 | }); 25 | 26 | app.configure(function() { 27 | [ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) { 28 | app.use('/' + dir, staticDir(opts.baseDir + dir)); 29 | }); 30 | }); 31 | 32 | app.get("/", function(req, res) { 33 | res.writeHead(200, {'Content-Type': 'text/html'}); 34 | fs.createReadStream(opts.baseDir + '/index.html').pipe(res); 35 | }); 36 | 37 | app.get("/token", function(req,res) { 38 | var ts = new Date().getTime(); 39 | var rand = Math.floor(Math.random()*9999999); 40 | var secret = ts.toString() + rand.toString(); 41 | res.send({secret: secret, socketId: createHash(secret)}); 42 | }); 43 | 44 | var createHash = function(secret) { 45 | var cipher = crypto.createCipher('blowfish', secret); 46 | return(cipher.final('hex')); 47 | }; 48 | 49 | // Actually listen 50 | app.listen(opts.port || null); 51 | 52 | var brown = '\033[33m', 53 | green = '\033[32m', 54 | reset = '\033[0m'; 55 | 56 | console.log( brown + "reveal.js:" + reset + " Multiplex running on port " + green + opts.port + reset ); -------------------------------------------------------------------------------- /assets/plugin/multiplex/master.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | // Don't emit events from inside of notes windows 3 | if ( window.location.search.match( /receiver/gi ) ) { return; } 4 | 5 | var multiplex = Reveal.getConfig().multiplex; 6 | 7 | var socket = io.connect(multiplex.url); 8 | 9 | var notify = function( slideElement, indexh, indexv, origin ) { 10 | if( typeof origin === 'undefined' && origin !== 'remote' ) { 11 | var nextindexh; 12 | var nextindexv; 13 | 14 | var fragmentindex = Reveal.getIndices().f; 15 | if (typeof fragmentindex == 'undefined') { 16 | fragmentindex = 0; 17 | } 18 | 19 | if (slideElement.nextElementSibling && slideElement.parentNode.nodeName == 'SECTION') { 20 | nextindexh = indexh; 21 | nextindexv = indexv + 1; 22 | } else { 23 | nextindexh = indexh + 1; 24 | nextindexv = 0; 25 | } 26 | 27 | var slideData = { 28 | indexh : indexh, 29 | indexv : indexv, 30 | indexf : fragmentindex, 31 | nextindexh : nextindexh, 32 | nextindexv : nextindexv, 33 | secret: multiplex.secret, 34 | socketId : multiplex.id 35 | }; 36 | 37 | socket.emit('slidechanged', slideData); 38 | } 39 | } 40 | 41 | Reveal.addEventListener( 'slidechanged', function( event ) { 42 | notify( event.currentSlide, event.indexh, event.indexv, event.origin ); 43 | } ); 44 | 45 | var fragmentNotify = function( event ) { 46 | notify( Reveal.getCurrentSlide(), Reveal.getIndices().h, Reveal.getIndices().v, event.origin ); 47 | }; 48 | 49 | Reveal.addEventListener( 'fragmentshown', fragmentNotify ); 50 | Reveal.addEventListener( 'fragmenthidden', fragmentNotify ); 51 | }()); -------------------------------------------------------------------------------- /assets/plugin/notes-server/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // don't emit events from inside the previews themselves 4 | if( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var socket = io.connect( window.location.origin ), 7 | socketId = Math.random().toString().slice( 2 ); 8 | 9 | console.log( 'View slide notes at ' + window.location.origin + '/notes/' + socketId ); 10 | 11 | window.open( window.location.origin + '/notes/' + socketId, 'notes-' + socketId ); 12 | 13 | /** 14 | * Posts the current slide data to the notes window 15 | */ 16 | function post() { 17 | 18 | var slideElement = Reveal.getCurrentSlide(), 19 | notesElement = slideElement.querySelector( 'aside.notes' ); 20 | 21 | var messageData = { 22 | notes: '', 23 | markdown: false, 24 | socketId: socketId, 25 | state: Reveal.getState() 26 | }; 27 | 28 | // Look for notes defined in a slide attribute 29 | if( slideElement.hasAttribute( 'data-notes' ) ) { 30 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 31 | } 32 | 33 | // Look for notes defined in an aside element 34 | if( notesElement ) { 35 | messageData.notes = notesElement.innerHTML; 36 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 37 | } 38 | 39 | socket.emit( 'statechanged', messageData ); 40 | 41 | } 42 | 43 | // When a new notes window connects, post our current state 44 | socket.on( 'connect', function( data ) { 45 | post(); 46 | } ); 47 | 48 | // Monitor events that trigger a change in state 49 | Reveal.addEventListener( 'slidechanged', post ); 50 | Reveal.addEventListener( 'fragmentshown', post ); 51 | Reveal.addEventListener( 'fragmenthidden', post ); 52 | Reveal.addEventListener( 'overviewhidden', post ); 53 | Reveal.addEventListener( 'overviewshown', post ); 54 | Reveal.addEventListener( 'paused', post ); 55 | Reveal.addEventListener( 'resumed', post ); 56 | 57 | // Post the initial state 58 | post(); 59 | 60 | }()); 61 | -------------------------------------------------------------------------------- /assets/plugin/notes-server/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var fs = require('fs'); 3 | var io = require('socket.io'); 4 | var _ = require('underscore'); 5 | var Mustache = require('mustache'); 6 | 7 | var app = express.createServer(); 8 | var staticDir = express.static; 9 | 10 | io = io.listen(app); 11 | 12 | var opts = { 13 | port : 1947, 14 | baseDir : __dirname + '/../../' 15 | }; 16 | 17 | io.sockets.on( 'connection', function( socket ) { 18 | 19 | socket.on( 'connect', function( data ) { 20 | socket.broadcast.emit( 'connect', data ); 21 | }); 22 | 23 | socket.on( 'statechanged', function( data ) { 24 | socket.broadcast.emit( 'statechanged', data ); 25 | }); 26 | 27 | }); 28 | 29 | app.configure( function() { 30 | 31 | [ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) { 32 | app.use( '/' + dir, staticDir( opts.baseDir + dir ) ); 33 | }); 34 | 35 | }); 36 | 37 | app.get('/', function( req, res ) { 38 | 39 | res.writeHead( 200, { 'Content-Type': 'text/html' } ); 40 | fs.createReadStream( opts.baseDir + '/index.html' ).pipe( res ); 41 | 42 | }); 43 | 44 | app.get( '/notes/:socketId', function( req, res ) { 45 | 46 | fs.readFile( opts.baseDir + 'plugin/notes-server/notes.html', function( err, data ) { 47 | res.send( Mustache.to_html( data.toString(), { 48 | socketId : req.params.socketId 49 | })); 50 | }); 51 | 52 | }); 53 | 54 | // Actually listen 55 | app.listen( opts.port || null ); 56 | 57 | var brown = '\033[33m', 58 | green = '\033[32m', 59 | reset = '\033[0m'; 60 | 61 | var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : '' ); 62 | 63 | console.log( brown + 'reveal.js - Speaker Notes' + reset ); 64 | console.log( '1. Open the slides at ' + green + slidesLocation + reset ); 65 | console.log( '2. Click on the link your JS console to go to the notes page' ); 66 | console.log( '3. Advance through your slides and your notes will advance automatically' ); 67 | -------------------------------------------------------------------------------- /assets/plugin/notes/notes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Handles opening of and synchronization with the reveal.js 3 | * notes window. 4 | * 5 | * Handshake process: 6 | * 1. This window posts 'connect' to notes window 7 | * - Includes URL of presentation to show 8 | * 2. Notes window responds with 'connected' when it is available 9 | * 3. This window proceeds to send the current presentation state 10 | * to the notes window 11 | */ 12 | var RevealNotes = (function() { 13 | 14 | function openNotes() { 15 | var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path 16 | jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path 17 | var notesPopup = window.open( jsFileLocation + 'notes.html', 'reveal.js - Notes', 'width=1100,height=700' ); 18 | 19 | /** 20 | * Connect to the notes window through a postmessage handshake. 21 | * Using postmessage enables us to work in situations where the 22 | * origins differ, such as a presentation being opened from the 23 | * file system. 24 | */ 25 | function connect() { 26 | // Keep trying to connect until we get a 'connected' message back 27 | var connectInterval = setInterval( function() { 28 | notesPopup.postMessage( JSON.stringify( { 29 | namespace: 'reveal-notes', 30 | type: 'connect', 31 | url: window.location.protocol + '//' + window.location.host + window.location.pathname, 32 | state: Reveal.getState() 33 | } ), '*' ); 34 | }, 500 ); 35 | 36 | window.addEventListener( 'message', function( event ) { 37 | var data = JSON.parse( event.data ); 38 | if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) { 39 | clearInterval( connectInterval ); 40 | onConnected(); 41 | } 42 | } ); 43 | } 44 | 45 | /** 46 | * Posts the current slide data to the notes window 47 | */ 48 | function post() { 49 | 50 | var slideElement = Reveal.getCurrentSlide(), 51 | notesElement = slideElement.querySelector( 'aside.notes' ); 52 | 53 | var messageData = { 54 | namespace: 'reveal-notes', 55 | type: 'state', 56 | notes: '', 57 | markdown: false, 58 | state: Reveal.getState() 59 | }; 60 | 61 | // Look for notes defined in a slide attribute 62 | if( slideElement.hasAttribute( 'data-notes' ) ) { 63 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 64 | } 65 | 66 | // Look for notes defined in an aside element 67 | if( notesElement ) { 68 | messageData.notes = notesElement.innerHTML; 69 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 70 | } 71 | 72 | notesPopup.postMessage( JSON.stringify( messageData ), '*' ); 73 | 74 | } 75 | 76 | /** 77 | * Called once we have established a connection to the notes 78 | * window. 79 | */ 80 | function onConnected() { 81 | 82 | // Monitor events that trigger a change in state 83 | Reveal.addEventListener( 'slidechanged', post ); 84 | Reveal.addEventListener( 'fragmentshown', post ); 85 | Reveal.addEventListener( 'fragmenthidden', post ); 86 | Reveal.addEventListener( 'overviewhidden', post ); 87 | Reveal.addEventListener( 'overviewshown', post ); 88 | Reveal.addEventListener( 'paused', post ); 89 | Reveal.addEventListener( 'resumed', post ); 90 | 91 | // Post the initial state 92 | post(); 93 | 94 | } 95 | 96 | connect(); 97 | } 98 | 99 | if( !/receiver/i.test( window.location.search ) ) { 100 | 101 | // If the there's a 'notes' query set, open directly 102 | if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) { 103 | openNotes(); 104 | } 105 | 106 | // Open the notes when the 's' key is hit 107 | document.addEventListener( 'keydown', function( event ) { 108 | // Disregard the event if the target is editable or a 109 | // modifier is present 110 | if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return; 111 | 112 | if( event.keyCode === 83 ) { 113 | event.preventDefault(); 114 | openNotes(); 115 | } 116 | }, false ); 117 | 118 | } 119 | 120 | return { open: openNotes }; 121 | 122 | })(); 123 | -------------------------------------------------------------------------------- /assets/plugin/print-pdf/print-pdf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * phantomjs script for printing presentations to PDF. 3 | * 4 | * Example: 5 | * phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf 6 | * 7 | * By Manuel Bieh (https://github.com/manuelbieh) 8 | */ 9 | 10 | // html2pdf.js 11 | var page = new WebPage(); 12 | var system = require( 'system' ); 13 | 14 | var slideWidth = system.args[3] ? system.args[3].split( 'x' )[0] : 960; 15 | var slideHeight = system.args[3] ? system.args[3].split( 'x' )[1] : 700; 16 | 17 | page.viewportSize = { 18 | width: slideWidth, 19 | height: slideHeight 20 | }; 21 | 22 | // TODO 23 | // Something is wrong with these config values. An input 24 | // paper width of 1920px actually results in a 756px wide 25 | // PDF. 26 | page.paperSize = { 27 | width: Math.round( slideWidth * 2 ), 28 | height: Math.round( slideHeight * 2 ), 29 | border: 0 30 | }; 31 | 32 | var inputFile = system.args[1] || 'index.html?print-pdf'; 33 | var outputFile = system.args[2] || 'slides.pdf'; 34 | 35 | if( outputFile.match( /\.pdf$/gi ) === null ) { 36 | outputFile += '.pdf'; 37 | } 38 | 39 | console.log( 'Printing PDF (Paper size: '+ page.paperSize.width + 'x' + page.paperSize.height +')' ); 40 | 41 | page.open( inputFile, function( status ) { 42 | window.setTimeout( function() { 43 | console.log( 'Printed succesfully' ); 44 | page.render( outputFile ); 45 | phantom.exit(); 46 | }, 1000 ); 47 | } ); 48 | 49 | -------------------------------------------------------------------------------- /assets/plugin/remotes/remotes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Touch-based remote controller for your presentation courtesy 3 | * of the folks at http://remotes.io 4 | */ 5 | 6 | (function(window){ 7 | 8 | /** 9 | * Detects if we are dealing with a touch enabled device (with some false positives) 10 | * Borrowed from modernizr: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touch.js 11 | */ 12 | var hasTouch = (function(){ 13 | return ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch; 14 | })(); 15 | 16 | /** 17 | * Detects if notes are enable and the current page is opened inside an /iframe 18 | * this prevents loading Remotes.io several times 19 | */ 20 | var isNotesAndIframe = (function(){ 21 | return window.RevealNotes && !(self == top); 22 | })(); 23 | 24 | if(!hasTouch && !isNotesAndIframe){ 25 | head.ready( 'remotes.ne.min.js', function() { 26 | new Remotes("preview") 27 | .on("swipe-left", function(e){ Reveal.right(); }) 28 | .on("swipe-right", function(e){ Reveal.left(); }) 29 | .on("swipe-up", function(e){ Reveal.down(); }) 30 | .on("swipe-down", function(e){ Reveal.up(); }) 31 | .on("tap", function(e){ Reveal.next(); }) 32 | .on("zoom-out", function(e){ Reveal.toggleOverview(true); }) 33 | .on("zoom-in", function(e){ Reveal.toggleOverview(false); }) 34 | ; 35 | } ); 36 | 37 | head.js('https://hakim-static.s3.amazonaws.com/reveal-js/remotes.ne.min.js'); 38 | } 39 | })(window); -------------------------------------------------------------------------------- /build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | 6 | const template = fs.readFileSync('./README.md', 'utf8'); 7 | 8 | const targetDir = path.join(__dirname, 'archives'); 9 | const list = fs 10 | .readdirSync(targetDir) 11 | .filter(dir => fs.statSync(path.resolve(targetDir, dir)).isDirectory()) 12 | .map(item => `- [${item}](./archives/${item})`); 13 | 14 | const res = template.replace(/[\s\S]*/, `\n${list.join('\n')}\n`); 15 | 16 | fs.writeFileSync('./README.md', res); 17 | -------------------------------------------------------------------------------- /keynote/大前端测试的思考和在语雀的实践.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/keynote/大前端测试的思考和在语雀的实践.key -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "slide", 3 | "version": "1.0.0", 4 | "description": "slide", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/xudafeng/slide.git" 8 | }, 9 | "devDependencies": { 10 | "husky": "^3.0.5", 11 | "startserver": "*" 12 | }, 13 | "husky": { 14 | "hooks": { 15 | "pre-commit": "npm run pre-commit" 16 | } 17 | }, 18 | "scripts": { 19 | "pre-commit": "npm run build", 20 | "build": "node ./build.js", 21 | "server": "startserver -p 8081 -s" 22 | }, 23 | "license": "MIT" 24 | } 25 | -------------------------------------------------------------------------------- /pdf/D2-面向未来的 AI 研发和前端领域大模型-达峰.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/pdf/D2-面向未来的 AI 研发和前端领域大模型-达峰.pdf -------------------------------------------------------------------------------- /pdf/README.md: -------------------------------------------------------------------------------- 1 | https://mp.weixin.qq.com/s/XgJktDMKiXWZF5spNUgP4w -------------------------------------------------------------------------------- /pdf/WeaveFox智能研发体系设计与企业实践-0415.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xudafeng/slide/a073eb995a6f30c7949fdb1ef67be5f92a1f2a41/pdf/WeaveFox智能研发体系设计与企业实践-0415.pdf --------------------------------------------------------------------------------