Skip to content

Instantly share code, notes, and snippets.

@jimternet
jimternet / PhoneNumberSolver.java
Created November 9, 2012 22:39
Phone number problem
import java.util.*;
import java.lang.*;
import java.util.Map;
public class PhoneNumberSolver{
//3 numbers just for examples sake so far
private static Integer[] phoneNumber = new Integer[]{new Integer(3) , new Integer(5), new Integer(5)};
/*
String{]{"d","e","f"})
@jimternet
jimternet / tomcat java tab
Created August 1, 2013 01:56
These are the settings for log4j after the other setup procs are done. There is another GIST for the log4j.properties file
-Dcatalina.home=D:\Tomcat 7.0
-Dcatalina.base=D:\Tomcat 7.0
-Djava.endorsed.dirs=D:\Tomcat 7.0\endorsed
-Djava.io.tmpdir=D:\Tomcat 7.0\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=%CATALINA_HOME%\lib\log4j.properties
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
@jimternet
jimternet / log4j.properties
Last active December 20, 2015 11:59
These are the log4j properties that I have been using. This will be updated.
#log4j.rootLogger=INFO, stdout, CATALINA
log4j.rootLogger=INFO, LOCALHOST
# Define all the appenders
log4j.appender.CATALINA=org.apache.log4j.RollingFileAppender
log4j.appender.CATALINA.File=${catalina.home}/logs/catalina.out
log4j.appender.CATALINA.MaxFileSize=500KB
log4j.appender.CATALINA.MaxBackupIndex=5
log4j.appender.CATALINA.layout=org.apache.log4j.PatternLayout
@jimternet
jimternet / context.xml
Created August 1, 2013 01:59
Need to add this line to the context.xml in tomcat
<Context swallowOutput="true">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
..
# bash <(curl -LB http://mirrors.ibiblio.org/apache/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50.tar.gz)
wget http://mirror.metrocast.net/apache/tomcat/tomcat-7/v7.0.27/bin/apache-tomcat-7.0.50.tar.gz
mv apache-tomcat-7.0.50.tar.gz /usr/share/ && cd /usr/share/
tar -xzf apache-tomcat-7.0.50.tar.gz
mv /usr/share/apache-tomcat-7.0.50/ /usr/share/tomcat7
JAVA_OPTS="-XX:+DisableExplicitGC -XX:MaxPermSize=256m -XX:PermSize=256m
@jimternet
jimternet / app.java
Created March 24, 2014 16:14
simple HIVE JDBC POC
package com.target.cassandra.hadoop;
import java.sql.Array;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Map;
import org.apache.hadoop.hive.jdbc.HiveConnection;
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/blueprint"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<ext:property-placeholder>
<ext:default-properties>
#
brew install boot2docker
brew cask install virtualbox
brew cask install vagrant
brew cask install vagrant-manager
@jimternet
jimternet / README.md
Last active August 29, 2015 14:26 — forked from fnichol/README.md
Chef Bootstrapper For SuSE/SLES

Chef Bootstrapper For SuSE/SLES

Installation

Note: Run this script as the root user (no sudo calls are used in the script).

You will need the curl package installed, though I would have no idea why it wouldn't be installed by default:

zypper --non-interactive install curl

@jimternet
jimternet / tasks.md
Last active November 4, 2015 05:24
Just a markdown to track all the work I think we might be doing Dco

PD projects

AmDef work

  • support Family Cases
  • Migrate to embedded tomacat/ boot
  • integrate with DAMN
  • Expose CaseGet API
  • Expose attach attorney API

Document management in Amdef

  • Create API to delete by resource
  • add basic auth to ^^^^