This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @(#)LogFile.java | |
* | |
* Copyright (c) 2001 Andrew Lee Rubinger | |
* | |
* @author Andrew Lee Rubinger | |
* @version 1.0 | |
*/ | |
package com.alrubinger.util; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String name = "test.jar"; | |
ArchivePath path = ArchivePaths.create("WEB-INF/lib", name); | |
JavaArchive war = ShrinkWrap.create(JavaArchive.class) | |
.add( | |
ShrinkWrap.create(JavaArchive.class, name) | |
.add(EmptyAsset.INSTANCE, "some"), path, ZipExporter.class); | |
Assert.assertTrue(war.contains(path)); | |
war.delete(path); | |
Assert.assertFalse("Path should have been deleted", war.contains(path)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alr@distortion ~/business/jboss/git/shrinkwrap/resolver $ rhc show-app site --gears quota -ldevnation-internal@redhat.com | |
Password: ******************** | |
Gear Cartridges Used Limit | |
------------------------ ---------------------- ------ ----- | |
5293f1b6e0b8cdb082000082 jbosseap-6 haproxy-1.4 1.2 GB 1 GB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Organization { | |
String PROP_NAME = "name"; | |
String REL_PROJECTS = "sponsors"; | |
/** | |
* Gets the name of this {@link org.jboss.metrics.playground.model.Organization} | |
* @return | |
*/ | |
@Property(PROP_NAME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Calling: | |
FramedGraph: | |
public <F> F frame(final Vertex vertex, final Class<F> kind) | |
like: | |
final String framedObject = framedGraph.frame(vertex, String.class); | |
...yields: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.tinkerpop.blueprints.Graph; | |
import com.tinkerpop.blueprints.Vertex; | |
import com.tinkerpop.blueprints.impls.neo4j2.Neo4j2Graph; | |
import org.jboss.metrics.playground.persistence.Neo4jExternalTransactionManager; | |
import org.junit.AfterClass; | |
import org.junit.Assert; | |
import org.junit.BeforeClass; | |
import org.junit.Test; | |
import org.neo4j.graphdb.GraphDatabaseService; | |
import org.neo4j.graphdb.factory.GraphDatabaseFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Open a browser at the given URL using {@link Desktop} if available, or alternatively output the | |
* URL to {@link System#out} for command-line applications. | |
* | |
* @param url URL to browse | |
*/ | |
public static void browse(String url) { | |
Preconditions.checkNotNull(url); | |
// Ask user to open in their browser using copy-paste | |
System.out.println("Please open the following address in your browser:"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NullVarArgs { | |
public static void main(String... args) { | |
// 1 | |
exec(null); | |
// 2 | |
exec((String) null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alr@distortion ~/business/jboss/git/bu/metrics (6 *) $ osprey list rest/src/assets/raml/api.raml | |
GET /sites | |
GET /sites/{siteId} | |
#%RAML 0.8 | |
--- | |
title: Red Hat JBoss Middleware Metrics | |
baseUri: http://metricsrest-alrubinger.rhcloud.com/api/{version} | |
version: v1 | |
/sites: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.jboss.metrics.impl.persistence.blueprints; | |
import com.tinkerpop.blueprints.CloseableIterable; | |
import com.tinkerpop.blueprints.Graph; | |
import com.tinkerpop.blueprints.Index; | |
import com.tinkerpop.blueprints.IndexableGraph; | |
import com.tinkerpop.blueprints.Vertex; | |
import com.tinkerpop.frames.FramedGraph; | |
import com.tinkerpop.frames.FramedGraphFactory; | |
import org.jboss.metrics.spi.model.PersistentEntity; |
OlderNewer