Skip to content

Instantly share code, notes, and snippets.

View Bash best practices
# Bash best practices and style-guide
Just simple methods to keep the code clean.
Inspired by [progrium/bashstyle](https://github.com/progrium/bashstyle) and [Kfir Lavi post](http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/).
## Quick big rules
* All code goes in a function
* Always double quote variables
View gist:5f4959dcd584895af14d6f8bcd8b9af2
WARN Configuration of an embedded messaging broker within the appserver is enabled but is not recommended. Support for such a configuration will be removed in a future release.
INFO If you are not configuring messaging destinations, to disable configuring an embedded messaging broker set the DISABLE_EMBEDDED_JMS_BROKER environment variable to true.
WARN No password defined for JGroups cluster. AUTH protocol will be disabled. Please define JGROUPS_CLUSTER_PASSWORD.
WARN Environment variable OPENSHIFT_KUBE_PING_NAMESPACE undefined. Clustering will be unavailable. Please refer to the documentation for configuration.
INFO Configuring JGroups discovery protocol to openshift.KUBE_PING
INFO Configuring JGroups cluster traffic encryption protocol to SYM_ENCRYPT.
WARN Detected missing JGroups encryption configuration, the communication within the cluster WILL NOT be encrypted.
INFO Obtained auth token from https://sso-tools.192.168.42.21.nip.io/auth for realm master
/opt/eap/standalone/deployments ~
INFO Registered o
@skoussou
skoussou / WIH with handlingException from AbstractLogOrThrowWorkItemHandler
Created Apr 18, 2018
WIH with handlingException from AbstractLogOrThrowWorkItemHandler
View WIH with handlingException from AbstractLogOrThrowWorkItemHandler
public class CustomServiceTaskException extends AbstractLogOrThrowWorkItemHandler {
private static Logger logger = LoggerFactory.getLogger(CustomServiceTaskException.class);
@Override
public void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {
// TODO Auto-generated method stub
@skoussou
skoussou / WIH without handlingException from AbstractLogOrThrowWorkItemHandler
Created Apr 18, 2018
WIH without handlingException from AbstractLogOrThrowWorkItemHandler
View WIH without handlingException from AbstractLogOrThrowWorkItemHandler
public class CustomServiceTaskException implements WorkItemHandler {
//public class CustomServiceTaskException extends AbstractLogOrThrowWorkItemHandler {
private static Logger logger = LoggerFactory.getLogger(CustomServiceTaskException.class);
public void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {
// TODO Auto-generated method stub
}
View Mutliple Verticle Instances single Vert.x & publish on EventBus
----
[INFO] Members [4] {
[INFO] Member [192.168.122.1]:5701
[INFO] Member [192.168.122.1]:5702
[INFO] Member [192.168.122.1]:5704
[INFO] Member [192.168.122.1]:5703 this
[INFO] }
[INFO]
[INFO] Sep 07, 2017 1:04:37 PM com.hazelcast.core.LifecycleService
[INFO] INFO: [192.168.122.1]:5703 [dev] [3.6.3] Address[192.168.122.1]:5703 is STARTED
View gist:1f6bf696bfa78d315c2ea9af6bd7c430
[stkousso@stkousso kie-config-cli]$ mvn eclipse:eclipse
[INFO] Scanning for projects...
[WARNING] The POM for com.coderplus.maven.plugins:copy-rename-maven-plugin:jar:1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Failed to retrieve plugin descriptor for com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0: Plugin com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.coderplus.maven.plugins:copy-rename-maven-plugin:jar:1.0
[WARNING] The POM for org.codehaus.mojo:animal-sniffer-maven-plugin:jar:1.13 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:animal-sniffer-maven-plugin:1.13: Plugin org.codehaus.mojo:animal-sniffer-maven-plugin:1.13 or one of its dependencies could not be resolved: Failed to read artifact descri
View gist:962875151eedf427411670dc4d09ab12
14:39:42,133 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (Worker5_QueryProcessorQueue11) Creating Service {http://teiid.org}teiid from class org.apache.cxf.jaxws.support.DummyImpl
14:39:42,421 INFO [org.apache.cxf.services.AddressingService.AddressingServicePort.ServiceIface] (http-localhost/127.0.0.1:8080-1) Inbound Message
----------------------------
ID: 2
Address: http://localhost:8080/jboss-jaxws-addressing/AddressingService
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml; charset=UTF-8
Headers: {Accept=[*/*], cache-control=[no-cache], connection=[keep-alive], Content-Length=[567], content-type=[text/xml; charset=UTF-8], host=[localhost:8080], pragma=[no-cache], SOAPAction=[""], user-agent=[Apache CXF 2.7.14.redhat-1]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wsaddressing" xmlns:wsa="http://www.w3.org/2005/08/addressing">
@skoussou
skoussou / gist:67d1f4407050a85d24e0
Created Feb 26, 2015
Unsupported protocol version 74
View gist:67d1f4407050a85d24e0
15:01:06,580 DEBUG [org.infinispan.server.hotrod.HotRodDecoder] (HotRodServerWorker-8) Exception caught: io.netty.handler.codec.DecoderException: org.infinispan.server.hotrod.HotRo
dException: java.io.IOException: Unsupported protocol version 74
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:417) [netty-all-4.0.18.Final-redhat-1.jar:4.0.18.Final-redhat-1]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:141) [netty-all-4.0.18.Final-redhat-1.jar:4.0.18.Final-redhat-1]
at org.infinispan.server.core.AbstractProtocolDecoder.channelRead(AbstractProtocolDecoder.scala:459) [infinispan-server-core-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:341) [netty-all-4.0.18.Final-redhat-1.jar:4.0.18.Final-redhat-1]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:327) [nett
@skoussou
skoussou / gist:fd3bef5d83a64319d671
Created Feb 19, 2015
Starting caches -->java.lang.NullPointerException at org.infinispan.query.remote.LifecycleManager.cacheStarting(LifecycleManager.java:106)
View gist:fd3bef5d83a64319d671
16:30:07,438 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-4) ISPN000128: Infinispan version: Infinispan 'Hoptimus Prime' 7.1.1-SNAPSHOT
16:30:07,473 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.infinispan.clustered.memcachedCache: org.jboss.msc.service.StartEx
ception in service jboss.infinispan.clustered.memcachedCache: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: java.lang.NoClassDefFoundError: org/infinispan/objectfilter/ObjectFilter$FilterResult
at org.infinispan.query.remote.client.MarshallerRegistr