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
| ; | |
| (function(win) { | |
| var doc = win.document; | |
| var docEl = doc.documentElement; | |
| var tid; | |
| function refreshRem() { | |
| var width = docEl.getBoundingClientRect().width; | |
| if (width > 540) { // 最大宽度 | |
| width = 540; |
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
| let step1 = () => { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => { | |
| console.log('in step1'); | |
| resolve(1); | |
| // reject(new Error('error from step1')); | |
| }, 1000) | |
| }) | |
| } |
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 url = 'https://gist.github.com/cold-coder/4e60e31d254e921255d37874c302bd48'; | |
| const guys2017 = ['*晓悦', '*亚玲', '*佳', '*芽琦', '*范贤', '*奕', '*俊余', '*国迁', | |
| '*晓炜', '*bing', '*乐琦', '*晓婷', '*达嵩', '*明明', '*伟中', '*志强', '*建华', | |
| '*慧', '*伟锋', '*传萍', '*霞琴', '*晶晶', '*利华', '*华', '*苗', '*玉娇','*亚松', | |
| '*亮萍']; | |
| const guys2018 = ['*晴怡','Allen','*永成','Rain','*志强','Mira','Jonathan','Rachel', | |
| '*霞琴', '*国迁', '*帆', '*才标', '*俊杰', 'Angela', '*浩宁', '*艳敏','*佳宝', | |
| 'chen洁', '*婧', '*承其', '*赛', '*成庆', '*杰', '*奇', '*小静','*成', 'chu洁', |
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
| let o = {a:'123',b:'456'} | |
| let f = ({ a }) => { | |
| console.log(a) | |
| return 0 | |
| } | |
| f(o) //123 |
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
| jquery*.js |
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
| // require('dns').resolve('book.douban.com', function(err) { | |
| // if (err){ | |
| // console.log('Oops! Cannot access Douban'); | |
| // } | |
| // else{ | |
| // console.log('Have Internet Access'); | |
| // } | |
| // }); | |
| require('http').get("book.douban.com", function(res) { |
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 multer = require('multer'); | |
| var storage = multer.diskStorage({ | |
| destination: function (req, file, cb) { | |
| cb(null, 'public/img/'); | |
| }, | |
| filename: function (req, file, cb) { | |
| cb(null, file.originalname + Date.now().toString().slice(0,10)); | |
| } | |
| }) |
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
| Select all and delete (actually move to buffer) | |
| :%d | |
| Select all and copy to buffer | |
| :%y | |
| Use p to paste the buffer. |
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
| *{font-family: Georgia, "Times New Roman", "Microsoft YaHei", "微软雅黑", STXihei, "华文细黑", serif;} | |
| .WB_feed a.notes {margin: 20px 20px 5px !important;padding: 10px 1px;} | |
| .WB_feed a.notes:hover {background-color:#F7F3C6 !important;text-decoration:none !important;} |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
| <title></title> | |
| <style> | |
| html{ | |
| height: 100%; | |
| } | |
| body{ |
NewerOlder