Skip to content

Instantly share code, notes, and snippets.

{
"something": "something",
"somethingelse": "somethingelse",
"results": [
{
"foo" : "bar"
} ,
{
"foo" : "bar"
} ,
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.util.component.LifeCycle;
import org.eclipse.jetty.webapp.WebAppContext;
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.airhacks</groupId>
<artifactId>javaee-essentials-pom</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>javax</groupId>
# download and make Redis
$ wget http://redis.googlecode.com/files/redis-2.6.9.tar.gz
$ sudo tar xzf redis-2.6.9.tar.gz -C /usr/lib/
$ cd /usr/lib/redis-2.6.9
$ sudo make
# create symlinks to the /usr/local/bin
$ sudo ln -s /usr/lib/redis-2.6.9/src/redis-server /usr/local/bin/redis-server
$ sudo ln -s /usr/lib/redis-2.6.9/src/redis-cli /usr/local/bin/redis-cli
@janih
janih / gist:4536956
Created January 15, 2013 07:37
A Java class to determine image width, height and color depth for a number of image file formats. Written by Marco Schmidt
/*
* ImageInfo.java
*
* Version 1.9
*
* A Java class to determine image width, height and color depth for
* a number of image file formats.
*
* Written by Marco Schmidt
*