次のようにproject/Build.scala を編集する。
object ApplicationBuild extends Build {
// ...
val appDependencies = Seq(
"commons-daemon" % "commons-daemon" % "1.0.10"
)
// ...
case class Config(host: String, port: Int) { | |
def prettyPrint(prefix: String, msg: String): String = | |
List(prefix, ": ", msg, " on ", host, ":", port.toString).mkString | |
} | |
/** | |
* Passing a configuration with implicits is like | |
* working in the state monad. You can "put" a | |
* new configuration even though we don't want that | |
* to happen in this particular example. We don't |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2357277/hack.sh | sh | |
# |
def index(id:String) = Action { | |
getFirstData(id) | |
} | |
private def getFirstData(id:String) = { | |
Cache.get(id) match { | |
case Some(id2) => getSecondData(id2) | |
case None => NotFound | |
} | |
} | |
private def getSecondData(id2:String) = { |
#!/bin/sh | |
# add a simple 'nuget' command to Mac OS X under Mono | |
# get NuGet.exe binary from http://nuget.codeplex.com/releases/view/58939 | |
# get Microsoft.Build.dll from a Windows .NET 4.0 installation | |
# copy to /usr/local/bin and Robert is your father's brother.... | |
# | |
PATH=/usr/local/bin:$PATH | |
mono --runtime=v4.0 /usr/local/bin/NuGet.exe $* |
import java.math.BigInteger; | |
class Trampoline<T> | |
{ | |
public T get() { return null; } | |
public Trampoline<T> run() { return null; } | |
T execute() { | |
Trampoline<T> trampoline = this; |
https://gist.github.com/mala/5062931
の続き。
Twitterの人に色々と問題点は伝えたんだけど、これからOAuthのサーバー書く人や、クライアント書く人が似たような問題を起こさないようにするために、どうすればいいのかについて簡単に書きます。既存の実装真似して作るとうっかりひどい目にあう。
自分は意図的に「Twitterの脆弱性」という表現を使わないように気を使っていて、それはクライアントアプリ側の責任もあるからなのだけれども、安全に実装するための方法がわかりにくかったり誤解を招きやすかったり、Twitterに買収されているTweetDeckにも問題があったりしたので、それはやっぱりTwitter側の責任の比重が大きいとは思う。とはいっても別に責任を追求したかったり◯◯はクソだといったことを言いたいわけではなく、誰が悪いとか言う以前に、複合的な要因によって問題が起きるときには原因を正しく理解する必要があると思う。
(** | |
* 圏論勉強会 @ ワークスアプリケーションズ#8 | |
* http://nineties.github.io/category-seminar/8.html#/55 | |
* 練習問題 回答 | |
* | |
* 実行方法(for SML/NJ) | |
* $ cat banana.cm | |
* group | |
* is | |
* $/basis.cm |
全体的に簡略化し、必要と思われる部分を抜粋しました。
Not running
アプリは起動されていないか、実行されていたけれどもシステムによって終了されています。
Inactive