A sentence like this and another on a new line
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
irb(main):002:0> a.private | |
=> 0 | |
irb(main):003:0> a.private = 0 | |
=> 0 | |
irb(main):004:0> a.changes | |
=> {} | |
irb(main):005:0> a.private = false | |
=> false | |
irb(main):006:0> a.changes | |
=> {"private"=>[0, 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
fadsjkl23jkl43jkl 324j3kljkl 234jj |
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
def toScalaFuture[A](twitterFuture: Future[A]): ScalaFuture[A] = { | |
val promise = ScalaPromise[A]() | |
twitterFuture.respond { | |
case Return(a) => promise.success(a) | |
case Throw(e) => promise.failure(e) | |
} | |
promise.future | |
} |
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
{"ingraphs_avg"=>68214.2222222222, "ingraphs_max"=>69968.0, "ingraphs_min"=>66395.0, "host"=>"herp.durp", "label"=>"hurp.durp.derp", "stack"=>false, "data"=>[[1423008120000, 66395.0], [1423008180000, 67511.0], [1423008240000, 69968.0], [1423008300000, 66725.0], [1423008360000, 67931.0], [1423008420000, 69043.0], [1423008480000, 68983.0], [1423008540000, 67969.0], [1423008600000, 69403.0], [1423008660000, nil]], "ingraphs_prv"=>69403.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
class RichThing(val _underlying_Thing: Thing) extends Thing.Proxy { | |
def doRichStuff: Unit | |
... | |
} |
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 Foo | |
def operation | |
... | |
end | |
end | |
class FooRetryWrapper | |
def initialize(foo) | |
@foo = foo | |
end |
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
I think one realllly cool thing about github gists is that the non-adjustable input box is wider than the non-adjustable display box |
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
[access "refs/*"] | |
read = group Administrators | |
- read = group Anonymous Users | |
+ read = block group Anonymous Users |
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
def create() = Action(parse.json) { implicit request => | |
request.body.validate[UserPass].asOpt.flatMap { userPass => | |
UserService.find(userPass.username).map { user => | |
if (BCryptPasswordHasher.matches(user.password, userPass.password)) { | |
Ok(Json.toJson(UserService.getAuthToken(user))) | |
} | |
else Unauthorized("Invalid credentials submitted.") | |
} | |
}.getOrElse(Unauthorized("InvalidCredentials submitted.")) | |
} |
NewerOlder