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 scala.deriving.Mirror | |
import scala.quoted.* | |
import scala.compiletime.constValue | |
trait EnumWithValue: | |
def value: String | |
object EnumWithValue: | |
inline def enumMapValues[E <: EnumWithValue](using | |
m: Mirror.SumOf[E] |
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 main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"path/filepath" | |
"strings" | |
) |
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 -S scala-cli shebang | |
//> using scala "3.2.2" | |
import scala.collection.mutable | |
enum Color: | |
case Yellow | |
case Blue |
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
[info] RedpandaSpec: | |
[info] Creating container for image: vectorized/redpanda:v21.4.14 | |
[info] Starting container with ID: 87a58766b73e33e0ff0a8fd21deaa2cb58f7c8aa07897bb2ec7dd88a5fdcb474 | |
[info] Container vectorized/redpanda:v21.4.14 is starting: 87a58766b73e33e0ff0a8fd21deaa2cb58f7c8aa07897bb2ec7dd88a5fdcb474 | |
[info] Container vectorized/redpanda:v21.4.14 started in PT4.338022S | |
[info] - should #1 produce messages when all topic was created | |
[info] Creating container for image: vectorized/redpanda:v21.4.14 | |
[info] Starting container with ID: f4b4486026d74d2e15de2690fbdd0e3910074c4e8ccc24a0266b61c808044857 | |
[info] Container vectorized/redpanda:v21.4.14 is starting: f4b4486026d74d2e15de2690fbdd0e3910074c4e8ccc24a0266b61c808044857 | |
[info] Container vectorized/redpanda:v21.4.14 started in PT4.133538S |
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
//Any - because everything in zio is private even diagnostic trait | |
class StreamDiagnostics(val queue: Queue[Any]) extends LogSupport { | |
val map = TrieMap.empty[String, Promise[Throwable, Unit]] | |
def runWithMonitor[R](tp: TopicPartition, stream: ZStream[R, Throwable, _]): ZIO[R, Throwable, Unit] = | |
for { | |
p <- Promise.make[Throwable, Unit] | |
_ <- queue.offer(StreamControl(tp, p)) | |
fb <- stream |
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
testM("should close old stream during rebalancing under load") { | |
val nrMessages = 40000 | |
val nrPartitions = 3 | |
import zio.stream.Stream | |
def run(instance: Int, topic: String, allAssigments: Ref[Map[Int, Set[Int]]]) = { | |
val subscription = Subscription.topics(topic) | |
Consumer | |
.subscribeAnd(subscription) |
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
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
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
Exception in thread "main" com.oracle.svm.core.jdk.UnsupportedFeatureError: Invoke with MethodHandle argument could not be reduced to at most a single call or single field access. The method handle must be a compile time constant, e.g., be loaded from a `static final` field. Method that contains the method handle invocation: java.lang.invoke.Invokers$Holder.invokeExact_MT(Object, Object) | |
at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:101) | |
at scala.reflect.internal.util.StatisticsStatics.areSomeColdStatsEnabled(StatisticsStatics.java:43) | |
at scala.reflect.internal.Symbols$TypeSymbol.<init>(Symbols.scala:3232) | |
at scala.reflect.internal.Symbols$ClassSymbol.<init>(Symbols.scala:3288) | |
at scala.reflect.internal.Symbols$ModuleClassSymbol.<init>(Symbols.scala:3461) | |
at scala.reflect.internal.Symbols$PackageClassSymbol.<init>(Symbols.scala:3510) | |
at scala.reflect.internal.Mirrors$Roots$RootClass.<init>(Mirrors.scala:306) | |
at scala.reflect |
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
#!/bin/sh | |
ngrep -d lo -W byline port $1 |
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
wget dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm && rpm -ihv epel-release-7-11.noarch.rpm |
NewerOlder