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/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Baseado nas regras do documento oficial: | |
# https://www2.senado.leg.br/bdsf/bitstream/handle/id/508145/000997415.pdf?sequence=1 | |
import sys | |
import unicodedata | |
def base(l): |
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
'use strict'; | |
module.exports = function CustomError(message, extra) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = this.constructor.name; | |
this.message = message; | |
this.extra = extra; | |
}; | |
require('util').inherits(module.exports, 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
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 spikes.cluster | |
import akka.actor._ | |
import com.typesafe.config.ConfigFactory | |
import akka.contrib.pattern.{ClusterClient, ClusterReceptionistExtension} | |
object DemoMaster { | |
def main(args: Array[String]): Unit = { |