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 akka.actor.{Props, Actor} | |
import concurrent.ExecutionContext | |
import play.api.Logger | |
import play.libs.Akka | |
import scala.concurrent.duration._ | |
import ExecutionContext.Implicits.global | |
case object Tick | |
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 akka.actor.{Props, Actor} | |
import concurrent.duration.{Duration, FiniteDuration} | |
import play.api.{Application, Logger} | |
import play.libs.Akka | |
import scala.concurrent.duration._ | |
import java.util.concurrent.TimeUnit | |
case object Tick | |
class MonitorLoad extends Actor { |
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
// To run this: | |
// 1. Install node.js | |
// 2. Fill in encrypted & password below | |
// 3. node decrypt.js | |
var encrypted = ''; // copy paste encrypted json here | |
var password = ''; // your password goes here | |
(typeof Crypto == "undefined" || !Crypto.util) && function () { | |
var a = Crypto = {}, b = a.util = { |
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
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA1 | |
FYI World, I now have an official public key. | |
It is availble here: http://pgp.mit.edu:11371/pks/lookup?search=ron+gross&op=index | |
Specifically, it is this one: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6016B419893E4632 | |
I've been meaning to generate a public key for some time, and finally I had an actualy need for this. | |
(A company I'm doing business with asked me to verify my identity and communications via PGP) |
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 org.apache.commons.lang.StringUtils; | |
import java.util.regex.Pattern; | |
public class RegexUtils { | |
private RegexUtils(){} | |
public static Pattern matchAny(String[] patterns) { | |
return matchAny(patterns, 0); | |
} |
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
play start | |
~ _ _ | |
~ _ __ | | __ _ _ _| | | |
~ | '_ \| |/ _' | || |_| | |
~ | __/|_|\____|\__ (_) | |
~ |_| |__/ | |
~ | |
~ play! 1.2.4 (custom: 1.2.4-mbknor-3), https://github.com/mbknor/play/tree/1.2.4-mbknor-custom-rele | |
ase | |
~ |
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
2012-06-24T17:11:03+00:00 app[web.1]: ~ play! 1.2.4, http://www.playframework.org | |
2012-06-24T17:11:03+00:00 app[web.1]: ~ framework ID is prod | |
2012-06-24T17:11:03+00:00 app[web.1]: ~ | |
2012-06-24T17:11:03+00:00 app[web.1]: ~ Ctrl+C to stop | |
2012-06-24T17:11:03+00:00 app[web.1]: ~ | |
2012-06-24T17:11:03+00:00 app[web.1]: 17:11:03,351 INFO ~ Shut down memcached client | |
2012-06-24T17:11:04+00:00 app[web.1]: 17:11:04,335 INFO ~ Starting /app | |
2012-06-24T17:11:04+00:00 app[web.1]: 17:11:04,340 INFO ~ Module rythm is available (/app/modules/r | |
ythm-1.0.0-RC5) | |
2012-06-24T17:11:04+00:00 app[web.1]: 17:11:04,340 INFO ~ Module less is available (/app/modules/le |
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 java.util.regex.Pattern; | |
/** | |
* Detect mobile User Agent | |
* | |
* Adpated from http://detectmobilebrowsers.com/download/cs on 31/05/2012 | |
*/ | |
public class MobileUADetector { | |
private final static Pattern mobile_b = Pattern.compile("android.+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE); |
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
~ Resolving dependencies using C:\work\tmp\play-LocalvariablesNamesEnhancer-bug-1528\conf\dependencies.yml, | |
~ | |
:: resolving dependencies :: play-application#play-LocalvariablesNamesEnhancer-bug-1528;1.0 | |
confs: [default] | |
found play#play;1.2.x-84b46a2 in playCore | |
found antlr#antlr;2.7.7 in playCoreDependencies | |
found c3p0#c3p0;0.9.1.2 in playCoreDependencies | |
found cglib#cglib-nodep;2.2 in playCoreDependencies | |
found com.google.code.gson#gson;2.2 in playCoreDependencies |
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
~ Resolving dependencies using C:\work\CS\portal\src\conf\dependencies.yml, | |
~ | |
~ play->less 0.9 (from playContributedModules) | |
~ com.google.guava->guava 10.0.1 (from mavenCentral) | |
~ com.google.code.findbugs->jsr305 1.3.9 (from mavenCentral) | |
~ com.google.guava->guava-bootstrap 10.0.1 (from mavenCentral) | |
~ org.hibernate->hibernate-validator 4.1.0.Final (from mavenCentral) | |
~ javax.validation->validation-api 1.0.0.GA (from mavenCentral) | |
~ javax.xml.bind->jaxb-api 2.2 (from mavenCentral) | |
~ com.sun.xml.bind->jaxb-impl 2.1.12 (from mavenCentral) |