Skip to content

Instantly share code, notes, and snippets.

davidhooey

Block or report user

Report or block davidhooey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davidhooey
davidhooey / captured_binds_for_sqlid.sql
Created Apr 9, 2018
List values used for bind variables from single SQL_ID.
View captured_binds_for_sqlid.sql
select
snap_id,
sql_id,
name,
position,
datatype_string,
to_char(last_captured,'YYYY-MM-DD HH24:MI:SS') last_captured,
value_string
from
dba_hist_sqlbind
@davidhooey
davidhooey / p4merge4git.md
Created Jun 14, 2017 — forked from tony4d/p4merge4git.md
Setup p4merge as a visual diff and merge tool for git
View p4merge4git.md
@davidhooey
davidhooey / promisedRequest.js
Created Oct 19, 2016 — forked from anandsunderraman/promisedRequest.js
Node.js request with Q promises
View promisedRequest.js
//import the http library
var http = require('http'),
//npm install q before requiring it
Q = require('q');
//a js object with options
var googleNewsOptions = {
hostname: 'ajax.googleapis.com',
path: '/ajax/services/search/news?v=1.0&q=nodejs',
method: 'GET'
@davidhooey
davidhooey / oracle_top_sql_current.sql
Last active Jan 14, 2020
Oracle top current SQL
View oracle_top_sql_current.sql
select
*
from
(
select
module,
sql_id,
child_number,
plan_hash_value,
executions,
@davidhooey
davidhooey / oracle_top_sql_history.sql
Last active Jan 14, 2020
Oracle top historical SQL
View oracle_top_sql_history.sql
select
*
from
(
select
ss.module,
ss.snap_id,
ss.sql_id,
ss.plan_hash_value,
ss.executions_total,
@davidhooey
davidhooey / oracle_blocker_blocked_sess_history.sql
Last active Jan 13, 2020
Oracle blocker and blocked session information from history.
View oracle_blocker_blocked_sess_history.sql
select distinct
-- Snapshot ID
min(blocked.snap_id) as first_snap_id,
max(blocked.snap_id) as last_snap_id,
-- Sample ID and Time
min(blocked.sample_id) as first_sample_id,
min(blocked.sample_id) as last_sample_id,
to_char(
min(blocked.sample_time),
@davidhooey
davidhooey / protips.js
Created Jan 3, 2016 — forked from nolanlawson/protips.js
Promise protips - stuff I wish I had known when I started with Promises
View protips.js
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@davidhooey
davidhooey / xvfb
Last active Aug 29, 2015 — forked from jterrace/xvfb
Xfvb init script for ubuntu
View xvfb
# Installation
#
# 1. Install Xvfb
#
# sudo apt-get install xvfb
#
# 2. Add this file to /etc/init.d/xvfb
#
# 3. Make the script execuable.
#
@davidhooey
davidhooey / oracle_create_sts_from_application_sql.sql
Created May 19, 2015
Create Oracle SQL Tuning Set for an application's cached statements.
View oracle_create_sts_from_application_sql.sql
--
-- Create SQL Tuning Set
--
begin
dbms_sqltune.create_sqlset
(
sqlset_name => 'AppName_STS_01',
description => 'SQL Tuning Set for AppName',
sqlset_owner => 'SYS'
);
@davidhooey
davidhooey / oracle_blocker_blocked_sessions.sql
Last active Nov 12, 2015
Oracle blocker and blocked session information.
View oracle_blocker_blocked_sessions.sql
select
-- Session causing the block
blocker.sid as blocker_sid,
blocker.serial# as blocker_serial#,
blocker.username as blocker_username,
blocker.status as blocker_status,
blocker.machine as blocker_machine,
blocker.program as blocker_program,
blocker.sql_id as blocker_sql_id,
blocker.sql_child_number as blocker_sql_child_number,
You can’t perform that action at this time.