Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<!DOCTYPE html>
<html>
<head>
<link href="http://code.jquery.com/mobile/latest/jquery.mobile.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/knockout/2.2.1/knockout-min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/knockout.mapping/2.3.5/knockout.mapping.js"></script>
<meta charset=utf-8 />
<title>SQL Developer Exchange Requests</title>
@krisrice
krisrice / gist:5980512fa83f72779b69
Created May 29, 2015 20:20
devops-against-humanity
#!/usr/bin/env python
import urllib.request, csv, random, re
u='https://raw.githubusercontent.com/bridgetkromhout/devops-against-humanity/master/cards-DevOpsAgainstHumanity.csv'
white=[]
black=[]
lines = urllib.request.urlopen(u).read().decode('utf-8').split('\n')
for line in lines:
r=line.split(",")
set define ^
set sqlformat ansiconsole
//script longops.js klrice klrice
script
var dbUser="NOONE";
var ps1="";
if ( conn ) {
dbUser = util.executeReturnOneCol('select user from dual');
try {
var first = util.executeReturnOneCol("select 1 from dualx");
ctx.write('\n\n FIRST: ' + first + '\n\n');
} catch (e ) {
ctx.write('\n\n ERROR' + e + '\n\n');
}
sqlcl.setStmt('select X from YZ');
sqlcl.run();
var System = Java.type("java.lang.System");
reader = ctx.getProperty("script.runner.jline");
var passwd = reader.readLine(null, 0); // 0 means don't echo
System.out.println("\nGot Password:" + passwd);
// SQLCL's Command Registry
var CommandRegistry = Java.type("oracle.dbtools.raptor.newscriptrunner.CommandRegistry");
// CommandListener for creating any new command
var CommandListener = Java.type("oracle.dbtools.raptor.newscriptrunner.CommandListener")
// Broke the .js out from the Java.extend to be easier to read
var cmd = {};
// Called to attempt to handle any command
var fatFinger = [ { bad:"form", good:"from"},
{ bad:"hwere", good:"where"},
{ bad:"dula", good:"dual"}
];
// SQLCL's Command Registry
script
var MultiLineHistory = Java.type("oracle.dbtools.raptor.console.MultiLineHistory");
MultiLineHistory.getInstance().setMaxItems(1000);
/