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
- login to jenkins box (ssh) | |
- switch user to jenkins "sudo su -s /bin/bash jenkins" | |
- go to jenkins home directory "cd ~" | |
- generate keys (you need separate pair per github private project as the projects are on the same domain) | |
- "ssh-keygen -t rsa -f ~/.ssh/id_rsa_<project>" (replace <project> with your project name) | |
- repeat this for every github project | |
- crate "config" file in .ssh dir - "vim ~/.ssh/config" with the following content: | |
# <project1> | |
Host github.com-<project1> | |
HostName github.com |
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
ssh-keygen -t rsa | |
ssh-copy-id -i .ssh/id_rsa.pub username:password@remotehost |
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 org.springframework.core.io.Resource; | |
import org.springframework.core.io.ClassPathResource; | |
import org.springframework.core.io.support.PathMatchingResourcePatternResolver; | |
... | |
PathMatchingResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(); | |
Resource[] resources = resourceResolver.getResources("conf/**/*.properties"); | |
Resource resource = resources[0]; |
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 rvm --- | |
# get and execute rvm and source it | |
curl -sSL https://get.rvm.io | bash -s stable | |
source .rvm/scripts/rvm | |
# install ruby 2.1.0 and use it | |
rvm install ruby-2.1.0 | |
rvm use 2.1.0 |
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
mkdir ~/.ssh | |
chmod 700 ~/.ssh | |
ssh-keygen -t rsa -b 4096 -f ~/.ssh/<key_name> | |
ssh-copy-id -i ~/.ssh/<key_name>.pub <username>@<host> | |
# add following entry to ~/.ssh/config file | |
Host <host|alias> | |
HostName <host|ip> |
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
sudo update-rc.d -f [app_name] remove |
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
`sudo nmap -sP 192.168.1.0/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}'` update `192.168.1.*` accordingly |
OlderNewer