Skip to content

Instantly share code, notes, and snippets.

View wy8162's full-sized avatar

Yang Wang wy8162

  • Mission Lane
  • USA
View GitHub Profile
/*
http://www.dba-oracle.com/t_plan9i_sql_full_table_scans.htm
Here is a great script to show SQL access patterns, grouped by full-table scans, index range scans and index unique scans
*/
--**************************************************************
-- Object Access script report
--
@wy8162
wy8162 / Dockerfile
Created July 17, 2015 21:00
Docker - Provisioning Weblogic Automatically
# Yang Wang
# Dockerfile for WebLogic 12.12.00 development edition
#
# Image ol6:bare is needed
FROM ol6:bare
MAINTAINER Yang Wang <[email protected]>
VOLUME /opt/app
@wy8162
wy8162 / custom.sh
Created July 17, 2015 20:54
Install Oracle Silently
#!/bin/bash
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
@wy8162
wy8162 / IndexFiles.groovy
Created July 17, 2015 20:47
Lucene and SolrJ
@Grapes(
@Grab('org.apache.lucene:lucene-core:3.4.0')
)
import java.util.zip.*
import org.apache.lucene.analysis.Analyzer
import org.apache.lucene.analysis.standard.StandardAnalyzer
import org.apache.lucene.analysis.SimpleAnalyzer
import org.apache.lucene.document.Document
import java.util.Date;
import java.util.HashMap;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
@wy8162
wy8162 / BlockingQueue.groovy
Last active October 6, 2017 12:47
Java Concurrency
// Producer / Consumer based on Blocking Queue
//
import java.util.concurrent.*;
import java.io.FileFilter;
public class FileCrawler implements Runnable {
private final BlockingQueue<File> fileQueue;
private final FileFilter fileFilter;
private final File root;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class FuturesA {
/**
* https://gist.github.com/benjchristensen/4670979