/^(13\d|14[579]|15[^4\D]|166|17[^49\D]|18\d|19[89])\d{8}$/
/^\s*([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,20})\s*$/
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| var setSize = function() { | |
| var vpMeta = document.createElement("meta"); | |
| var meta = document.querySelector('meta[name="viewport"]'); | |
| var nowFont = window.getComputedStyle(document.documentElement, null).fontSize; | |
| nowFont = +nowFont.slice(0,nowFont.length-2); | |
| var normalW = window.screen.availWidth; | |
| var normalFont = (normalW/100)*13.33; | |
| var dpr; | |
| if(nowFont != normalFont) { | |
| if(nowFont > normalFont) { |
| const promisify = (func, ctx)=> { | |
| return () => { | |
| const ctx = ctx || this; | |
| return new Promise((resolve, reject) => { | |
| func.call(ctx, ...arguments, () => { | |
| const args = Array.prototype.slice.call(ctx); | |
| const err = args.shift(); | |
| if(err) { | |
| reject(err); | |
| }else { |
| var a = document.getElementById("eq").offsetTop; | |
| if (a >= $(window).scrollTop() && a < ($(window).scrollTop()+$(window).height())) { | |
| alert("div在可视范围"); | |
| } |
| { | |
| "editor.tabSize": 2, | |
| "beautify.tabSize": 2, | |
| "editor.fontSize": 14, | |
| "editor.codeLens": true, | |
| "editor.dragAndDrop": true, | |
| "editor.renderIndentGuides": false, | |
| "window.zoomLevel": 0, | |
| "vsicons.projectDetection.autoReload": true, | |
| "editor.minimap.enabled": true, |
| <script> | |
| var dpr = window.devicePixelRatio; | |
| var vpMeta = document.createElement("meta"); | |
| var meta = document.querySelector('meta[name="viewport"]'); | |
| if(meta){ | |
| meta.setAttribute('content', 'initial-scale=' + 1/dpr + ',user-scalable=no'); | |
| }else { | |
| vpMeta.setAttribute('name', 'viewport'); | |
| vpMeta.setAttribute('content', 'initial-scale=' + 1/dpr + ',user-scalable=no'); | |
| document.documentElement.firstElementChild.appendChild(vpMeta); |
| module.exports = { | |
| debug: true, | |
| port: 8080, | |
| proxy: { // webpack dev | |
| target: "http://localhost:8080/" | |
| } | |
| }; |
| const Utils = {}; | |
| Utils.install = function (Vue) { | |
| Vue.prototype.$axios = axios; | |
| Vue.prototype.sendAjax = function (METHOD, URL, DATA, CALLBACK) { | |
| const _this = this; | |
| this.$axios({ | |
| method: METHOD, | |
| url: "/api/v1" + URL, | |
| data: DATA |
注入iframe
var iframe = document.createElement("iframe");
iframe.src = "http://www.planabc.net";
if (iframe.attachEvent){
iframe.attachEvent("onload", function(){
alert("Local iframe is now loaded.");
});
} else {