Skip to content

Instantly share code, notes, and snippets.

@dmikusa
dmikusa / cfenv.sh
Last active August 29, 2015 14:02
A handy function that you can add to your profile for managing connections to different CloudFoundry instances.
function cfenv () {
function curenv () {
if [ "$1" == "" ]; then
CURENV="default"
else
CURENV="$(echo "$1" | cut -d '-' -f 2)"
fi
}
function listenvs () {
echo "Listing available environments..."
@dmikusa
dmikusa / pom.xml
Created April 22, 2014 17:49
Example Maven configuration for using Spring Insight Annotations
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.pivotal.demos</groupId>
<artifactId>demos-insight-annotations</artifactId>
<name>MyApp</name>
<packaging>war</packaging>
<version>1.0.0-BUILD-SNAPSHOT</version>
<dependencies>
package org.apache.catalina.nonblocking;
import java.io.IOException;
import java.nio.CharBuffer;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.AsyncContext;
import javax.servlet.ReadListener;