git config core.filemode false
git config --global core.autocrlf true
git config http.sslVerify "false"
apt-get install dos2unix -y yum install dos2unix -y
#!/bin/bash | |
# Not recommended way. | |
# java -jar jenkins-cli.jar -s http://localhost:8080/ list-plugins | sed 's/\s\s+*/#/g' | tr -s '#' | sed 's/#.*#/:/g' | tr -d ' ' > plugins.txt | |
# cat plugins.list |tr -s ' ' | sed 's/\s.*\s/:/g' | sed 's/:[^0-9].*//g' | |
# Export to expected format by install-plugins.sh | |
java -jar jenkins-cli.jar -s http://localhost:8080/ list-plugins | tr -s ' ' | sed 's/\s.*\s/:/g' | sed 's/:[^0-9].*//g' > plugins.txt | |
# Install from default Jenkins cli export |
#/bin/bash | |
# Usually used at cli as inline-command. | |
for abc in $(dir); do touch $abc/README.md; done |
#/bin/bash | |
for i in {0..70} | |
do | |
TARGET_DATE=$(date -d "-$i week" +"%Y-%m-%d") | |
git log -1 --before=$(git log -1 --before=$TARGET_DATE | grep commit | tr -d 'commit ' | cut -c 1-6) | |
# Example: Checkout first commit of each week backwards and evaluate the code and metrics with phpqs | |
# cd $PROJECT_PATH | |
# COMMIT=$(git log -1 --before=$TARGET_DATE | grep commit | tr -d 'commit ' | cut -c 1-6) |
# source: http://stackoverflow.com/questions/2423777/is-it-possible-to-create-a-remote-repo-on-github-from-the-cli-without-opening-br/10325316#10325316 | |
curl -u 'USER' https://api.github.com/user/repos -d '{"name":"REPO"}' | |
# Remember replace USER with your username and REPO with your repository/application name! | |
git remote add origin [email protected]:USER/REPO.git | |
git push origin master |
#!/bin/bash | |
# Pass as first and only argument the container name or id. | |
# This assumes the container as bash and also that you want to login as root. | |
# ./docker_ssh.sh container_name | |
docker exec -i -t -u 0 $1 /bin/bash |
#!/bin/bash | |
# Useful if you are executing this script | |
# and including files by relative location | |
# or working and interacting with another scripts and folders. | |
SCRIPT_ABS_DIR=$(dirname $(realpath $0)) |
#/bin/bash | |
dos2unix $(grep -r 'bin/bash' | cut -d':' -f1) |
#!/bin/bash | |
# Say a b c | |
# man read | |
echo "===== Say 'A'" | |
read a | |
echo "===== Say 'B'" | |
read b |
#!/bin/bash | |
# Converting environment to bash variables | |
export $(cat .env | xargs) |