Skip to content

Instantly share code, notes, and snippets.

View fbricon's full-sized avatar
🖖

Fred Bricon fbricon

🖖
View GitHub Profile
# JBoss, Home of Professional Open Source
# Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
# contributors by the @authors tag. See the copyright.txt in the
# distribution for a full listing of individual contributors.
#
# 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
# Unless required by applicable law or agreed to in writing, software
["D:\Dev\Java\jdk1.7.0_45\bin\javaw.exe", -Dfile.encoding=Cp1252, -classpath, "D:\Dev\vertx\vert.x-2.1RC3\lib\*;D:\Dev\vertx\vert.x-2.1RC3\conf\*;d:\vertx\\", org.vertx.java.platform.impl.cli.Starter, "-Dvertx.home=D:\Dev\vertx\vert.x-2.1RC3\\", "-Djava.util.logging.config.file=D:\Dev\vertx\vert.x-2.1RC3\conf\logging.properties", -Dvertx.clusterManagerFactory=org.vertx.java.spi.cluster.impl.hazelcast.HazelcastClusterManagerFactory, run, server.groovy]
@fbricon
fbricon / gist:10366564
Created April 10, 2014 10:36
trying to run a verticle at the root of a volume
D:\temp>d:\Dev\vertx\vert.x-2.1RC3\bin\vertx.bat run server.js -cp "d:\"
"D:\Dev\Java\jdk1.8.0/bin/java.exe" -Djava.util.logging.config.file="d:\Dev\vertx\vert.x-2.1RC3\bin\..\conf\logging.properties" -Dvertx.home="d:\Dev\vertx\
vert.x-2.1RC3\bin\.." -Dvertx.clusterManagerFactory="org.vertx.java.spi.cluster.impl.hazelcast.HazelcastClusterManagerFactory" -classpath ".;C:\Program Files (x
86)\Java\jre7\lib\ext\QTJava.zip;d:\Dev\vertx\vert.x-2.1RC3\bin\..\conf;d:\Dev\vertx\vert.x-2.1RC3\bin\..\lib\*" org.vertx.java.platform.impl.cli.Starter run se
rver.js -cp "d:\"
Failed in deploying verticle
org.mozilla.javascript.JavaScriptException: Error: Module "server.js" not found.
at org.mozilla.javascript.ScriptRuntime.throwError(ScriptRuntime.java:3980)
at org.mozilla.javascript.commonjs.module.Require.requireMain(Require.java:154)
at org.vertx.java.platform.impl.RhinoVerticleFactory$RhinoVerticle.start(RhinoVerticleFactory.java:229)
@fbricon
fbricon / gist:c3038d1e1438d808ee93
Created June 20, 2014 13:47
Forge2 in Eclipse : crazy amount of threads
C:\Users\Fred Bricon>jps
4536 org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
10768 org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
8404 Jps
C:\Users\Fred Bricon>jstack 4536
2014-06-20 15:41:46
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode):
"ModalContext" #285 prio=6 os_prio=0 tid=0x000000005f41f800 nid=0xeb4 runnable [0x00000000689bd000]
@fbricon
fbricon / Error
Created July 1, 2014 16:17
m2e leaking classloader?
java.lang.ExceptionInInitializerError
at de.schlichtherle.io.ArchiveControllers.<clinit>(ArchiveControllers.java:67)
at de.schlichtherle.io.File.umount(File.java:1099)
at org.jboss.ide.eclipse.archives.core.util.internal.TrueZipUtil.umount(TrueZipUtil.java:160)
at org.jboss.ide.eclipse.as.wtp.core.server.publish.LocalZippedModulePublishRunner.fullPublish(LocalZippedModulePublishRunner.java:173)
at org.jboss.ide.eclipse.as.wtp.core.server.publish.LocalZippedModulePublishRunner.fullPublishModule(LocalZippedModulePublishRunner.java:93)
at org.jboss.tools.as.core.server.controllable.subsystems.internal.ManagementPublishController.zipLocally(ManagementPublishController.java:280)
at org.jboss.tools.as.core.server.controllable.subsystems.internal.ManagementPublishController.publishModule(ManagementPublishController.java:214)
at org.jboss.ide.eclipse.as.wtp.core.server.behavior.ControllableServerBehavior.publishModule(ControllableServerBehavior.java:134)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.pu
@fbricon
fbricon / useful aliases
Created December 2, 2014 18:19
useful aliases
alias quick-verify='mvn clean verify -DskipTest'
alias remindme='history | grep'
upversion() {mvn -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$@;}
@fbricon
fbricon / POC.java
Last active August 29, 2015 14:15
Clone remote repo, fetch specific folder from tag into a separate directory
package gitwalker;
import java.io.File;
import java.io.FileOutputStream;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.eclipse.jgit.api.CloneCommand;
// this adds a "truncate(#)" method to String
// see http://www.vertigrated.com/blog/2009/11/how-to-add-a-truncateint-len-method-to-stringgstring-in-groovy/
String.metaClass.truncate = { len ->
if (delegate == null) {return''}
if (delegate.length() > len) {return delegate[0..(len - 2)] + "\u2026"}
return delegate
}
def query= "hibernate"
int size = 20
@fbricon
fbricon / SearchiskoEngine.java
Created February 20, 2015 19:28
SearchiskoEngine.java
/*************************************************************************************
* Copyright (c) 2015 Red Hat, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* JBoss by Red Hat - Initial implementation.
************************************************************************************/
@fbricon
fbricon / stacktrace
Created March 22, 2015 21:12
weird error
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.takari.polyglot:polyglot-translate-plugin:0.1.6:translate (default-cli) on project wtf: The parameters 'output', 'input' for goal io.takari.polyglot:polyglot-translate-plugin:0.1.6:translate are missing or invalid
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:220)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(D