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
// project/Dependencies.scala | |
package foo | |
import sbt._ | |
object Dependencies { | |
val config = "com.typesafe" % "config" % "1.3.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
import org.apache.spark.sql.functions._ | |
import org.apache.spark.sql.types._ | |
import org.apache.spark.sql.catalyst.SimpleCatalystConf | |
import org.apache.spark.sql.catalyst.analysis.{Analyzer, EmptyFunctionRegistry, SimpleCatalog} | |
import org.apache.spark.sql.catalyst.plans.logical.LocalRelation | |
import org.apache.spark.sql.catalyst.expressions.AttributeReference | |
val conf = new SimpleCatalystConf(false) | |
val catalog = new SimpleCatalog(conf) |
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
import akka.actor.ActorSystem | |
import scala.concurrent.duration._ | |
object Main extends App { | |
import scala.concurrent.ExecutionContext.Implicits.global | |
val sys = ActorSystem("tester") | |
val task1 = sys.scheduler.schedule(1 minute, 1 minute, new Runnable { | |
override def run() = { |
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
# CHANGELOG | |
# 3/22/15: | |
# - updated keyring | |
# | |
# To setup ansible on Mac: | |
# brew install ansible | |
# mkdir -p /usr/local/etc/ansible | |
# mkdir -p /usr/local/share/ansible | |
# | |
# To run: |
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
Angular Module Lifecycle | |
- https://docs.angularjs.org/guide/module#module-loading-dependencies | |
- https://docs.angularjs.org/guide/bootstrap#automatic-initialization | |
Angular Scopes | |
- https://docs.angularjs.org/guide/scope#/scope-hierarchies | |
Handling back button with ui-router: http://stackoverflow.com/questions/22247294 | |
Batarang - https://github.com/angular/angularjs-batarang/releases |
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
angular.module("gh-query") | |
.controller("app", function($scope) { | |
$scope.goClick = function(user) { | |
$scope.$broadcast('userchange', {username: user}); | |
} | |
}) | |
.controller("reposCtrl", function($scope, reposSvc) { | |
$scope.$on('userchange', function(event, msgdata) { | |
reposSvc.getRepos(msgdata.username).success( function (data) { | |
$scope.repositories = data; |
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
[error] References to undefined settings: | |
[error] | |
[error] scala/*:sourceDirectory from scala/universal:sourceDirectory (/Users/michael/.sbt/0.13/build.sbt:5) | |
[error] Did you mean scala/universal:sourceDirectory ? | |
[error] | |
[error] scala/*:sourceDirectory from scala/docker:sourceDirectory (/Users/michael/.sbt/0.13/build.sbt:5) | |
[error] Did you mean scala/universal:sourceDirectory ? | |
[error] | |
[error] scala/compile:mainClass from scala/*:batScriptReplacements (/Users/michael/.sbt/0.13/build.sbt:5) | |
[error] |
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
// | |
// Regular Expression for URL validation | |
// | |
// Based on gist https://gist.github.com/729294 published by: Diego Perini | |
// Updated: 2012/11/02 | |
// | |
// This validator differs from the Perini validator in a couple of ways: | |
// - It only allows http or https | |
// - It allows private network addresses | |
// - It does not allow query strings or fragments |
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
private function all(matchers: Array) | |
{ | |
return function(item: Object, index: int, array: Array): Boolean | |
{ | |
return matchers.every(function(testFunction: Function, funcIndex: int, funcArray: Array): Boolean { | |
return testFunction(item, index, array); | |
}); | |
} | |
} |