Skip to content

Instantly share code, notes, and snippets.

Avatar

Jon Bartlett jonbartlett

  • Victoria, Australia
View GitHub Profile
View plsqlpackagetemplate.pls
CREATE OR REPLACE PACKAGE %FILE% IS
/*
* %FFILE%
* Copyright (C) %YEAR% %USER% <%MAIL%>
*
* Distributed under terms of the %LICENSE% license.
*
* $Date$
* $Revision$
* $Author$
@jonbartlett
jonbartlett / OAF
Created August 25, 2009 23:52
Call PL/SQL from Java /OAF
View 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
View 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
View download_fnd.sh
#!/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
View xxcust_projectcode_install.sh
#!/usr/bin/ksh
#*******************************************************************************
#*
#* $HeadURL$
#*
#* Purpose : Install all components for XXXXXXXXXXX.
#*
#* $Author$
#*
#* $Date$
@jonbartlett
jonbartlett / git-author-rewrite.sh
Last active May 24, 2016 01:14
Blanket update email for commits in a repo
View git-author-rewrite.sh
#!/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 / .profile_colour
Last active May 24, 2016 08:06
AIX Ksh Prompt Colour by Hostname
View .profile_colour
#
# Prompt colour by host
#
# install:
#
# cat .profile_colour >> ~/.profile
#
NODE=`uname -n`
@jonbartlett
jonbartlett / crontab
Created July 5, 2016 04:37
call a ruby script from crontab when using rbenv
View crontab
/bin/bash -c 'export PATH="$HOME/.rbenv/bin:$PATH" ; eval "$(rbenv init -)" ; cd /home/vagrant/projects/tmux-status/ ; ruby -v
@jonbartlett
jonbartlett / write_count.sh
Created August 26, 2016 00:15
Monitor Progress (count of records) on a DB2 ETL Process
View write_count.sh
#! /bin/sh
for i in {1..1000}
do
db2 -tf write_count.sql
sleep 30s
done
@jonbartlett
jonbartlett / gitprompt.sh
Last active October 20, 2016 00:01
Add SVN status to bash-git-prompt
View gitprompt.sh
# Add the following function to gitprompt.sh
# via http://csnipp.com/s/191/-Git-and-SVN-Status-in-the-Bash-Prompt
function prompt_callback {
local DIRTY REV=$(svn info 2>/dev/null | grep Revision | sed -e 's/Revision: //')
[ "$REV" ] || return
[ "$(svn st)" ] && DIRTY=' *'
echo "(r$REV$DIRTY)"
return