This file contains hidden or 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
| git config --global url."https://github.com/".insteadOf [email protected] |
This file contains hidden or 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
| 1) Edit /etc/ssh/sshd_config | |
| 2) Add below so that sshd listens on both port 22 and 443 | |
| Port 22 | |
| Port 443 | |
| 3) Load config and restart service | |
| sudo service sshd reload | |
| sudo service sshd restart |
This file contains hidden or 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
| rsync -am --include='config.xml' --include='*/' --exclude='*' Source/ Destination/ |
This file contains hidden or 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
| Install .NET from command line | |
| DISM /Online /Enable-Feature /FeatureName:NetFx3 /All |
This file contains hidden or 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
| 1) Overide entry point of docker image | |
| docker run -ti --entrypoint=/bin/bash my/image -s |
This file contains hidden or 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
| import hudson.model.* | |
| import hudson.model.labels.LabelAtom | |
| updateJenkinsLabel(Hudson.instance.items,"<Replace With Old Label>", "<Replace With new Label") | |
| def updateJenkinsLabel(items, oldLabel, newLabel) { | |
| for (item in items) { | |
| // Find out if it is a folder | |
| if (item.class.canonicalName != 'com.cloudbees.hudson.plugins.folder.Folder') { |
This file contains hidden or 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
| import hudson.model.* | |
| disableChildren(Hudson.instance.items) | |
| def disableChildren(items) { | |
| def daysToKeep = 14 | |
| def numToKeep = 10 | |
| def artifactDaysToKeep = -1 | |
| def artifactNumToKeep = -1 |
This file contains hidden or 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
| 1) http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html | |
| 2) Jenkins SSH slaves | |
| https://docs.google.com/document/d/1Qq-EkiUnC5x8BuM4AZWo-yRUQTrkberzz8JfdCM6yuc/edit | |
| 3) http://techblog.roomkey.com/posts/too-many-files.html |
This file contains hidden or 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
| 1) Linux. Artifactory start/stop | |
| # To Start | |
| $ARTIFACTORY_HOME/bin/artifactory.sh (concole) | |
| $ARTIFACTORY_HOME/bin/artifactoryctl start (daemon) | |
| $ARTIFACTORY_HOME/bin/installService.sh [USER [GROUP]] (service) | |
| $ARTIFACTORY_HOME/bin/artifactoryctl check | stop | |
| 2) Install script | |
| Creates the folder /etc/opt/jfrog/artifactory, copies the configuration files there and creates a soft link in$ARTIFACTORY_HOME/etc |
This file contains hidden or 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
| import hudson.model.* | |
| def q = Jenkins.instance.queue | |
| q.items.findAll { it.task.name.startsWith('my') }.each { q.cancel(it.task) } |