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/sh | |
# file location: /var/project/jobs/fetch-and-update.sh | |
echo "Started at $(date +%Y-%m-%d\ %H:%M)" | |
echo ">>> fetch >>>" | |
time /var/project/fetch.sh | |
echo ">>> prepare >>>" | |
time /var/project/prepare.sh |
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
#you need to have root rigths | |
sudo su | |
add-apt-repository ppa:nginx/stable | |
apt-get update | |
apt-get install nginx-full | |
/etc/init.d/nginx restart |
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
# Generating 2048 key file with RSA | |
openssl genrsa 2048 > host.key | |
# Generating certificate for 10 years with our new key | |
# couple of question will be promted | |
# when you will be asked for Common Name, you need to specify *.domain.com | |
openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert | |
# getting info for our certificate | |
openssl x509 -noout -fingerprint -text < host.cert > host.info |
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
# this command allow to run "python test.py" 10 times | |
# useful for different types of tests | |
# declare -i i=0 ; while [ "$i" -l "10" ]; do python test.py & i=$i+1; done | |
# this is just draft variant. | |
# todo: create separate command with syntax mrun.sh <num> <command> |
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
sudo add-apt-repository ppa:webupd8team/sublime-text-2 | |
sudo apt-get update | |
# Optional: remove any installed Sublime Text 2 packages: | |
sudo apt-get remove sublime-text* | |
sudo apt-get install sublime-text* |
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
#run as sudo | |
apt-get install python-setuptools curl | |
easy_install supervior | |
curl https://raw.github.com/gist/176149/88d0d68c4af22a7474ad1d011659ea2d27e35b8d/supervisord.sh > /etc/init.d/supervisord | |
#to run it | |
chmod +x /etc/init.d/supervisord | |
#adding to autostart |
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
# display data usage in megabytes for each file in folder sorted from biggest to lowes | |
du -shm *| sort -rg |
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
sudo apt-get install git-core git-svn ruby rubygems | |
sudo gem install svn2git | |
mkdir svn-repo | |
cd svn-repo | |
svn co [SVN URL] . | |
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt | |
# edit authors-transform.txt to this format: |
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
# nginx.repo | |
[nginx] | |
name=nginx repo | |
baseurl=http://nginx.org/packages/centos/6/$basearch/ | |
gpgcheck=0 | |
enabled=1 |
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
[10gen] | |
name=10gen Repository | |
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 | |
gpgcheck=0 | |
enabled=1 |
OlderNewer