-
/etc/environment
-
/etc/profile.d/proxy.sh
View karabiner_switch_input_source.json
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
{ | |
"title": "Switch input source | 输入法切换", | |
"rules": [ | |
{ | |
"description": "Tap Command_L (⌘) → Switch input source to English | 短按左 Command (⌘) → 切换到英文输入法", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"input_sources": [ |
View vagrant.md
View list_open_ports.md
MacOS
lsof -Pn -i4 | grep LISTEN
其中,-P
表示显示IP而不是hostname, -n
表示显示端口号而不是端口对应的程序名。-i
用于匹配对应选项的网络地址,-i4
表示匹配IPV4
相关网络地址。
Linux
View pipeline_example.md
Jenkins Pipeline 简介
Jenkins Pipeline (or simply "Pipeline") provides an extensible set of tools for modeling simple-to-complex delivery pipelines "as code"
. The definition of a Jenkins Pipeline is typically written into a text file (called a Jenkinsfile
) which in turn is checked into a project’s source control repository.
Pipeline 定义
- Declarative Pipeline
- Scripted Pipeline (a limited form of Groovy)
Both are DSLs to describe portions of your software delivery pipeline.
View config
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
Host ubuntu | |
Hostname localhost | |
Port 2222 | |
User vagrant | |
IdentityFile ~/vagrant/ubuntu1604/.vagrant/machines/default/virtualbox/private_key | |
RemoteForward 1080 localhost:1080 |
View Jenkinsfile
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
pipeline { | |
agent { node { label 'swarm-ci' } } | |
environment { | |
TEST_PREFIX = "test-IMAGE" | |
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}" | |
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}" | |
REGISTRY_ADDRESS = "my.registry.address.com" | |
SLACK_CHANNEL = "#deployment-notifications" |
View jenkins-pipeline-declarative.groovy
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
// vi: ft=groovy | |
pipeline { | |
agent any | |
environment { | |
manager = 'Jack' | |
} | |
stages { |
View pipeline-script.groovy
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('test') { | |
withEnv(['book=abc, number=123']) { | |
sh 'env' | |
book_number = sh(returnStdout: true, script: '''echo ${book}-${number}''') | |
echo "book number is ${book_number}" | |
println "book number string length is ${book_number.length()}" | |
book_number = book_number.trim() | |
println "book number string length after trim is ${book_number.length()}" |
View vscode-keybindings.json
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
[ | |
{ | |
"key": "tab", | |
"command": "selectNextSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" | |
}, | |
{ | |
"key": "shift+tab", | |
"command": "selectPrevSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" |
View update_gfwlist.sh
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/bash | |
# update_gfwlist.sh | |
# Author : VincentSit | |
# Copyright (c) http://xuexuefeng.com | |
# | |
# Example usage | |
# | |
# ./whatever-you-name-this.sh | |
# | |
# Task Scheduling (Optional) |
NewerOlder