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
## use ssh proxy github.com on linux/ubuntu/mac os/ windows . | |
# A highest way to get resource from github.com | |
A local host (git client),B is jumpserver(can fastest get resource from Github),C is Github host 。 | |
by using ssh forward ,A could tunnel B to get C,so we can fastest get resource from Github。 |
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
ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime |
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 | |
title=$1 | |
messageUrl=$2 | |
picUrl=$4 | |
text=$3 | |
PHONE="158215*****" | |
TOKEN=$5 | |
DING="curl -H \"Content-Type: application/json\" -X POST --data '{\"msgtype\": \"link\", \"link\": {\"messageUrl\": \"${messageUrl}\", \"title\": \"${title}\", \"picUrl\": \"${picUrl}\", \"text\": \"${text}\",}, \"at\": {\"atMobiles\": [${PHONE}], \"isAtAll\": false}}' ${TOKEN}" | |
eval $DING |
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 { | |
stage('Parallel Stage') { | |
parallel 'test02': { | |
def remote = [:] | |
remote.name = "test01" | |
remote.host = "host" | |
remote.port = port | |
remote.allowAnyHosts = true | |
withCredentials([sshUserPrivateKey(credentialsId: 'louis', keyFileVariable: 'identity', passphraseVariable: 'passphrase', usernameVariable: 'username')]) { | |
remote.user = username |
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 sort | |
type Sorter interface{ | |
Len() int | |
Less(i, j int) bool | |
Swap(i, j int) | |
} | |
func Sort(data Sorter) { | |
for i:=1; i<=data.Len(); i++{ | |
for j:=0; j<=data.len()-i; j++{ |