Skip to content

Instantly share code, notes, and snippets.

View tedwon's full-sized avatar

Ted Won tedwon

View GitHub Profile
@tedwon
tedwon / httpd.conf
Created February 11, 2020 05:18
jbcs-httpd24-httpd-2.4.37-RHEL7-x86_64.zip
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@tedwon
tedwon / JmxRemoteLifecycleListener.java
Last active February 6, 2020 07:33
JWS 3.1.7 - Apache Tomcat 8.0.36
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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
*
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
@tedwon
tedwon / standalone.xml
Last active June 22, 2019 12:06
[EAP 7.2.2] Enable One-way SSL/TLS for the Management Interfaces Using the Elytron Subsystem
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:8.0">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
<extension module="org.jboss.as.jaxrs"/>
@tedwon
tedwon / standalone.xml
Created June 22, 2019 11:46
[EAP 7.2.2] Enable Two-way SSL/TLS for the Management Interfaces Using the Elytron Subsystem
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:8.0">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
<extension module="org.jboss.as.jaxrs"/>
package org.jbugkorea.client;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.concurrent.TimeUnit;
/**
* Slow HTTP Request Reproducer.
@tedwon
tedwon / MyKnuthShuffleAlgorithm.java
Created October 18, 2018 04:35
Shuffling Algorithm Example Code
package org.jbugkorea.shuffle;
import com.google.common.collect.Lists;
/**
* https://stackoverflow.com/questions/1519736/random-shuffling-of-an-array
*/
public class MyKnuthShuffleAlgorithm {
/**
@tedwon
tedwon / jenkins-x.yml
Last active October 15, 2018 00:34
ansible-playbook jenkins-x.yml -v --ask-become-pass
#ansible-playbook jenkins-x.yml -v --ask-become-pass
---
- hosts: localhost
vars:
debian_tmp_dir: /tmp/my_temp_dir
tasks:
# Step 1. Install Jx
- name: Clean up - uninstall jx
command: brew uninstall --force jx
@tedwon
tedwon / native-mem-tracking.md
Created September 7, 2018 05:44 — forked from prasanthj/native-mem-tracking.md
Native memory tracking in JVM

Enable native memory tracking in JVM by specifying the following flag

-XX:NativeMemoryTracking=detail

Know the <PID> of the java process

jps

To print ps based RSS

ps -p <PID> -o pcpu,rss,size,vsize

To print native memory tracking summary

@tedwon
tedwon / AjpOpenListener.java
Created August 2, 2018 06:45
7.1.0:1.4.18.Final-redhat-2 => 7.1.1:1.4.18.SP2-redhat-1
/*
* JBoss, Home of Professional Open Source.
* Copyright 2014 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* 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