Skip to content

Instantly share code, notes, and snippets.

@tabdulazim
tabdulazim / pulsar-delayed-delivery.sc
Last active July 6, 2020 02:18
Test pulsar delayed delivery with ability to cancel a scheduled message
import $ivy.{`org.apache.pulsar:pulsar-client:2.6.0`}
import org.apache.pulsar.client.api._
import java.util.concurrent.TimeUnit
import java.util.Base64
val client = PulsarClient
.builder()
.serviceUrl("pulsar://localhost:6650")
.build();

Keybase proof

I hereby claim:

  • I am tabdulazim on github.
  • I am tabdulazim (https://keybase.io/tabdulazim) on keybase.
  • I have a public key ASBSZ38qGu6xfD3Q1w19cj8RVg-aCkVgEsjuMM1jVcLQ-go

To claim this, I am signing this object:

@tabdulazim
tabdulazim / server.R
Last active August 29, 2015 13:56
Distributions
library(shiny)
# Define server logic for random distribution application
shinyServer(function(input, output) {
# Reactive expression to generate the requested distribution. This is
# called whenever the inputs change. The renderers defined
# below then all use the value computed from this expression
data <- reactive({
dist <- switch(input$dist,
@tabdulazim
tabdulazim / server.R
Created February 21, 2014 01:21
Hello Shiny
shinyServer(function(input, output) {
output$main_plot <- renderPlot({
hist(faithful$eruptions,
probability = TRUE,
breaks = as.numeric(input$n_breaks),
xlab = "Duration (minutes)",
main = "Geyser eruption duration")