sudo pip install localstack
sudo localstack start --docker
This file contains hidden or 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
| apiVersion: v1 | |
| kind: ReplicationController | |
| metadata: | |
| name: kube-registry-v0 | |
| namespace: kube-system | |
| labels: | |
| k8s-app: kube-registry | |
| version: v0 | |
| spec: | |
| replicas: 1 |
jmap -dump:format=b,file=cheap.bin <pid>
jhat cheap.binwget http://repo.typesafe.com/typesafe/releases/cmdline-jmxclient/cmdline-jmxclient/0.10.3/cmdline-jmxclient-0.10.3.jar
java -jar cmdline-jmxclient-0.10.3.jar - localhost:7199Sample for CASS
java -jar cmdline-jmxclient-0.10.3.jar - localhost:7199 java.lang:type=Threading ThreadCount
java -jar cmdline-jmxclient-0.10.3.jar - localhost:7199 java.lang:type=ClassLoading LoadedClassCountCopyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x- Not 100% sure if is really needed Chnage the hostname (https://gist.github.com/diegopacheco/56a0fd87626406337caea0ff15f49850) and create a route53 public dns (but I did it)
- we need change etc/jetty-jmx.xml
- We need to add configs to start.ini
- we need have a tunnel ssh
- we can acess via jvisualvm or jconsole service:jmx:rmi://127.0.0.1:10002/jndi/rmi://127.0.0.1:10001/jettyjmx
#1 bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
This file contains hidden or 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
| LoadPlugin java | |
| <Plugin "java"> | |
| JVMArg "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/generic-jmx.jar" | |
| LoadPlugin "org.collectd.java.GenericJMX" | |
| <Plugin "GenericJMX"> | |
| # Garbage collector information | |
| <MBean "garbage_collector"> | |
| ObjectName "java.lang:type=GarbageCollector,*" |
This file contains hidden or 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
| #Spider Websites with Wget – 20 Practical Examples | |
| Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute. | |
| 1. Download a single file from the Internet | |
| wget http://example.com/file.iso | |
| 2. Download a file but save it locally under a different name | |
| wget ‐‐output-document=filename.html example.com |
This file contains hidden or 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
| # to list all ports that are used | |
| sudo netstat -ntlp | grep LISTEN | |
| # you can obtain a specific port using the following command | |
| sudo netstat -ntlp | grep :8080 | |
| # when you execute the command above you will see something like that | |
| tcp 0 0 0.0.0.0:27370 0.0.0.0:* LISTEN 4394/skype | |
| tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 2216/dnsmasq | |
| tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4912/cupsd |