Skip to content

Instantly share code, notes, and snippets.

View OndrejP's full-sized avatar

Ondrej Prochazka OndrejP

View GitHub Profile
@OndrejP
OndrejP / gitlab.sh
Created September 25, 2012 11:28 — forked from cristianrasch/gitlab.sh
Install Gitlab on Debian Squeeze
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
@OndrejP
OndrejP / mongoDBmkShard.sh
Last active August 29, 2015 14:01
mongodb one step to build shard
#!/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
@OndrejP
OndrejP / gist:a63803cdfe3cd8c3ff5f
Created September 1, 2014 08:04
luster ssh allow duplicity connection. This kill all duplicity connection and safe uniq server
# 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
@OndrejP
OndrejP / .bashrc
Created November 7, 2014 11:20
Short way to create release tag
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);
@OndrejP
OndrejP / docker-register-2-list-images.sh
Last active November 28, 2019 00:52
list all images on Docker Register v2
#!/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 "