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
/** | |
* KineticJS Bezier Extension | |
* Compatible with KineticJS JavaScript Library v3.8.0 | |
* Author: Greg Zoller | |
* Date: Apr 12 2012 | |
*/ | |
/////////////////////////////////////////////////////////////////////// | |
// Bezier | |
/////////////////////////////////////////////////////////////////////// |
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
val c = new GzipCompressor | |
val s = """{"baseServiceURL":"http://www.acme.com","endpoints":{"assetSearchURL":"/search","showsURL":"/shows","mediaContainerDetailURL":"/container","featuredTapeURL":"/tape","assetDetailURL":"/asset","moviesURL":"/movies","recentlyAddedURL":"/recent","topicsURL":"/topics","scheduleURL":"/schedule"},"urls":{"aboutAweURL":"www.foobar.com"},"channelName":"Cool Stuff","networkId":"netId","slotProfile":"slot_1","brag":{"launchesUntilPrompt":10,"daysUntilPrompt":5,"launchesUntilReminder":5,"daysUntilReminder":2},"feedbackEmailAddress":"[email protected]","feedbackEmailSubject":"Commends from User","splashSponsor":[],"adProvider":{"adProviderProfile":"","adProviderProfileAndroid":"","adProviderNetworkID":0,"adProviderSiteSectionNetworkID":0,"adProviderVideoAssetNetworkID":0,"adProviderSiteSectionCustomID":{},"adProviderServerURL":"","adProviderLiveVideoAssetID":""},"update":[{"forPlatform":"ios","store":{"iTunes":"www.something.com"},"minVer":"1.2.3","notificationVer":"1.2.5"},{ |
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 co.blocke.m2 | |
import scala.reflect.runtime.currentMirror | |
import scala.reflect.runtime.universe._ | |
case class PField( fieldName:String ) | |
case class PCaseClass( name:String, fields:List[PField], ctor:MethodMirror ) | |
// sample case classes | |
case class Simple(a:String, b:Int, c:Boolean) |
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
root@e427cd230b83:/# cat /var/log/mongodb/mongodb.log | |
Tue Sep 15 00:01:55 [initandlisten] MongoDB starting : pid=12 port=27017 dbpath=/var/lib/mongodb 64-bit host=e427cd230b83 | |
Tue Sep 15 00:01:55 [initandlisten] db version v2.0.6, pdfile version 4.5 | |
Tue Sep 15 00:01:55 [initandlisten] git version: nogitversion | |
Tue Sep 15 00:01:55 [initandlisten] build info: Linux z6 3.8-trunk-amd64 #1 SMP Debian 3.8.3-1~experimental.1 x86_64 BOOST_LIB_VERSION=1_49 | |
Tue Sep 15 00:01:55 [initandlisten] options: { command: [ "run" ], config: "/etc/mongodb.conf", dbpath: "/var/lib/mongodb", journal: "true", logappend: "true", logpath: "/var/log/mongodb/mongodb.log", unixSocketPrefix: "/var/run/mongodb" } | |
Tue Sep 15 00:01:55 [initandlisten] Assertion: 13651:Couldn't fsync directory '/var/lib/mongodb': errno:22 Invalid argument | |
0x5d74b3 0x5ddcd9 0x5dc3a9 0x7cc596 0x8d12c3 0x8d22d8 0x58f02c 0x7f42509b8ead 0x58f8e9 | |
/usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x23) [0x5d74b3] | |
/usr/bin/mongod(_ZN5mongo11msgassertedEiPKc+0xb9) [0x5d |
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
object PrimaryFlow extends App { | |
implicit val system = ActorSystem() | |
implicit val materializer = ActorMaterializer() | |
val sj = ScalaJack() | |
val graph = FlowGraph.closed() { implicit builder: FlowGraph.Builder[Unit] => | |
import FlowGraph.Implicits._ | |
val in = Source(List.empty[String]) // hook this up to RabbitMQ | |
val out = Sink.foreach( (mc:Command) => println("Command:" +mc) ) |
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
//---------------------------- build.gradle (Project: gcm) | |
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:1.5.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
package com.cof.kafka | |
import org.apache.kafka.common.serialization.{ ByteArrayDeserializer, Deserializer, StringDeserializer } | |
import java.util.concurrent.LinkedBlockingQueue | |
import org.apache.kafka.common.TopicPartition | |
import org.apache.kafka.clients.consumer.{ ConsumerRebalanceListener, OffsetCommitCallback, ConsumerRecord, KafkaConsumer, OffsetAndMetadata } | |
import scala.concurrent.Promise | |
import java.util.concurrent.TimeUnit | |
import scala.collection.JavaConversions._ | |
import scala.concurrent.Await |
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.cof.kafka | |
import scala.collection.JavaConversions._ | |
import org.apache.kafka.clients.producer.{ ProducerRecord, KafkaProducer, Callback, RecordMetadata } | |
import kafka.admin.AdminUtils | |
import kafka.utils.ZkUtils | |
case class LateProducer() { | |
def populate(num: Int, host: String, topic: String) { |
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 class SpeedGraphRC(system: ActorSystem, host: String, groupId: String, topic: String) extends GraphHolder[String] { | |
val count = new LinkedBlockingQueue[Int]() | |
val flow = RunnableGraph.fromGraph(GraphDSL.create() { implicit builder: GraphDSL.Builder[akka.NotUsed] => | |
import GraphDSL.Implicits._ | |
type In = CommittableMessage[Array[Byte], String] | |
val consumerSettings = ConsumerSettings(system, new ByteArrayDeserializer, new StringDeserializer) | |
.withBootstrapServers(host) |
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 co.blocke.reflect | |
import scala.tasty.file._ | |
import scala.tasty.Reflection | |
object Main extends App { | |
val p = Person("Fred", 53) | |
ReflectClass.showInfo(p) |
OlderNewer