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
/** | |
* "require": { | |
* "php": ">=5.4", | |
"php-imap/php-imap": "~2.0", | |
"phpmailer/phpmailer": "^5.2" | |
* }, | |
* | |
* sudo apt-get install php-imap | |
* | |
*/ |
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
<?php | |
/** | |
* "require": { | |
* "php": ">=5.4", | |
* "php-imap/php-imap": "~2.0" | |
* }, | |
* | |
* sudo apt-get install php-imap | |
* |
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 | |
PROGNAME=${0##*/} | |
INPUT='' | |
QUIET='0' | |
NOSTATS='0' | |
max_input_size=0 | |
max_output_size=0 | |
usage() |
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 | |
# Params check | |
if [[ -z "$@" ]]; then | |
echo >&2 "You must supply an argument!" | |
exit 1 | |
elif [[ ! -d "$@" ]]; then | |
echo >&2 "$@ is not a valid directory!" | |
exit 1 | |
fi |
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
#!/usr/bin/perl | |
# HAProxy Performance Statistics | |
# by Steve Kamerman | |
# | |
# To use, pipe your HAProxy log with timing information (like "0/0/1/1/3 200") to | |
# this script. It will output min, max, med, avg and a latency distribution graph. | |
# | |
# Info on timing logging in HAProxy: http://code.google.com/p/haproxy-docs/wiki/TimingEvents | |
# |
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
# apache | |
aptitude install apache2-mpm-prefork | |
# нужен зендовский реп | |
curl http://repos.zend.com/zend.key | apt-key add - | |
echo "deb http://repos.zend.com/zend-server/5.6.0_ubuntu1204/deb server non-free" > /etc/apt/sources.list.d/zend.list | |
aptitude update | |
# нужен php 5.2 | |
aptitude install cli-tools-zend-server php-5.2-curl-zend-server php-5.2-gd-zend-server php-5.2-imagick-zend-server php-5.2-imap-zend-server php-5.2-mcrypt-zend-server php-5.2-memcache-zend-server php-5.2-pgsql-zend-server php-5.2-tidy-zend-server php-5.2-xsl-zend-server libapache2-mod-php-5.2-zend-server php-5.2-optimizer-plus-zend-server php-5.2-loader-zend-server |
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
echo "# WANdisco Open Source Repo" > /etc/apt/sources.list.d/WANdisco.list | |
echo "deb http://opensource.wandisco.com/debian squeeze svn" >> /etc/apt/sources.list.d/WANdisco.list | |
echo "Importing GPG key" | |
wget http://opensource.wandisco.com/wandisco-debian.gpg -O /tmp/wandisco-debian.gpg &>/dev/null | |
apt-key add /tmp/wandisco-debian.gpg | |
rm -rf /tmp/wandisco-debian.gpg | |
apt-get update |
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
# устанавливаем curl | |
sudo aptitude install curl | |
# ставим rvm | |
sudo -i -u www-data | |
\curl -L https://get.rvm.io | bash -s stable | |
# дополнительные библиотеки | |
sudo aptitude install zlib1g-dev libssl-dev imagemagick librmagick-ruby libmagick9-dev libmysql-ruby libmysqlclient-dev libpq-dev libsqlite3-dev libcurl4-openssl-dev libopenssl-ruby apache2-prefork-dev libapr1-dev libaprutil1-dev |
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
# Скачиваем актуальную версию с сайта Oracle (Узнать точное название файла можно тут: www.oracle.com/technetwork/java/javase/downloads/index.html ) | |
mkdir -p ~/distr/java | |
cd ~/distr/java | |
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" http://download.oracle.com/otn-pub/java/jdk/7u11-b21/jdk-7u11-linux-x64.tar.gz | |
# Извлекаем пакет | |
tar -xzf jdk-7u11-linux-x64.tar.gz |
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
server { | |
listen 80; | |
server_name example.org www.example.org; | |
access_log /var/log/nginx/example.org_access.log; | |
error_log /var/log/nginx/example.org_error.log; | |
root /var/www/example.org; | |
index index.php; | |
charset utf-8; | |
location / { | |
proxy_pass http://111.222.222.111/; |
NewerOlder