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
find -executable | xargs sed -i 's/#!\/usr\/bin\/python/#\/usr\/bin\/python2/' | |
find -executable | xargs sed -i 's/\"\"\"exec\" python/\"\"\"exec\" python2/' |
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
class FormatsExtension(formats: Formats){ | |
def +(newParameterNameReader: ParameterNameReader) = new Formats{ | |
override val dateFormat = formats.dateFormat | |
override val parameterNameReader = newParameterNameReader | |
override val typeHintFieldName = formats.typeHintFieldName | |
override val fieldSerializers = formats.fieldSerializers | |
override val customSerializers = formats.customSerializers | |
override val typeHints = formats.typeHints | |
} |
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
object FooWebSocketHandler extends WebSocketController{ | |
def handle(msg: String) { | |
outbound.send(msg) // The file /app/controllers.scala could not be compiled. Error raised is : not found: value outbound | |
} | |
} | |
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
object Foo0 extends Controller{ | |
def bar = Json(createAnObject) // Default serialization is used. | |
def bar2 = Json(createAnObject, createAnotherFormats) // default formats are overriden | |
} | |
object Foo1 extends Controller{ |
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.mvc.Http.Request | |
import RequestScope.Variable | |
final class RequestScope (val request: Request){ | |
private val store = { | |
val Key = "__RequestScope" | |
val args = request.args | |
if(args containsKey Key){ | |
println("load RS") |
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.mvc.Http.Request | |
import RequestScope.Variable | |
final class RequestScope (val request: Request){ | |
private val store = { | |
val Key = "__RequestScope" | |
val args = request.args | |
if(args containsKey Key){ | |
println("load RS") |
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
### my domains | |
%{ prodDomain = "INSERT-YOUR-DOMAIN-NAME.com"}% | |
%{ devDomain = "localhost:9000"}% | |
### Static resources | |
#{if play.Play.mode.isDev()} | |
GET ${devDomain}/static/ staticDir:public | |
#{/if} | |
#{else} | |
GET ${prodDomain}/static/ staticDir:public |
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
// inspired by http://thedailywtf.com/Articles/Disgruntled-Bomb-Java-Edition.aspx | |
import scala.util.Random | |
import java.lang.Integer | |
import scala.actors.Actor._ | |
implicit def integerToInt(n: Integer) = n.intValue | |
val rand = new Random | |
val valueField = classOf[Integer].getDeclaredField("value") | |
valueField.setAccessible(true) |
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
yum remove $(yum check | grep -o 'is a duplicate with .*$' | sed 's/is a duplicate with //') |
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
@revoked * ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuHSOJktxbp+PW8kYcCDbjTwFdlWgC8EfslECZQbndKm5r6m6JBhoBz6YmsVTisN3CimcTEVp9FOHYbbbOX7bIQF1pG1caXm1BE1STVMwq4Xqbpplt3+JmkUDDUtYIanPfUKakeXbN6zSDw3gaFbxMfTr4Of5ntAMHkXVs0EILS9LuC4kPdCZcyjUaqz6QrYkL7oC2fuRKrOBo6G82JYOyml+W7dRokQ74dNi2BwTER5oKbAVG4jbUdbHpZqNRzZaRrW2FxHo8Byk0iY2dDywPBVmPbUom81aGNdy4ySwk8Vfbkk3qXWLadPFFI6GGbuJ1y0wPK4Y7TJ7eokjyp9bzQ== | |
@revoked * ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxHguFIlZRIcXSnkLwvbxBAr+2oFAQOuV5wqIDvhyl+3NFZ/q6F3jxUamqzIw6/kjnXum09aAC+Qqhb9GnLZBT1eE/aKZduNU+TENb86ahoPfBDqY7NnRo2JhKrGyLPOZuxQgUJN6rjtyGcZgLkwJ/OrOr5AYoHfcsWGqvH1ksom10fuEZV2yJ250vb2+DDEtz324nhtyLqw1h0SpmY9R+zY1ty8ZEICV4h5zRgsm5e/wWhPzNlrbFq63/e8AfNVNne5TEyisHlYBft/7tKYGl0+0K80yIy3H+7T2aerJcjM+J2HNxPHvkZiNP1fTAxyxPxcFNFLlGqVdVhhICX0oqQ== | |
@revoked * ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDaDxa54wzQenGcW+WuQGAO6K17tCz+cnh0n2+Dr8SWOza5NpcW+d8FK118HyGslJx0XXbVPlOcWE1vxErWcXgxgWqSu/c3VXPU0U/62f7P/ldyI9SKKVHQ8S7Zm499BYKkYuKqPdJ8xNY+FxczUQ61X1M9Gk1Uj6S2tTiYDtczgklcmfMTmTpXivgyMVcv5 |