Skip to content

Instantly share code, notes, and snippets.

View javajosh's full-sized avatar

javajosh javajosh

View GitHub Profile
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by wget configure 1.12, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="Gwt.css">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
<title>Web Application Starter Project</title>
<script type="text/javascript" language="javascript" src="gwt/gwt.nocache.js"></script>
// ==UserScript==
// @name capiche
// @namespace http://capiche.org/greasemonkey
// @description Developer tool for RESTful APIs
// @author Josh
// @homepage http://capiche.org
// @include http://localhost:8080/*
// ==/UserScript==
var p = unsafeWindow.XMLHttpRequest.prototype;
@javajosh
javajosh / SlowController.java
Created July 2, 2011 01:23
Just a SpringMVC controller
package controller;
2
3 import java.util.Map;
4 import javax.servlet.http.HttpServletRequest;
5 import javax.servlet.http.HttpServletResponse;
6 import org.springframework.web.servlet.ModelAndView;
7 import org.springframework.web.servlet.View;
8 import org.springframework.web.servlet.mvc.AbstractController;
9
10 /**
@javajosh
javajosh / Main.java
Created July 6, 2011 00:59
Static vs Inner vs Abstract classes in Java
package javajosh.hello;
public class Main {
//All children print out their names when they init
static class InitPrint {
{System.out.println(this.getClass().getName() + ": init()");}
}
static class StaticClassExample {
static class Parent extends InitPrint{
private static String value = "ParentValue";
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.List;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
@javajosh
javajosh / android.log
Created April 7, 2012 23:19
This is the output of my attempt to add BluetoothChat to my app
04-07 16:18:33.203: D/BluetoothChatService(1893): Socket TypeSecurecancel Thread[AcceptThreadSecure,5,main]
04-07 16:18:33.203: E/BluetoothChatService(1893): Socket Type: Secureaccept() failed
04-07 16:18:33.203: E/BluetoothChatService(1893): java.io.IOException: Operation Canceled
04-07 16:18:33.203: E/BluetoothChatService(1893): at android.bluetooth.BluetoothSocket.acceptNative(Native Method)
04-07 16:18:33.203: E/BluetoothChatService(1893): at android.bluetooth.BluetoothSocket.accept(BluetoothSocket.java:287)
04-07 16:18:33.203: E/BluetoothChatService(1893): at android.bluetooth.BluetoothServerSocket.accept(BluetoothServerSocket.java:105)
04-07 16:18:33.203: E/BluetoothChatService(1893): at android.bluetooth.BluetoothServerSocket.accept(BluetoothServerSocket.java:91)
04-07 16:18:33.203: E/BluetoothChatService(1893): at com.example.android.BluetoothChat.BluetoothChatService$AcceptThread.run(BluetoothChatService.java:302)
04-07 16:18:33.203: D/BluetoothChatService(1893): Socket TypeInsecurecancel Thread
@javajosh
javajosh / android.manifest.xml
Created April 7, 2012 23:20
The manifest file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1" android:versionName="1.0" package="javajosh.poc.spring2012">
<supports-screens android:largeScreens="true" android:normalScreens="true"
android:smallScreens="true" android:resizeable="true" android:anyDensity="true" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
@javajosh
javajosh / apache_cmwmini_config
Created May 11, 2012 22:11
My first attempt to combine virtual host with mod_proxy. It doesn't work.
# domain: cmwmini.com
# public: /home/josh/public/cmwmini.com/
<VirtualHost cmwmini.com:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin webmaster@javajosh.com
ServerName www.cmwmini.com
ServerAlias cmwmini.com
# Index file and Document Root (where the public files are located)
@javajosh
javajosh / vertx-bug.groovy
Created April 7, 2013 19:47
Demonstrate a bug in either vertx or the documentation
//invoke with VERTX_OPTS="" vertx run vertx-bug.groovy
def client = vertx.createNetClient();
//The docs appear to be wrong. TODO file bug with vertx http://vertx.io/core_manual_groovy.html#catching-exceptions-on-the-net-client
//Caused by: groovy.lang.MissingMethodException: No signature of method: org.vertx.groovy.core.net.impl.DefaultNetClient.exceptionHandler() is applicable for argument types: (vertx-bug$_run_closure1) values: [vertx-bug$_run_closure1@32d16fe3]
client.exceptionHandler { ex -> println "Failed to connect $ex"; container.exit() }
client.connect(1234, "localhost") { socket ->
socket.dataHandler { buffer ->