Skip to content

Instantly share code, notes, and snippets.

$ boot2docker init
$ boot2docker start
$ export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375
v_str := CASE WHEN p_Success_Check THEN 'TRUE' ELSE 'FALSE' END;
@AndrewRussellHayes
AndrewRussellHayes / extRename.sh
Created September 12, 2014 02:39
rename group of files by file extension
for file in *.cdf.cntrl; do mv "$file" "`basename $file .cdf.cntrl`.cntrl"; done
@AndrewRussellHayes
AndrewRussellHayes / Package.sql
Created August 21, 2014 10:04
combined spec and body package template
CREATE OR REPLACE PACKAGE BFH2_TEMPLATE
AS
/*
AUTHOR: Joe Developer
PACKAGE NAME: TEMPLATE SPEC
CREATION DATE: MM/DD/YYYY
PURPOSE:
DEPENDENCIES:
CHANGELOG:
@AndrewRussellHayes
AndrewRussellHayes / PackageBody.sql
Created August 21, 2014 09:41
pl/sql package template
CREATE OR REPLACE PACKAGE BODY BFH2_TEMPLATE
AS
/*
AUTHOR: Joe Developer
PACKAGE NAME: TEMPLATE BODY
CREATION DATE: MM/DD/YYYY
PURPOSE:
DEPENDENCIES:
CHANGELOG:
@AndrewRussellHayes
AndrewRussellHayes / read.pl
Last active October 21, 2015 18:20
file I/O best practices
my $filename = 'data.txt';
if (open(my $in, '<', $filename)) {
while (my $row = <$in>) {
chomp $row;
print "$row\n";
}
} else {
warn "Could not open file '$filename' $!";
}
"run current perl program
set autowrite
"map <F4> :! perl /cbm/BFH2/APP/Dev.pl<CR>
"map <F5> :! perl ./%<CR>
"map <F5> :! perl /cbm/BFH2/APP/Worker.pl<CR>
map <F2> :pm<CR>
map <F3> :! perl -wc /cbm/BFH2/LIB/WORKERS/XMLQuery.pm<CR>
map <F4> :! perl /cbm/BFH2/APP/Dev.pl<CR>
map <F5> :! perl /cbm/BFH2/APP/Worker.pl 5<CR>
command Ct cd %:p:h
@AndrewRussellHayes
AndrewRussellHayes / procedure.sql
Created July 9, 2014 12:59
pl/sql procedure template
/*
AUTHOR:Joe Developer
ACCEPTS:These Args
DOES:Performs Function
RETURNS:Return Value
DEPENDENCIES:Uses/Needs
NOTES: Special Considerations
*/
CREATE [OR REPLACE] PROCEDURE procedure_name
[ (parameter [,parameter]) ]
@AndrewRussellHayes
AndrewRussellHayes / function.sql
Created July 9, 2014 12:59
pl/sql function template
/*
AUTHOR:Joe Developer
ACCEPTS:These Args
DOES:Performs Function
RETURNS:Return Value
DEPENDENCIES:Uses/Needs
NOTES: Special Considerations
*/
CREATE OR REPLACE FUNCTION FunctionTemplate(
parameter1 number,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">