⌘R | Run |
⌘U | Unit Test |
⌘I | Instruments Profile |
⇧⌘B | Analyze |
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
package com.alternegro | |
import java.util.Date | |
import java.util.Calendar | |
import java.util.GregorianCalendar | |
import scala.xml._ | |
import scala.collection.JavaConversions._ | |
object MoviesParser extends App { | |
case class CastMember(role: String, firstName: String, lastName: String) | |
case class Movie(title: String, description: String, rating: String, cast:List[CastMember]=Nil) |
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 interday(symbol:String, range:String) = Action {request => | |
Async { | |
WS.url("http://api.sproutwerks.com/api/TimeSeries/TimeSeries.svc").withHeaders(CONTENT_TYPE -> "application/soap+xml").post(ChartRequests.interdayRequest(symbol, range)).map { response => | |
Ok(timeSeriesToJson(range.toUpperCase, response.xml, noFilter, timeLabeler(range))).as(JSON) | |
} | |
} | |
} | |
def intraday(symbol:String) = Action {request => | |
Async { |
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
# Upstart script for a play application that binds to an unprivileged user. | |
# put this into a file like /etc/init/play.conf | |
# | |
# This could be the foundation for pushing play apps to the server using something like git-deploy | |
# By calling service play stop in the restart command and play-start in the restart command. | |
# | |
# Usage: | |
# start play | |
# stop play | |
# restart play |
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
#!/usr/local/bin/macruby | |
# Copyright (c) 2009 Matt Aimonetti | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |