每次不小心按错快捷键,桌面图标被放大,导致文件顺序全乱,所以配置了个组合规则直接把 command -
和 command =
替换为 fn
键。
This file contains 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
/** @type {import('@vue/cli-service').ProjectOptions} */ | |
module.exports = { | |
chainWebpack(config) { | |
// https://bootstrap-vue.js.org/docs/reference/images/ | |
// https://github.com/webpack-contrib/html-loader | |
config.module | |
.rule('vue') | |
.use('vue-loader') | |
.loader('vue-loader') | |
.tap((options) => { |
This file contains 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
for i in $( docker images --format "{{.Repository}}:{{.Tag}}" ) | |
do | |
docker pull $i | |
done | |
# or | |
# docker images --format "{{.Repository}}:{{.Tag}}" | xargs -L1 docker pull | |
docker image prune -f |
This file contains 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
/** | |
* Get the user IP throught the webkitRTCPeerConnection | |
* | |
* @return {Promise<string>} | |
* | |
* @see Get the client IP address with Javascript on Safari {@link https://stackoverflow.com/questions/46925857/get-the-client-ip-address-with-javascript-on-safari} | |
*/ | |
function getUserIP() { | |
//compatibility for firefox and chrome | |
var myPeerConnection = |
This file contains 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
/** | |
* 倒计时处理方法 (精确时间处理) | |
* | |
* @param {Number} seconds 剩余秒数/时间戳 | |
* @param {Function} callback 回调函数 | |
* @param {Boolean} timeStamp 是否时间戳 | |
* | |
* 使用例子 | |
* | |
* // 情况1:后台给的是倒计时 秒 |
This file contains 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
#!/bin/sh | |
# | |
# git autodeploy script when it matches the string "[deploy]" | |
# | |
# @author icyleaf <[email protected]> | |
# @link http://icyleaf.com | |
# @version 0.1 | |
# | |
# Usage: | |
# 1. put this into the post-receive hook file itself below |
This file contains 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
// <audio src="bg.mp3" id="media" autoplay loop preload="auto"></audio> | |
var player = document.getElementById('media'); | |
player.play(); | |
// iphone 下要监听 WeixinJSBridgeReady 事件 | |
document.addEventListener('WeixinJSBridgeReady', function () { | |
player.play(); | |
}, false); |
This file contains 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 opener = parent.window.opener; | |
opener && (opener.location='http://www.baidu.com/'); |
This file contains 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
假设你有3个commit如下: | |
commit 3 | |
commit 2 | |
commit 1 | |
其中最后一次提交commit 3是错误的,那么可以执行: | |
git reset --hard HEAD~1 | |
你会发现,HEAD is now at commit 2。 |
This file contains 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 s = performance.now(); | |
/** | |
* Copyright (c) 2014-2015, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
*/ | |
(function () { 'use strict';var SLICE$0 = Array.prototype.slice; |
NewerOlder