Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am hendrikstill on github.
* I am hendriks_io (https://keybase.io/hendriks_io) on keybase.
* I have a public key ASAbPLBy8yDF3NSTszbeSOEZ24Hfpv8GakzlKl3y7Gdmywo
To claim this, I am signing this object:
@hendrikstill
hendrikstill / gist:ff11cc0b24548f666238
Created October 20, 2015 12:27
gitprompt costumization for docker on mac, to see if docker-machine started a machine or not
# Docker prompt costumization
function prompt_callback {
if [[ $(docker-machine status dev) = "Running" ]]; then
echo -n " [🐳 dev]"
else
echo -n " [🐳 ✘]"
fi
}
@hendrikstill
hendrikstill / log
Created December 5, 2013 11:02
Voclipse Build log with org.eclipse.e4.tools.e3x.bridge.feature
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: com.vogella.vde:com.vogella.vde:0.1.0-SNAPSHOT @ /home/hendrik/git/com.vogella.vde/com.vogella.vde/pom.xml
[WARNING] p2 repository with URL http://download.eclipse.org/nattable/releases/1.0.1/repository is associated with multiple IDs; was 'release-nebular', now is 'release-nattable'
[INFO] Adding repository http://download.vogella.com/p2/C-MASTER-eclipse.platform.releng.aggregator/workspace/eclipse.platform.releng.tychoeclipsebuilder/sdk/target/repository
[INFO] Fetching p2.index from http://download.eclipse.org/releases/luna/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/releases/luna/ (128B at 0B/s)
[INFO] 1 operation remaining.
javax.servlet.ServletException: java.lang.NullPointerException
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:777)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:841)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:727)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:841)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:630)
at org.kohsuke.stapler.Stapler.service(Stapler.java:224)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
ListViewer<Person, List<Person>> listViewer = new ListViewer<>(parent);
listViewer.setContentProvider(new IStructuredContentProvider<Person, List<Person>>() {
...
});
listViewer.setLabelProvider(new LabelProvider<Person>(){
@Override
public String getText(Object element) {
return ((Person)element).getFirstName()+" "+((Person)element).getName();
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
@hendrikstill
hendrikstill / gist:6078275
Created July 25, 2013 09:37
Generic ArrayList to Array
ArrayList<URL> allURLs = new ArrayList<URL>();
//...
URL[] result = new URL[allURLs.size()];
return new URLClassLoader(allURLs.toArray(result), getClass().getClassLoader());
//Source EclipseFileManager.jave (jdt.compiler.tool) line 268
package stashformplugintest;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Button;
package Klausurvorbereitung.parts;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.e4.ui.di.Focus;