I hereby claim:
- I am delitescere on github.
- I am delitescere (https://keybase.io/delitescere) on keybase.
- I have a public key whose fingerprint is 8D3B A04F B589 A408 6F54 CF24 29CA E20F 8F35 51C6
To claim this, I am signing this object:
tuple(... | |
).verifying("Invalid username or password", _ match { | |
case (Some(u), Some(p), _) => authenticate(u, p) | |
... | |
}) |
aMap.get("a key that might not exist") | |
.map(expressionUsingTheValue(_)) | |
.getOrElse(anotherExpression) |
lazy val defaultBrowserVersion = Play.configuration.getString("snapshot.browserVersion") | |
.map(extractVersion _) | |
.getOrElse(BrowserVersion.FIREFOX_3_6) // Firefox 3.6 makes a good default because it works on all OSes | |
// Do you really need to throw an exception? Why not log it as an error, and return None so you end up with the default above? | |
def extractVersion(browserString: String): Option[BrowserVersion] = { | |
allCatch opt { | |
Some(classOf[BrowserVersion].getField(browserString).get(null).asInstanceOf[BrowserVersion]) | |
} |
I hereby claim:
To claim this, I am signing this object:
Written for my buddy Charles Miller, 28-Aug-2013: | |
I look at you all see the tests there that're failing | |
While my compiler gently weeps | |
I look at the heap and I see it needs mark/sweeping | |
Still my compiler gently weeps | |
I don't know why nobody told you | |
How to unfold your data | |
I don't know how someone controlled you |
For @ctford, 16-Sep-2013 | |
@juliansgamble: | |
You get your algorithms for nothing and your theorems for free | |
I want my | |
I want my | |
I want my AST | |
@delitescere: | |
Now look at that IO |
(defproject com.example/foo "0.1.0" | |
:description "Does fooness" | |
:url "http://example.com/" | |
:license {:name "Copyright ©2014 Josh Graham"} | |
:aliases {"dist" ["do" ["clean"] ["test"] ["uberjar"]] ;$ lein dist # create distribution JAR | |
"debug" ["with-profile" "dev,debug" "run"]} ;$ lein debug # run for a 'remote' debugger | |
:aot :all | |
:auto-clean false ;"dist" alias does the full cycle | |
:clean-targets ^{:protect false} [:target-path :junit-results-dir] | |
:dependencies [ |
# cd .. with multiple jumps or jump up to name | |
..() { | |
if [ "-" = "$1" ]; then cd -; return; fi; # return to previous directory | |
if [ "/" = "$1" ]; then cd /; pwd; return; fi; # jump to root | |
if [ -z "$1" ]; then cd ../; pwd; return; fi; # jump up one | |
declare -i count=$1; # get a jump count | |
if [ $count -eq 0 ]; then # wasn't a number, look for name | |
local go=$(while [ "/" != "$PWD" ] && [ "$(basename $PWD)" != "$1" ]; do cd ..; done; pwd); | |
# jump up to named directory, or don't move if name wasn't found | |
if [ "/" != "$go" ]; then cd $go; else return; fi; |