Skip to content

Instantly share code, notes, and snippets.

@AndrewRussellHayes
AndrewRussellHayes / rmAdded.linux.sh
Last active August 29, 2015 14:00
remove .added extension from all files in directory
rename 's/\.added$//' *.added
@AndrewRussellHayes
AndrewRussellHayes / getOracleSolarisInfo.sh
Created May 29, 2014 14:55
Get SolarisSystem information
printf "System Info for CBM Servers\n\n" >> ~/SystemInformation.txt
printf "\nProduction\n\n" >> ~/SystemInformation.txt
printf "\nOS Release:\n" >> ~/SystemInformation.txt
cat /etc/release >> SystemInformation.txt
printf "\nHostname:\n" >> ~/SystemInformation.txt
hostname >> SystemInformation.txt
printf "\nIP Address:\n" >> ~/SystemInformation.txt
/usr/sbin/ifconfig -a | awk 'BEGIN { count=0; } { if ( $1 ~ /inet/ ) { count++; if( count==2 ) { print $2; } } }' >> SystemInformation.txt
printf "\n\nRAM Info\n" >> ~/SystemInformation.txt
<!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">
@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,
@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 / 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 / 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 / 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
v_str := CASE WHEN p_Success_Check THEN 'TRUE' ELSE 'FALSE' END;
$ boot2docker init
$ boot2docker start
$ export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375