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 install make git g++ gcc zlib1g zlib1g-dev libxml2 libxml2-dev -y | |
# https://developers.google.com/speed/webp/docs/compiling#building | |
cd /usr/local/src | |
wget http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz | |
tar -xvzf libwebp-0.4.3.tar.gz | |
cd libwebp-0.4.3 | |
./configure |
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 -y install build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev libbz2-dev libpcrecpp0 tar unzip | |
# http://nginx.org/en/download.html | |
cd /tmp | |
wget http://nginx.org/download/nginx-1.8.0.tar.gz | |
tar -xzvf nginx-1.8.0.tar.gz | |
mkdir /nginx-modules | |
cd /nginx-modules |
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 "deb http://ftp.debian.org/debian sid main" >> /etc/apt/sources.list | |
echo "deb http://ftp.debian.org/debian experimental main" >> /etc/apt/sources.list | |
apt-get update | |
apt-get -t sid install libc6 libc6-dev libc6-dbg | |
# reboot machine | |
apt-get -t experimental install haproxy |
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
# generate OpenSSL CSR here | |
# https://www.digicert.com/easy-csr/openssl.htm | |
# to cer | |
cat COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > yourdomain.com.cer | |
# to pem | |
cat yourdomain.com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt yourdomain.com.key > yourdomain.com.pem |
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 install vim redis-server | |
vim /etc/redis/redis.conf | |
----------------------------------------------------------------------------- | |
bind 0.0.0.0 | |
----------------------------------------------------------------------------- | |
appendonly yes | |
----------------------------------------------------------------------------- | |
vim /etc/sysctl.conf |
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 | |
echo "\n Killing the cat..." | |
/etc/init.d/tomcat7 stop | |
echo "\n Removing internal organs..." | |
rm -rf /var/lib/tomcat7/webapps/ROOT | |
rm -rf /var/lib/tomcat7/webapps/ROOT.war | |
echo "\n Placing new organs..." |
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
.DS_Store | |
.lock-wscript | |
.komodotools | |
.classpath | |
.settings | |
.project | |
.dropbox | |
.tmproj | |
.grunt | |
.cache |
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
<!-- Append to pom.xml --> | |
<dependency> | |
<groupId>com.thetransactioncompany</groupId> | |
<artifactId>cors-filter</artifactId> | |
<version>1.8</version> | |
</dependency> | |
<!-- Append to web.xml --> | |
<filter> |
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
$.fn.serializeObject = function () { | |
var o = {}; | |
var a = this.serializeArray(); | |
$.each(a, function () { | |
if (o[this.name] !== undefined) { | |
if (!o[this.name].push) { | |
o[this.name] = [o[this.name]]; | |
} | |
o[this.name].push(this.value || ''); | |
} else { |
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 s4() { | |
return Math.floor((1 + Math.random()) * 0x10000) | |
.toString(16) | |
.substring(1); | |
}; | |
function guid() { | |
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + | |
s4() + '-' + s4() + s4() + s4(); | |
} |
OlderNewer