Skip to content

Instantly share code, notes, and snippets.

View mikecroft's full-sized avatar
🦆

Mike Croft mikecroft

🦆
View GitHub Profile
@mikecroft
mikecroft / extract.sh
Created November 14, 2023 20:45
Extract downloaded fonts
# Assumes all zip files in current dir are fonts
for filename in *.zip ; do
sudo unzip ${filename} -d /usr/share/fonts/${filename%.*};
done
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode
#
# Build the image with:
#
# docker build -f src/main/docker/Dockerfile.multistage -t quarkus/rest-json .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/rest-json
@mikecroft
mikecroft / JMSNotificationConsumer.java
Created May 9, 2017 14:16
An example of a JMS 2.0 consumer for the Payara Server notification service
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) [2017] Payara Foundation and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
[2016-12-04T13:14:49.032+0000] [Payara Micro 4.1] [INFO] [AS-EJB-00054] [javax.enterprise.ejb.container] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1480857289032] [levelValue: 800] Portable JNDI names for EJB InfluxBean: [java:global/TemperatureMonitor/InfluxBean!io.mikecroft.home.nest.InfluxBean, java:global/TemperatureMonitor/InfluxBean]
[2016-12-04T13:14:49.052+0000] [Payara Micro 4.1] [INFO] [] [org.jboss.weld.Version] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1480857289052] [levelValue: 800] WELD-000900: 2.4.0 (Final)
[2016-12-04T13:14:49.301+0000] [Payara Micro 4.1] [INFO] [] [org.jboss.weld.Event] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1480857289301] [levelValue: 800] WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
Logging in...
[m

Keybase proof

I hereby claim:

  • I am mikecroft on github.
  • I am mikecroft (https://keybase.io/mikecroft) on keybase.
  • I have a public key whose fingerprint is 7355 26E9 D245 DFC0 46A2 FE31 6445 C1D9 2D50 E437

To claim this, I am signing this object:

@mikecroft
mikecroft / hazelcast.xml
Last active August 29, 2015 14:25
basically default Hazelcast config, slight change to TCP joiner config
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
@mikecroft
mikecroft / HTTPMBeanLogger.groovy
Last active August 29, 2015 14:11
A script to log the number of HTTP connections in a Tomcat server
/**
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2014 C2B2 Consulting Limited. All rights reserved.
*
* The contents of this file are subject to the terms of the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
@mikecroft
mikecroft / Monitor.java
Created December 16, 2014 11:09
JMX monitoring for ActiveMQ
package uk.co.c2b2.activemq.monitor;
/**
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2014 C2B2 Consulting Limited. All rights reserved.
*
* The contents of this file are subject to the terms of the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
@mikecroft
mikecroft / JMXWatchNotificationListener.java
Last active August 29, 2015 14:01
Class taken from public Oracle blog on WLDF: https://blogs.oracle.com/WebLogicServer/entry/are_my_servers_running [requires weblogic.jar]
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package jmxwatchnotificationlistener;
import javax.management.NotificationListener;
import javax.management.MBeanServerConnection;