Skip to content

Instantly share code, notes, and snippets.

View brycecaine's full-sized avatar

Bryce Caine brycecaine

View GitHub Profile
@brycecaine
brycecaine / banner_table_nature.sql
Created April 28, 2015 22:55
Determine nature of banner table (repeating, base, etc)
define qrytbl = 'rcresar';
select &qrytbl._pidm,
count(*)
from &qrytbl
group by &qrytbl._pidm
having count(*) > 1;
@brycecaine
brycecaine / inspect_sql.py
Created September 12, 2014 22:22
Determine what sql queries run within a block of code
from django.db import connection, reset_queries
import json
# ...
reset_queries()
qa = list(connection.queries)
print json.dumps(qa, indent=4)
# Code to inspect
@brycecaine
brycecaine / index.html
Last active June 6, 2017 14:22
Pushing data from Oracle using utl_http and node
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://www.example.com');
socket.on('column_value', function (data) {
console.log(data);
$('#trigger').html(data.trigger)
$('#column-value').html(data.column_value)
});
</script>