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 | |
## Install pre-requisites | |
sudo apt-get install -y git-core build-essential openssl libssl-dev pkg-config | |
## Ensure python <3 is available | |
ret=`python -c 'import sys; print("%i" % (sys.hexversion<0x03000000))'` | |
if [ $ret -eq 0 ]; then | |
echo "we require python version <3" | |
mkdir /tmp/bin; ln -s /usr/bin/python2.7 /tmp/bin/python; |
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
/** | |
* Simple email validation | |
* ensures at least one `@` sign, at least one char in local part, | |
* at least one `.` in domain part and is at least one char long | |
*/ | |
isEmail: function (em) { | |
em = em || ''; | |
var indx = em.lastIndexOf('@'); | |
return indx > 0 && (em.lastIndexOf('.') > indx) && (em.length - indx > 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
#!/bin/bash | |
# Nagios client install script | |
# Vinayak Mishra <viks@vnykmshr.com> | |
set -e -x | |
# ensure only root can run the script | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 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
User-Agent: Googlebot | |
Allow: / | |
User-Agent: Googlebot-Mobile | |
Allow: / | |
User-Agent: msnbot | |
Allow: / | |
User-Agent: bingbot |
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 configuration is what is provided by PageCache by Varnish for Magento module: | |
# http://www.magentocommerce.com/magento-connect/pagecache-powered-by-varnish.html | |
# default backend definition. Set this to point to your content server. | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
.connect_timeout = 5s; | |
.first_byte_timeout = 10s; |
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 8080; | |
server_name magento.vnykmshr.com; | |
root /var/www/magento/releases/current; | |
index index.html index.php; | |
access_log /var/log/nginx/magento.access.log; | |
error_log /var/log/nginx/magento.error.log; | |
location / { |
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
apt-get update | |
apt-get upgrade | |
apt-get install mysql-server | |
mysql_secure_installation | |
apt-get install nginx | |
apt-get install git-core |
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 | |
confirm() { | |
echo "Press RETURN to continue, or ^C to cancel."; | |
read -e ignored | |
} | |
GIT='git' | |
LTS="Ubuntu 10.04" |
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
# install the Nginx team’s package signing key | |
curl http://nginx.org/keys/nginx_signing.key | apt-key add - | |
# Add the repo to apt sources: | |
echo -e "deb http://nginx.org/packages/ubuntu/ `lsb_release -cs` nginx\ndeb-src http://nginx.org/packages/ubuntu/ `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list | |
# Resynchronize the package index files from their sources: | |
apt-get update | |
# install nginx |
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.conf | |
####################################################################### | |
# | |
# This is the main Nginx configuration file. | |
# | |
# More information about the configuration options is available on | |
# * the English wiki - http://wiki.nginx.org/Main | |
# | |
####################################################################### |
OlderNewer