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 protoser | |
import java.util.concurrent.atomic.AtomicReference | |
import akka.actor.ExtendedActorSystem | |
import akka.serialization.BaseSerializer | |
import com.trueaccord.scalapb.GeneratedMessageCompanion | |
class ScalaPbSerializer(val system: ExtendedActorSystem) extends BaseSerializer { | |
private val classToCompanionMapRef = new AtomicReference[Map[Class[_], GeneratedMessageCompanion[_]]](Map.empty) |
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 ws.eiennohito.utils.serialization | |
import java.lang.reflect.Modifier | |
import java.util.concurrent.ConcurrentHashMap | |
import akka.serialization.Serializer | |
import com.google.protobuf.CodedOutputStream | |
import com.trueaccord.scalapb.{GeneratedMessage, GeneratedMessageCompanion} | |
import com.typesafe.scalalogging.StrictLogging |
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 _ from 'lodash'; | |
import MemoryFileSystem from 'memory-fs'; | |
import webpack from 'webpack'; | |
import webpackConfig from '../../webpack.config'; | |
// This function allows you to do an on-the-fly, in-memory webpack compile starting | |
// with whatever file entry point you want, and receive back the compiled object. | |
export default (entry, callback) => { |
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
--- | |
# This has been tested with ansible 1.3 with these commands: | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
# NB: The type of the variable is crucial! | |
- name: Ansible Conditionals Examples | |
hosts: $hosts | |
vars_files: |