This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Demo: https://jsfiddle.net/elky/f6khaf2t/ | |
| <div class="element"> | |
| <div class="truncate"> | |
| Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | |
| ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco | |
| laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in | |
| voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat | |
| non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # one or the other, NOT both | |
| [url "https://github"] | |
| insteadOf = git://github | |
| # or | |
| [url "git@github.com:"] | |
| insteadOf = git://github |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm set registry https://registry.npm.taobao.org # 注册模块镜像 | |
| npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像 | |
| ## 以下选择添加 | |
| npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二进制包镜像 | |
| npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二进制包镜像 | |
| npm set puppeteer_download_host https://npm.taobao.org/mirrors # puppeteer 二进制包镜像 | |
| npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver # chromedriver 二进制包镜像 | |
| npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver # operadriver 二进制包镜像 | |
| npm set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs # phantomjs 二进制包镜像 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var cheerio = require("cheerio"), | |
| fs = require("fs"); | |
| fs.readFile('bookmarks.html', "utf-8", function read(err, data) { | |
| if (err) { | |
| throw err; | |
| } | |
| var $ = cheerio.load(data); | |
| $("a").each(function(index, a) { |