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
coordinator.local-maven-repo.enabled=true | |
coordinator.git-config-repo.uri=/home/ubuntu/config.git | |
coordinator.status.expiration=5s | |
http-server.http.port=64000 | |
node.environment=demo |
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
cd hadoop-snappy | |
# Mac OS X | |
tar xzvf ~/Downloads/snappy-1.0.3.tar.gz | |
cd snappy-1.0.3 | |
./configure --prefix=$(greadlink -m $PWD/../snappy) && make install | |
cd .. | |
# Linux | |
wget http://snappy.googlecode.com/files/snappy-1.0.3.tar.gz |
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 javatest; | |
import com.google.common.base.Charsets; | |
import com.google.common.collect.Lists; | |
import com.google.common.io.Files; | |
import com.proofpoint.json.JsonCodec; | |
import org.apache.commons.httpclient.Header; | |
import org.apache.commons.logging.LogFactory; | |
import org.apache.log4j.BasicConfigurator; | |
import org.apache.log4j.Level; |
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
Running microbenchmarks. | |
WARNING: Compiled with assertions enabled, will be slow. | |
Benchmark Time(ns) CPU(ns) Iterations | |
--------------------------------------------------- | |
BM_UFlat/0 66408 66404 2856 1.4GB/s html | |
BM_UFlat/1 715414 715374 270 936.0MB/s urls | |
BM_UFlat/2 6901 6901 28368 17.1GB/s jpg | |
BM_UFlat/3 23015 23014 8071 3.8GB/s pdf | |
BM_UFlat/4 270188 270209 710 1.4GB/s html4 | |
BM_UFlat/5 25094 25089 7388 935.2MB/s cp |
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
#part-handler | |
def list_types(): | |
return ["text/plain"] | |
def handle_part(data, ctype, filename, payload): | |
if ctype not in ("__begin__", "__end__"): | |
import os | |
basedir = "/home/ubuntu/cloudconf" | |
try: |
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
private static String readEmlx(InputStream in) throws IOException | |
{ | |
BufferedReader reader = new BufferedReader(new InputStreamReader(in, Charsets.UTF_8)); | |
int size = Integer.valueOf(reader.readLine().trim()); | |
if (size <= 0) { | |
throw new IllegalStateException("bad size: " + size); | |
} | |
char[] buf = new char[size]; | |
int n = reader.read(buf, 0, size); | |
if (n < size) { |
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 org.codehaus.jackson.map.BeanDescription; | |
import org.codehaus.jackson.map.BeanProperty; | |
import org.codehaus.jackson.map.DeserializationConfig; | |
import org.codehaus.jackson.map.DeserializationContext; | |
import org.codehaus.jackson.map.JsonMappingException; | |
import org.codehaus.jackson.map.KeyDeserializer; | |
import org.codehaus.jackson.map.KeyDeserializers; | |
import org.codehaus.jackson.type.JavaType; | |
import java.io.IOException; |
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
all: ttysize | |
clean: | |
rm -f ttysize | |
ttysize: ttysize.c | |
gcc -Wall -Werror -o $@ $< |
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 javatest; | |
import com.amazonaws.auth.BasicAWSCredentials; | |
import com.amazonaws.services.identitymanagement.AmazonIdentityManagementClient; | |
import com.amazonaws.services.identitymanagement.model.AccessKey; | |
import com.amazonaws.services.identitymanagement.model.CreateAccessKeyRequest; | |
import com.amazonaws.services.identitymanagement.model.CreateUserRequest; | |
import com.amazonaws.services.identitymanagement.model.DeleteAccessKeyRequest; | |
import com.amazonaws.services.identitymanagement.model.DeleteUserPolicyRequest; | |
import com.amazonaws.services.identitymanagement.model.DeleteUserRequest; |
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 com.proofpoint.anomalytics.mailfetcher; | |
import javax.ws.rs.WebApplicationException; | |
import javax.ws.rs.core.Response; | |
import static javax.ws.rs.core.Response.Status; | |
/** | |
* Abstract parameter class for Jersey parameters | |
* |