Skip to content

Instantly share code, notes, and snippets.

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Listening for transport dt_socket at address: 9009
Launching GlassFish on Felix platform
Jul 18, 2015 10:37:08 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Jul 18, 2015 10:37:08 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.
Jul 18, 2015 10:37:08 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@9289532 in service registry.
@ratcashdev
ratcashdev / mytemp.py
Created March 3, 2018 20:57
homeassistent sensor definition file
"""
Support for Xiaomi Mi Temp BLE environmental sensor.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.mitemp/
"""
import logging
import voluptuous as vol
@ratcashdev
ratcashdev / mytemp_bt.py
Created March 27, 2018 19:01
mitemp_bt implementation for Home-Assistant.io
"""
Support for Xiaomi Mi Temp BLE environmental sensor.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.mitemp_bt/
"""
import logging
import voluptuous as vol
@ratcashdev
ratcashdev / letsencrypt.py
Created April 27, 2018 09:55
Let's encrypt script to retrieve and upload keys/certificates to Payara
#!/usr/bin/env python3
from pathlib import Path
from os import path
from subprocess import call, check_call, CalledProcessError
import argparse
ASADMIN_PATH="./asadmin"
WEB_ROOT_PATH=Path(path.expanduser("~")) / "payara_le_war"
LE_LIVE_PATH=Path("/etc/letsencrypt/live/")
@ratcashdev
ratcashdev / payara5-pre.log
Created July 16, 2018 10:30
OOM when accessing a JSP
Jul 16, 2018 12:22:00 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@342d66f7 in service registry.
#!## LogManagerService.postConstruct : rootFolder=C:\Users\MatyasBene\Apps\payara5-p2\glassfish
#!## LogManagerService.postConstruct : templateDir=C:\Users\MatyasBene\Apps\payara5-p2\glassfish\lib\templates
#!## LogManagerService.postConstruct : src=C:\Users\MatyasBene\Apps\payara5-p2\glassfish\lib\templates\logging.properties
#!## LogManagerService.postConstruct : dest=C:\Users\MatyasBene\Apps\payara5-p2\glassfish\domains\domain1\config\logging.properties
Info: Running Payara Version: Payara Server 5 #badassfish (build 344)
Info: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Info: Registered fish.payara.ha.hazelcast.store.Hazelc
@ratcashdev
ratcashdev / ConditionalAndBenchmark.java
Created October 29, 2019 15:32
JMH benchmark to compare conditional and bitwise AND
package alu.vs.branch;
import java.util.Random;
import org.agrona.BitUtil;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.CompilerControl;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Param;
@ratcashdev
ratcashdev / set-adaptive-performance-mode.sh
Last active July 30, 2020 09:47
This scripts sets the DPTF profile to ADAPTIVE_PERFORMANCE under linux and enables the relevant thermal zone. Requires ROOT and a fairly recent kernel (likely 5.3+)
#!/bin/bash
# DISCLAIMER
# This script is not officially created nor endorsed by the manufacturer(s) of your software, hardware or parts of it.
# Apply/use at your own discretion considering all possible consequences (bricked devices, dead machine, thermonuclear war, etc.).
# LICENCE
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.