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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My Calendar</title> | |
<link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.css"> | |
</head> | |
<body> |
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
/** | |
* Created by huzhou on 11/13/14. | |
*/ | |
import play.api.mvc._ | |
import filters.TokenFilter | |
object Global extends WithFilters(TokenFilter) { | |
} |
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
case object TakeAction | |
sealed trait ChannelAction{ | |
def path:String //path is the primary key | |
} | |
case class SaveChannel(channelEntity:ChannelEntity, onComplete:(Boolean => Unit)) extends ChannelAction { | |
def path = channelEntity.path | |
} |
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.ebay.squbs.pubsub.cube | |
import akka.actor._ | |
import akka.routing._ | |
import scala.annotation.tailrec | |
import scala.collection.mutable | |
import scala.collection.immutable | |
import java.net._ | |
import org.squbs.cluster.RebalanceLogic | |
import akka.util.ByteString |
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 org.squbs.cluster | |
import java.io.File | |
import java.nio.ByteBuffer | |
import com.google.common.base.Charsets | |
import java.net.{NetworkInterface, URLDecoder, URLEncoder, InetAddress} | |
import org.apache.zookeeper.KeeperException.{NoNodeException, NodeExistsException} | |
import org.apache.zookeeper.{WatchedEvent, CreateMode} | |
import org.apache.zookeeper.Watcher.Event.EventType | |
import org.apache.curator.retry.ExponentialBackoffRetry |
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 org.squbs.samples.pubsub.cluster | |
import akka.actor._ | |
import com.twitter.zk.{ZNode, ZkClient, RetryPolicy} | |
import com.twitter.util._ | |
import java.util.concurrent.TimeUnit | |
import scala.collection.mutable | |
import com.typesafe.config.ConfigFactory | |
import org.apache.zookeeper.CreateMode | |
import com.google.common.base.Charsets |
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.ebay | |
import akka.actor._ | |
import org.zeromq.{ZMsg, ZContext, ZMQ} | |
import java.nio.charset.Charset | |
/** | |
* Created by huzhou on 2/4/14. | |
*/ |
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.example | |
import akka.actor.{ActorRef, Actor} | |
import spray.routing._ | |
import spray.http._ | |
import MediaTypes._ | |
// we don't implement our route structure directly in the service actor because | |
// we want to be able to test it independently, without having to spin up an actor | |
class MyServiceActor extends MyService { |
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
describe("#nextSetBit", function(){ | |
var i = 0; | |
var bits = new BitSet(); | |
it("should set 1 million times fast", function(done){ | |
var begin = new Date().getTime(); | |
for(var i = 0; i < 1000000; i += 1){ | |
bits.set(i); | |
} |