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
aptitude install -y git curl python-dev python-pip redis-server ruby1.9.1-full rubygems1.9.1 | |
aptitude install -y mysql-server libmysqlclient-dev | |
adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git | |
adduser --disabled-login --gecos 'gitlab system' gitlab | |
usermod -a -G git gitlab | |
su - gitlab | |
ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa | |
aptitude install gitolite | |
cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub | |
su - git |
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 | |
############################################### | |
# | |
# mongodb one step to build shard | |
# | |
# Easy way to build shard witch two replicaSets, three config servers and mongos. | |
# | |
# Requirments: | |
# - empty directory [/tmp/myShard/] | |
# - mongod/mongos on system |
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
# cluster ssh allow duplicity connection. This kill all duplicity connection and safe uniq server | |
echo $$ >>/tmp/killme ; | |
sleep 3s; | |
for I in $(tail -n +2 /tmp/killme) ; do | |
kill -9 $I; | |
done |
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
function git.releaseID { | |
test $(date --reference=${HOME}/.git.releaseid +"%j" 2>/dev/null || echo 389) -ne $(date +"%j") \ | |
&& echo -n 1 >~/.git.releaseid \ | |
|| echo $(($(cat ~/.git.releaseid)+1)) >~/.git.releaseid ; | |
cat ~/.git.releaseid ; | |
} | |
function WikidiRelease { | |
r=$(date +"%Y%m%d").$(git.releaseID); |
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 | |
export Register=https://register.example.com | |
export cLink="/v2/_catalog?n=10" | |
export cFile=docker.register.catalog | |
export tFile=docker.register.tags | |
export wgetC="wget -O- -q -S " | |
# Usage with user/password | |
# export wgetC="wget -O- -q -S --user=ondra --password=heslo " |