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
<?xml version="1.0" encoding="UTF-8"?> | |
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
<!-- <localRepository>/opt/devtools/maven/repo</localRepository> --> | |
<!-- DO NOT USE relative path with maven wrapper --> | |
<localRepository>~/.m2/repository</localRepository> | |
<mirrors> | |
<mirror> | |
<id>maven-aliyun-mirror</id> |
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
node { | |
try { | |
stage('common build stage'){ | |
echo 'build ...' | |
} | |
currentBuild.result = "SUCCESS" | |
} catch(e) { | |
currentBuild.result = "FAIL" | |
} | |
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
# Copy and self modified from xxf | |
# Machine name. | |
function box_name { | |
[ -f ~/.box-name ] && cat ~/.box-name || echo $HOST | |
} | |
function exists { | |
command -v $1 >/dev/null 2>&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
# execute after hexo g; | |
# if you are use macos, use gsed instead sed(brew install gnu-sed); | |
find public -type f -name *.html -exec sed -i '/^[[:space:]]*$/d' {} + |
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
// 在图标集合页面控制台执行,eg. https://www.iconfont.cn/collections/detail?cid=15699 | |
var event = new MouseEvent('click', { | |
'view': window, | |
'bubbles': true, | |
'cancelable': true | |
}); | |
var list = $("#magix_vf_main > div.wrap > div.page-collection-detail-wrap > div.collection-detail > ul").children; | |
[].forEach.call(list, function(el) { | |
el.children[2].children[0].dispatchEvent(event); | |
}); |
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
package main | |
import ( | |
"fmt" | |
"github.com/go-vgo/robotgo" | |
"strings" | |
"time" | |
) | |
func main() { |
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
@Configuration | |
class RestTemplateConfig { | |
@Bean | |
fun restTemplate(builder: RestTemplateBuilder): RestTemplate { | |
return builder.requestFactory { | |
val trustAllCerts: Array<TrustManager> = arrayOf(object : X509TrustManager { | |
override fun checkClientTrusted(chain: Array<out X509Certificate>?, authType: String?) { | |
} | |
override fun checkServerTrusted(chain: Array<out X509Certificate>?, authType: String?) { |
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 | |
# | |
# tcpping: test response times using TCP SYN packets | |
# URL: http://www.vdberg.org/~richard/tcpping.html | |
# | |
# uses tcptraceroute from http://michael.toren.net/code/tcptraceroute/ | |
# | |
# (c) 2002-2005 Richard van den Berg <[email protected]> under the GPL | |
# http://www.gnu.org/copyleft/gpl.html | |
# |
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 | |
# ios ish setup | |
# wget -qO - http://10.64.60.244:9000/setup.sh | sh | |
# 文件/文本加密: | |
# echo "this is a secret." | openssl enc -e -des3 -base64 -pbkdf2 -A | |
# cat ~/.ssh/id_rsa_vps | openssl enc -e -des3 -base64 -pbkdf2 -A | |
printf "1. 更换镜像源...\n" | |
mirror=$(sed -e 's/https:\/\/\(.*\)\/alpine.*/\1/' /etc/apk/repositories | uniq) | |
newMirror="mirrors.tuna.tsinghua.edu.cn" |
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
function removeAttributes(node) { | |
if(!node.attributes) { | |
return; | |
} | |
for (var i = node.attributes.length - 1; i >= 0; i--) { | |
node.removeAttribute(node.attributes[i].name); | |
} | |
// 对于元素节点,递归处理其子节点 | |
if (node.nodeType === Node.ELEMENT_NODE) { | |
for (var child of node.childNodes) { |
OlderNewer