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
import play.api.db.evolutions.{ClassLoaderEvolutionsReader, Evolution} | |
import play.api.libs.Collections | |
/*** | |
* Evolutions reader that reads a single revision from the class path. | |
* | |
* @param revision the revision number to load | |
* @param prefix A prefix that gets added to the resource file names | |
*/ | |
class SingleRevisionClassLoaderEvolutionsReader(val revision: Int, val prefix: String) extends ClassLoaderEvolutionsReader(prefix = prefix) { |
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
ADDRESS=127.0.0.1 | |
PORT=9000 | |
APPLY_EVOLUTIONS=true | |
APPLICATION_SECRET=my_secret |
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 | |
web_service='nginx' | |
config_file=${1:-/usr/local/etc/le-renew-webroot.ini} | |
le_path='/opt/letsencrypt' | |
exp_limit=30; | |
function log { | |
echo [$(date -u)] $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
<profiles> | |
<profile> | |
<id>java8</id> | |
<activation> | |
<jdk>[1.8,)</jdk> | |
</activation> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> |
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
map $http_referer $bad_referer { | |
default 0; | |
"~semaltmedia\.com" 1; | |
"~100dollars-seo\.com" 1; | |
"~buttons-for-your-website\.com" 1; | |
"~best-seo-offer\.com" 1; | |
} | |
# Server block | |
# if ($bad_referer) { |
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
<profiles> | |
<profile> | |
<id>performance</id> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>io.gatling</groupId> | |
<artifactId>gatling-maven-plugin</artifactId> | |
<version>2.0.0-RC4</version> | |
<configuration> |
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
from pyjolokia import Jolokia | |
import json | |
# Enter the jolokia url | |
j4p = Jolokia('http://localhost:8778/jolokia/') | |
# Put in the type, the mbean, or other options. Check the jolokia users guide for more info | |
# This then will return back a python dictionary of what happend to the request | |
data = j4p.request(type = 'read', mbean='org.apache.activemq:type=Broker,brokerName=localhost,destinationType=Queue,destinationName=sms.in', attribute='QueueSize') |
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
# Keep the 1 most recent Lucene snapshots every 30 minutes | |
*/30 * * * * /var/www/apps/amee-platform/current/bin/snapcleaner -N 1 -d /var/www/apps/amee-platform/lucene | |
# Check the slaves are up to date | |
0 * * * * /var/www/apps/amee-platform/current/bin/slavecheck -d /var/www/apps/amee-platform/lucene |
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 | |
export RUN_AS_USER=amee | |
AMEE_HOME=/var/www/apps/amee-platform/current | |
sh $AMEE_HOME/bin/amee-platform $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
upstream amee-platform { | |
server 127.0.0.1:8888; | |
} | |
upstream amee-platform-secure { | |
server 127.0.0.1:8889; | |
} | |
server { | |
listen 80; |
NewerOlder