First off, I am not a programming language theorist, so please comment below if I say anything that's completely off-base or misleading. I'll be happy to make the necessary corrections.
Clears throat
# https://github.com/rama-nallamilli/kafka-prometheus-monitoring | |
# https://github.com/Yolean/kubernetes-kafka/blob/master/prometheus/10-metrics-config.yml | |
lowercaseOutputName: true | |
rules: | |
- pattern : kafka.network<type=Processor, name=IdlePercent, networkProcessor=(.+)><>Value | |
- pattern : kafka.network<type=RequestMetrics, name=RequestsPerSec, request=(.+)><>OneMinuteRate | |
- pattern : kafka.network<type=SocketServer, name=NetworkProcessorAvgIdlePercent><>Value | |
- pattern : kafka.server<type=ReplicaFetcherManager, name=MaxLag, clientId=(.+)><>Value | |
- pattern : kafka.server<type=BrokerTopicMetrics, name=(.+), topic=(.+)><>OneMinuteRate |
### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
#!/bin/bash -e | |
INGESTER_DOMAIN_NAME="${INGESTER_DOMAIN_NAME:-$1}" | |
echo "CAUTION should be run from a secure directory" | |
if test -z "$INGESTER_DOMAIN_NAME" | |
then echo "needs INGESTER_DOMAIN_NAME" | |
exit 1 | |
else echo "INGESTER_DOMAIN_NAME=$INGESTER_DOMAIN_NAME" |
package fpmax | |
import scala.util.Try | |
import scala.io.StdIn.readLine | |
object App0 { | |
def main: Unit = { | |
println("What is your name?") | |
val name = readLine() |
# https://github.com/rama-nallamilli/kafka-prometheus-monitoring | |
# https://github.com/Yolean/kubernetes-kafka/blob/master/prometheus/10-metrics-config.yml | |
lowercaseOutputName: true | |
rules: | |
- pattern : kafka.network<type=Processor, name=IdlePercent, networkProcessor=(.+)><>Value | |
- pattern : kafka.network<type=RequestMetrics, name=RequestsPerSec, request=(.+)><>OneMinuteRate | |
- pattern : kafka.network<type=SocketServer, name=NetworkProcessorAvgIdlePercent><>Value | |
- pattern : kafka.server<type=ReplicaFetcherManager, name=MaxLag, clientId=(.+)><>Value | |
- pattern : kafka.server<type=BrokerTopicMetrics, name=(.+), topic=(.+)><>OneMinuteRate |
com.sun.management:type=DiagnosticCommand | |
com.sun.management:type=HotSpotDiagnostic | |
java.lang:name=CodeCacheManager,type=MemoryManager | |
java.lang:name=Code Cache,type=MemoryPool | |
java.lang:name=Compressed Class Space,type=MemoryPool | |
java.lang:name=G1 Eden Space,type=MemoryPool | |
java.lang:name=G1 Old Generation,type=GarbageCollector | |
java.lang:name=G1 Old Gen,type=MemoryPool | |
java.lang:name=G1 Survivor Space,type=MemoryPool | |
java.lang:name=G1 Young Generation,type=GarbageCollector |
You must use the magic method %save
:
In [1]: %save?
Type: Magic function
String Form:<bound method CodeMagics.save of <IPython.core.magics.code.CodeMagics object at 0x7fb5d25bb1d0>>
Namespace: IPython internal
File: /usr/lib/python2.7/dist-packages/IPython/core/magics/code.py
package nl.mdj.fpinscala | |
import akka.actor.{Actor, ActorRef, ActorSystem, Props} | |
import akka.pattern.ask | |
import akka.util.Timeout | |
import nl.mdj.fpinscala.KeyValueStore.{KvS, ListKeys} | |
import scala.concurrent.duration._ | |
import scala.concurrent.{ExecutionContext, Await, Future} | |
import scalaz.std.list._ |
// Create a new MergeStrategy for aop.xml files | |
val aopMerge: MergeStrategy = new MergeStrategy { | |
val name = "aopMerge" | |
import scala.xml._ | |
import scala.xml.dtd._ | |
def apply(tempDir: File, path: String, files: Seq[File]): Either[String, Seq[(File, String)]] = { | |
val dt = DocType("aspectj", PublicID("-//AspectJ//DTD//EN", "http://www.eclipse.org/aspectj/dtd/aspectj.dtd"), Nil) | |
val file = MergeStrategy.createMergeTarget(tempDir, path) |