Note: Tested on Fedora only
- Download the new release of GraalVM and unpack it anywhere in your filesystem:
$ tar -xvzf graalvm-ce-1.0.0-rc14-linux-amd64.tar.gz
CollectorRegistry collectorRegistry = new CollectorRegistry(); | |
PrometheusMeterRegistry micrometerRegistry = | |
new PrometheusMeterRegistry(PrometheusConfig.DEFAULT, collectorRegistry, Clock.SYSTEM); | |
micrometerRegistry | |
.config() | |
.commonTags() | |
.commonTags( | |
"application", | |
metadata.getName(), | |
"env", |
$ java -XshowSettings -version | |
Picked up JAVA_TOOL_OPTIONS: -Duser.country=US -Duser.language=en | |
VM settings: | |
Max. Heap Size (Estimated): 4.00G | |
Using VM: OpenJDK 64-Bit Server VM | |
Property settings: | |
awt.toolkit = sun.lwawt.macosx.LWCToolkit | |
file.encoding = UTF-8 | |
file.separator = / |
Note: Tested on Fedora only
$ tar -xvzf graalvm-ce-1.0.0-rc14-linux-amd64.tar.gz
# see: https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html | |
LOGLEVELS = %w[DEBUG INFO WARN ERROR FATAL UNKNOWN].freeze | |
LOGGER = Logger.new(STDOUT) | |
level ||= LOGLEVELS.index ENV.fetch("LOG_LEVEL","WARN") # default to WARN index: 2 | |
level ||= Logger::WARN # FIX default in case of environment LOG_LEVEL value is present but not correct | |
LOGGER.level = level | |
# Usage: | |
# before launching the program: | |
# $ export LOG_LEVEL=DEBUG |
# .1: GET API SERVERS | |
$ oc config view | grep server | |
server: https://127.0.0.1:8443 | |
server: https://192.168.65.2:8443 | |
server: https://192.168.99.100:8443 | |
server: https://api.starter-us-east-1.openshift.com:443 | |
$ oc config view | grep server | cut -f 2- -d ":" | |
https://127.0.0.1:8443 | |
https://192.168.65.2:8443 |
// The polling function | |
function poll(fn, timeout, interval) { | |
var endTime = Number(new Date()) + (timeout || 2000); | |
interval = interval || 100; | |
var checkCondition = function(resolve, reject) { | |
var ajax = fn(); | |
// dive into the ajax promise | |
ajax.then( function(response){ | |
// If the condition is met, we're done! |
curl --include \ | |
--no-buffer \ | |
--header "Connection: Upgrade" \ | |
--header "Upgrade: websocket" \ | |
--header "Host: example.com:80" \ | |
--header "Origin: http://example.com:80" \ | |
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
--header "Sec-WebSocket-Version: 13" \ | |
http://example.com:80/ |
#!/usr/bin/env python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |