Usage :
chmod u+x ./zen.sh
./zen.sh my-dcos-stack
| import io.circe.magnolia.derivation.encoder.auto._ | |
| import org.http4s.rho._ | |
| import cats.implicits._ | |
| import cats.effect._ | |
| import com.us.repos._ | |
| class AppsEndpoint[F[+ _]: Effect](appsDao: AppsRepo[F], swaggerSyntax: SwaggerSyntax[F]) extends RhoRoutes[F] { | |
| import swaggerSyntax._ | |
| // If appsDao.list is F[Seq[App]] then the jsonEncoder outputs '[...]' |
| abstract class UserWSEndpoint[F[+ _]: Timer: Concurrent: ContextShift]( | |
| broadcastTopic: Topic[F, PushNotification])(implicit F: ConcurrentEffect[F]) | |
| extends Http4sDsl[F] | |
| with Loggable { | |
| def broadcast(e: PushNotification) = broadcastTopic.publish1(e) | |
| def toText[A: Encoder](a: A)(implicit e: Encoder[A], wse: Encoder[WSMessage]) = | |
| Text(wse(WSMessage("", "", e(a).some, "", "".some)).asString.get) |
| import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility | |
| import com.fasterxml.jackson.annotation.PropertyAccessor | |
| import com.fasterxml.jackson.databind.{DeserializationFeature, ObjectMapper, SerializationFeature} | |
| import com.fasterxml.jackson.module.scala.DefaultScalaModule | |
| import com.fasterxml.jackson.module.scala.experimental.ScalaObjectMapper | |
| import com.spotify.scio.ContextAndArgs | |
| import com.spotify.scio.values.WindowOptions | |
| import org.apache.beam.sdk.io.TextIO.CompressionType | |
| import org.apache.beam.sdk.transforms.windowing.AfterProcessingTime | |
| import org.apache.beam.sdk.values.WindowingStrategy.AccumulationMode |
| (ns db | |
| (:require [[ragtime.jdbc :as ragjdbc] | |
| [clojure.tools.logging :as log] | |
| [clojure.java.jdbc :as jdbc] | |
| [ragtime.repl :as ragrepl]]) | |
| (defn ragtime-config [database] | |
| {:datastore (ragtime.jdbc/sql-database database) | |
| :migrations (ragtime.jdbc/load-resources "migrations")}) |
| (ns core | |
| (:require [cljsjs.react-select])) | |
| (defn my-select [] | |
| [:> js/Select {:name "Select" | |
| :value "Tom" | |
| :on-change #(println "Change ! : " %) | |
| :filter-options false | |
| :options [{:value "Tom" :label "Tommy"} | |
| {:value "Tom2" :label "Tommy2"} |
Usage :
chmod u+x ./zen.sh
./zen.sh my-dcos-stack
| "use strict"; | |
| /** | |
| * Copyright (c) 2015, Facebook, Inc. | |
| * All rights reserved. | |
| * | |
| * This source code is licensed under the BSD-style license found in the | |
| * LICENSE file in the root directory of this source tree. An additional grant | |
| * of patent rights can be found in the PATENTS file in the same directory. | |
| */ |
| FROM centurylink/ca-certs | |
| MAINTAINER Travis Reeder "[email protected]" | |
| EXPOSE 8080 | |
| WORKDIR /app | |
| # copy binary into image | |
| COPY hello /app/ | |
| ENTRYPOINT ["./hello"] |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| ) | |
| const n = 500000000 | |
| func main() { |
| class Duration < Struct.new(:value, :quantity) | |
| def method_missing id, *args | |
| raise "Illegal Duration" if !value.is_a?(Numeric) || ![:years, :days, :weeks, :months, :hours, :minutes, :seconds].include?(quantity.to_sym) | |
| value.send(quantity.to_sym).send(id.id2name.to_sym) | |
| end | |
| end |