Skip to content

Instantly share code, notes, and snippets.

View jstultz's full-sized avatar

Jacob Stultz jstultz

View GitHub Profile
@jstultz
jstultz / use-gcc failure
Created January 22, 2013 00:40
--use-gcc failure
tests-MacBook-Pro:infrastructure test$ brew install --use-gcc ruby
==> Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.bz2
Already downloaded: /Library/Caches/Homebrew/ruby-1.9.2-p290.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/ruby/1.9.2-p290 --with-readline-dir=/usr/local/Cellar/readline/6.2.4 --enable-shared
==> make
==> make install
Warning: skip_clean :all is deprecated
Skip clean was commonly used to prevent brew from stripping binaries.
brew no longer strips binaries, if skip_clean is required to prevent
brew from removing empty directories, you should specify exact paths
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."))
}
[access "refs/*"]
read = group Administrators
- read = group Anonymous Users
+ read = block group Anonymous Users
I think one realllly cool thing about github gists is that the non-adjustable input box is wider than the non-adjustable display box
class Foo
def operation
...
end
end
class FooRetryWrapper
def initialize(foo)
@foo = foo
end
class RichThing(val _underlying_Thing: Thing) extends Thing.Proxy {
def doRichStuff: Unit
...
}
{"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}
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
}
fadsjkl23jkl43jkl 324j3kljkl 234jj

A sentence like this and another on a new line