This file contains hidden or 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
| find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion |
This file contains hidden or 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
| import com.typesafe.scalalogging.slf4j.Logging | |
| import sun.misc.BASE64Decoder | |
| import play.api.mvc._ | |
| import scala.concurrent.Future | |
| import play.mvc.Results._ | |
| import play.api.libs.concurrent.Execution.Implicits.defaultContext | |
| object BasicAuthFilter extends Filter with Logging { | |
| private lazy val unauthResult = Results.Unauthorized.withHeaders(("WWW-Authenticate", | |
| "Basic realm=\"myRealm\"")) |
This file contains hidden or 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
| // hack to get a Stream with a cursor-backed query because anorm doesn't combine the two | |
| private def resultSetToStream(sql: SimpleSql[Row])(implicit c: Connection): Stream[SqlRow] = { | |
| val stmt = sql.getFilledStatement(c, getGeneratedKeys = false) | |
| stmt.setFetchSize(1000) | |
| val rs = stmt.executeQuery() | |
| val rsMetaData = Sql.metaData(rs) | |
| val columns = List.range(1, rsMetaData.columnCount + 1) | |
| def data(rs: java.sql.ResultSet) = columns.map(nb => rs.getObject(nb)) | |
| Useful.unfold(rs)(rs => if (!rs.next()) { rs.getStatement.close(); None } else Some((new SqlRow(rsMetaData, data(rs)), rs))) | |
| } |
This file contains hidden or 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 DecimalFormat | |
| * @constructor | |
| * @param {String} formatStr | |
| * @author Oskan Savli | |
| */ | |
| function DecimalFormat(formatStr) | |
| { | |
| /** | |
| * @fieldOf DecimalFormat |