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
OldHttpRequest = Turbolinks.HttpRequest | |
class Turbolinks.CachedHttpRequest extends Turbolinks.HttpRequest | |
constructor: (_, location, referrer) -> | |
super(this, location, referrer) | |
requestCompletedWithResponse: (response, redirectedToLocation) -> | |
@response = response | |
@redirect = redirectedToLocation | |
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
{ | |
"name": "this-web-scale", | |
"version": "0.0.1", | |
"scripts": { | |
"dev": "node server.js", | |
"build": "NODE_ENV=production next build", | |
"start": "NODE_ENV=production node server.js", | |
"dockerize": "npm run build:docker && npm run tag:docker && npm run push:docker && npm run tag-latest:docker && npm run push-latest:docker", | |
"deploy": "eb use this-web-scale-production && eb deploy --label v$npm_package_version --verbose", | |
"build:docker": "docker build -t $npm_package_config_docker_image:$npm_package_version -t $npm_package_config_docker_image:latest .", |
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.data._ | |
import play.api.data.format._ | |
import play.api.data.format.Formats._ | |
/** | |
* Option[T]をクエリとして解決するためのバインダ(必須でないパラメータなどに利用することを想定) | |
* 通常のFormと同様にbindFromRequestして使う | |
* クエリに該当するキーが含まれていない場合にはFormの値がNoneになる | |
* | |
* こんなかんじ (もっときれいに書きたいけど): |
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
Datomic.q(Query( | |
s"""[:find ?name | |
:in $$ | |
:where [_ :db/ident ?ident] | |
[(namespace ?ident) ?ns] | |
[(name ?ident) ?name] | |
[(= ?ns "namespace_name")] | |
]""" | |
), database).foreach { | |
case name: String => println(name) |
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
@(field:Field, min:Int=1)(f: (Field, Int) => Html) | |
@{ | |
(0 until math.max(if (field.indexes.isEmpty) 0 else field.indexes.max + 1, min)).map(i => f(field("[" + i + "]"),i)) | |
} |
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
... | |
_nS('controllers.admin.Products'); _root.controllers.admin.Products.search = | |
function() { | |
return _wA({method:"POST", url:"/" + "admin/product/search"}) | |
} | |
... |
NewerOlder