Skip to content

Instantly share code, notes, and snippets.

View jonbartlett's full-sized avatar

Jon Bartlett jonbartlett

  • Victoria, Australia
View GitHub Profile
@jonbartlett
jonbartlett / OAF
Created August 25, 2009 23:52
Call PL/SQL from Java /OAF
import oracle.jdbc.OracleCallableStatement;
import oracle.sql.NUMBER;
import java.sql.*;
import java.sql.Connection;
OracleCallableStatement stmt = null;
try {
OADBTransaction trx = oaapplicationmodule.getOADBTransaction();
@jonbartlett
jonbartlett / Batch decrypt files with GPG
Created October 14, 2010 02:17
Batch decrypt files with GPG
echo thisismypassphrase|gpg --batch --passphrase-fd 0 --decrypt-files *.gpg
@jonbartlett
jonbartlett / download_fnd.sh
Created June 12, 2012 05:13
Download Oracle Apps Custom Objects
#!/usr/bin/ksh
#*******************************************************************************
#*
#* $HeadURL: http://adlap802:8080/subversion/FinanceTransformation/Standards/Templates/Code/xxcust_fndload_download.sh $
#*
#* Purpose : Install all components for XXXXXXXXXXX.
#*
#* $Author:
#*
#* $Date: 2010-10-22 11:35:19 +1100 (Fri, 22 Oct 2010) $
@jonbartlett
jonbartlett / xxcust_projectcode_install.sh
Created June 12, 2012 06:19
Upload Oracle Apps Custom Objects
#!/usr/bin/ksh
#*******************************************************************************
#*
#* $HeadURL$
#*
#* Purpose : Install all components for XXXXXXXXXXX.
#*
#* $Author$
#*
#* $Date$
CREATE OR REPLACE PACKAGE %FILE% IS
/*
* %FFILE%
* Copyright (C) %YEAR% %USER% <%MAIL%>
*
* Distributed under terms of the %LICENSE% license.
*
* $Date$
* $Revision$
* $Author$
@jonbartlett
jonbartlett / Gemfile
Last active January 10, 2017 23:04
Auto DB2 Proc Compilation with Ruby Guard
source 'https://rubygems.org'
group :development do
gem 'guard'
gem 'guard-shell'
end
@jonbartlett
jonbartlett / .profile_colour
Last active May 24, 2016 08:06
AIX Ksh Prompt Colour by Hostname
#
# Prompt colour by host
#
# install:
#
# cat .profile_colour >> ~/.profile
#
NODE=`uname -n`
@jonbartlett
jonbartlett / notify
Last active May 7, 2018 00:21
Notification script
#!/bin/bash
# Send a tmux, desktop, and audio notification after the completion
# of the given command when using tmux.
#
# Requires: tmux
# Recommended: espeak, libnotify
#
# modified version of https://gist.github.com/thewtex/4969741
#
@jonbartlett
jonbartlett / git-author-rewrite.sh
Last active May 24, 2016 01:14
Blanket update email for commits in a repo
#!/bin/sh
git filter-branch --env-filter '
CORRECT_EMAIL="mail@jaybe.net"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
' --tag-name-filter cat -- --branches --tags
@jonbartlett
jonbartlett / db2_alter_tb_idempotent.ddl
Last active May 2, 2023 14:34
Create a DB2 Table in an idempotent manner
--
-- db2 -td@ -vf db2_alter_tb_idempotent.ddl
--
BEGIN
IF (EXISTS (SELECT 1
FROM SYSCAT.TABLES
WHERE TRIM(TABSCHEMA)||'.'||TRIM(TABNAME) = 'TEMP.TRANSACTIONS'))
THEN
--