Skip to content

Instantly share code, notes, and snippets.

Avatar
😃

Dustin Schultz dustinschultz

😃
View GitHub Profile
@dustinschultz
dustinschultz / db-activity-stream.json
Created Sep 11, 2020
Example of a message from AWS Database Activity Stream
View db-activity-stream.json
{
"type": "DatabaseActivityMonitoringRecord",
"clusterId": "cluster-XXXXXXXXXXXXXXXXXXXXXXXXXX",
"instanceId": "db-XXXXXXXXXXXXXXXXXXXXXXX",
"databaseActivityEventList": [
{
"logTime": "2019-12-26 06:56:09.090054+00",
"statementId": 3731,
"substatementId": 1,
"objectType": "TABLE",
View keybase.md

Keybase proof

I hereby claim:

  • I am dustinschultz on github.
  • I am dustinschultz (https://keybase.io/dustinschultz) on keybase.
  • I have a public key ASBMLhA58F245YCoTcbUHFGqC4o1u5HOojI5T3ymkl7xzgo

To claim this, I am signing this object:

View gist:455068e477c4ccec0b6591d8542f6ace
### Keybase proof
I hereby claim:
* I am dustinschultz on github.
* I am dustinschultz (https://keybase.io/dustinschultz) on keybase.
* I have a public key ASBMLhA58F245YCoTcbUHFGqC4o1u5HOojI5T3ymkl7xzgo
To claim this, I am signing this object:
@dustinschultz
dustinschultz / h2_with_query_statistics.md
Created Dec 8, 2019
enable h2 with query statistics
View h2_with_query_statistics.md

jdbc:h2:mem:database_name;QUERY_STATISTICS=true

@dustinschultz
dustinschultz / osx_developer_clean_install.md
Last active Mar 26, 2020
OSX Developer Clean Install
View osx_developer_clean_install.md

Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Hombrew Cask

brew tap caskroom/cask

Software

brew cask install java - installs JDK8, not just Java

brew cask install java7 - installs JDK7

@dustinschultz
dustinschultz / gist:6d731fd880c8c0ac226e
Last active Aug 29, 2015
Lucene Fuzzy Query Edit Distance
View gist:6d731fd880c8c0ac226e
import java.io.IOException;
import java.io.StringReader;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.en.EnglishAnalyzer;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field.Store;
import org.apache.lucene.document.TextField;
@dustinschultz
dustinschultz / install_asciidoc_osx
Created Sep 13, 2013
Install AsciiDoc on Mac OS X
View install_asciidoc_osx
Install Homebrew - ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Install MacTex - http://tug.org/mactex/
brew install asciidoc
brew edit dblatex
copy and paste content here https://gist.github.com/dustinschultz/6544364
brew install dblatex
@dustinschultz
dustinschultz / dblatex.rb
Created Sep 12, 2013
Homebrew dblatex patched
View dblatex.rb
require 'formula'
class Dblatex < Formula
env :userpaths
url 'http://downloads.sourceforge.net/project/dblatex/dblatex/dblatex-0.3.4/dblatex-0.3.4.tar.bz2'
homepage 'http://dblatex.sourceforge.net'
md5 'a511a2eaa55757b341e4c46353c5c681'
def install
system "python", "setup.py", "install", "--prefix=#{prefix}", "--install-scripts=#{bin}"
@dustinschultz
dustinschultz / gist:5959657
Created Jul 9, 2013
Read a URL using a Scanner instead of the tedious BufferedReader
View gist:5959657
public static void main(final String[] args) {
Scanner out = null;
try {
out = new Scanner(new URL( "http://demo.further.utah.edu:9000/dts/rest/translate/5102/Code%20in%20Source/"
+ "41759-2/32868/Local%20Code?view=HUMAN").openStream(), "UTF-8")
.useDelimiter("\\A");
final String result = out.next();
if (result.indexOf("propertyValue") == -1) {
@dustinschultz
dustinschultz / gist:5786108
Created Jun 14, 2013
Test XML document without XML declaration
View gist:5786108
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>