-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ioneyez
committed
Feb 19, 2017
1 parent
8d10eeb
commit 322f8b8
Showing
27 changed files
with
4,036 additions
and
473 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,22 +55,26 @@ Core Software Architecture and Plastic Contributors [pdmk] | |
Design - | ||
|
||
Chief Software Architect - John Woodworth <[email protected]> | ||
Software Consultant - Dean Ballew <[email protected]> | ||
Graphical Consultant - Shashwath Bindinganaveli Raghavan | ||
Software Integration Consultant - Dean Ballew <[email protected]> | ||
Graphical Interface Consultant - Shashwath Bindinganaveli Raghavan | ||
|
||
Development - | ||
|
||
Lead Software Developer - John Woodworth <[email protected]> | ||
Playbook Consultant - Dean Ballew <[email protected]> | ||
Chief Software Architect - John Woodworth <[email protected]> | ||
Lead Playbook Consultant - Dean Ballew <[email protected]> | ||
|
||
Testing - | ||
|
||
Chief Test Architect - Dean Ballew <[email protected]> | ||
Test Architect - Shashwath Bindinganaveli Raghavan | ||
Test Architect/ Consultant - Shashwath Bindinganaveli Raghavan | ||
|
||
End User Enablement - | ||
|
||
Chief Systems Integrator - John Woodworth <[email protected]> | ||
Chief End User Integrator - Dean Ballew <[email protected]> | ||
|
||
Official [pdmk] Code Maintainers - | ||
|
||
Chief Software Architect - John Woodworth <[email protected]> | ||
Playbook Consultant - Dean Ballew <[email protected]> | ||
Chief End User Integrator - Dean Ballew <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
#!/usr/bin/perl | ||
require 5.6.0; # Make Perl Compatibility Problems More Obvious | ||
#---------------------------------------------------------------------# | ||
####################################################################### | ||
#---------------------------------------------------------------------# | ||
# COPYRIGHT (c) 2016 CenturyLink, Inc. | ||
# SEE LICENSE-MIT FOR LICENSE TERMS | ||
# SEE CREDITS FOR CONTRIBUTIONS AND CREDITS FOR THIS PROJECT | ||
# | ||
# Program: "perlfilepack.pl" => Perl based File Packager | ||
# For Single File RESTful Service [pdmk] | ||
# | ||
# Author: John R B Woodworth <[email protected]> | ||
# | ||
# Support Contact: [email protected] | ||
# | ||
# Created: 15 April, 2016 | ||
# Last Updated: 14 December, 2016 | ||
# | ||
our $APPNAME = "perlfilepack.pl"; | ||
our $VERSION = "0.8.9b"; | ||
# | ||
# NOTES: | ||
# | ||
# CHANGES: | ||
# | ||
#---------------------------------------------------------------------# | ||
####################################################################### | ||
#---------------------------------------------------------------------# | ||
# ___ | ||
# _______ / /\ ___ | ||
# / ___ \ ___/ / \ _ / /\_________ | ||
# / /\ ) )__ / / / /__\ / / \ \ | ||
# / / \/ / \_\__/__/ / / /\\_ ____ / / _/__ /\ | ||
# / /___/ / / ____ / / ___ \/ \ / / _/ _/\ / \ | ||
# / _______/ / /\ / / / /\ \___/) /\___ / /_/ _/\\ \ / \ | ||
# / /\ \ / / \/ / / / \__\__/ / \ \/ _/\\ \\/ / \ | ||
# / / \______/ (__/ / / / / / / / // _ /\\ \\/ / / | ||
# / / / (________/ /__/ / /__/ / // / \ \ \\/ / / | ||
# /__/ / /\ \ /\ \ / \ \ / //__/ \__\/ / / | ||
# \ \ / / /\_______\/ /\__\/ \__\/ / \ \ / \ \ / / | ||
# / \__\/ / / /__________________/ / \_\/ \__\ / / | ||
# / / \___________/ \= \ /____________ / / | ||
# \____________/ \= \ \== \ \= \ / | ||
# \= \ \== \ \=== \ \== \ / | ||
# \== \ \=== \ \====_____________\/\=== \ / | ||
# \=== \ / \====______\/ \====________\/ | ||
# \====_______\/ | ||
# | ||
#---------------------------------------------------------------------# | ||
# | ||
use strict; | ||
use HTTP::Date; | ||
use File::Type; | ||
use File::Temp qw( tempfile tempdir ); | ||
use MIME::Base64; | ||
use Compress::Zlib; | ||
|
||
my $DEBUG = 1; | ||
my $typer = File::Type->new(); | ||
my (@DIRLIST) = (@ARGV); | ||
|
||
deflateInit( -Level => Z_BEST_COMPRESSION ); # Set deflate options | ||
my ($tfh, $tfile) = tempfile(); | ||
print {$tfh} "sub _initResources {\n"; | ||
print {$tfh} " (%_RES) = (\n"; | ||
foreach my $dir (@DIRLIST) { | ||
$dir =~ s#/*$##; | ||
my ($fh) = (); | ||
opendir ($fh, $dir) || do { | ||
print STDERR "Unable to open directory '${dir}' $!\n" if ($DEBUG); | ||
}; | ||
&scanDir($dir, $fh); | ||
close ($fh); | ||
} | ||
print {$tfh} " );\n"; | ||
print {$tfh} "}\n"; | ||
close($tfh); | ||
print STDERR "TFN: '${tfile}'\n"; | ||
|
||
sub scanDir { | ||
my $dir = shift; | ||
my $fh = shift; | ||
while (my $filename = readdir ($fh)) { | ||
next if ($filename =~ /^[.]{1,2}$/); # Skip parent/ self refs | ||
if (-d "${dir}/${filename}") { | ||
my ($cfh) = (); | ||
opendir ($cfh, "${dir}/${filename}") || do { | ||
print STDERR "Unable to open directory '${dir}/${filename}' $!\n" if ($DEBUG); | ||
}; | ||
&scanDir("${dir}/${filename}", $cfh); | ||
} else { | ||
my $mime = $typer->mime_type("${dir}/${filename}"); | ||
if ($filename =~ /\.js$/) { | ||
$mime = 'text/javascript'; | ||
} elsif ($filename =~ /\.html$/) { | ||
$mime = 'text/html'; | ||
} elsif ($filename =~ /\.css$/) { | ||
$mime = 'text/css'; | ||
} | ||
print STDERR "FN: ${mime} => '${dir}/${filename}'\n"; | ||
open (FILE, "<", "${dir}/${filename}") || do { | ||
print STDERR "Unable to open file '${dir}/${filename}' $!\n" if ($DEBUG); | ||
}; | ||
binmode (FILE); | ||
my $fcontents = ''; | ||
while (sysread (FILE, my $buffer, 8192)) { | ||
$fcontents .= $buffer; | ||
} | ||
close (FILE); | ||
my (@fdata) = (split (/\n+/s, encode_base64(Compress::Zlib::memGzip($fcontents)))); | ||
my $lastModified = time2str((stat("${dir}/${filename}"))[9]); | ||
print {$tfh} " '${dir}/${filename}' => [\n"; | ||
print {$tfh} " { 'Content-Type' => '${mime}', 'Content-Encoding' => 'gzip', #->\n"; | ||
print {$tfh} " 'Last-Modified' => '${lastModified}' }, \n"; | ||
while (scalar (@fdata)) { | ||
my $line = shift(@fdata); | ||
my $lend = (scalar (@fdata)) ? '. #->' : ''; | ||
print {$tfh} " '${line}'${lend}\n"; | ||
} | ||
print {$tfh} " ], \n"; | ||
} | ||
} | ||
} | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
//-------------------------------------------------------------------// | ||
/////////////////////////////////////////////////////////////////////// | ||
/*!------------------------------------------------------------------// | ||
/ COPYRIGHT (c) 2014 CenturyLink, Inc. | ||
/ SEE LICENSE-MIT FOR LICENSE TERMS | ||
/ | ||
/ Program: "PlasticBase64Polyfill.js" => Plastic Data Modeling Kit [pdmk] | ||
/ Base64 Polyfill Functions | ||
/ Author: John R B Woodworth <[email protected]> | ||
/ | ||
/ Support Contact: plastic@centurylink.com | ||
/ | ||
/ Created: 10 February, 2017 | ||
/ Last Updated: 10 February, 2017 | ||
/ | ||
/ VERSION: 1.0.0b | ||
/ | ||
/ NOTES: | ||
/ | ||
/ CHANGES: | ||
/ | ||
//-------------------------------------------------------------------*/ | ||
/////////////////////////////////////////////////////////////////////// | ||
//-------------------------------------------------------------------// | ||
/* ___ | ||
_______ / /\ ___ | ||
/ ___ \ ___/ / \__ / /\_________ | ||
/ /\ ) )__ / / / /__\ / / \ \ | ||
/ / \/ / \_\__/__/ / / /\\_ ____ / / _/__ /\ | ||
/ /___/ / / ____ / / ___ \/ \ / / _/ _/\ / \ | ||
/ _______/ / /\ / / / /\ \___/) /\___ / /_/ _/\\ \ / \ | ||
/ /\ \ / / \/ / / / \__\__/ / \ \/ _/\\ \\/ / \ | ||
/ / \______/ (__/ / / / / / / / // _ /\\ \\/ / / | ||
/ / / (________/ /__/ / /__/ / // / \ \ \\/ / / | ||
/__/ / /\ \ /\ \ / \ \ / //__/ \__\/ / / | ||
\ \ / / /\_______\/ /\__\/ \__\/ / \ \ / \ \ / / | ||
/ \__\/ / / /__________________/ / \_\/ \__\ / / | ||
/ / \___________/ \= \ /____________ / / | ||
\____________/ \= \ \== \ \= \ / | ||
\= \ \== \ \=== \ \== \ / | ||
\== \ \=== \ \====_____________\/\=== \ / | ||
\=== \ / \====______\/ \====________\/ | ||
\====_______\/ | ||
*/ | ||
//-------------------------------------------------------------------// | ||
// | ||
// This was thrown together quickly to support IE9 and older. | ||
// Maybe not the fastest implementation but novel enough to not | ||
// worry about MIT license incompatibilities };{> /JW | ||
// | ||
(function(_){ | ||
var InvalidCharacterError = function(msg) { | ||
this.message = msg; | ||
}; | ||
InvalidCharacterError.prototype = new Error; | ||
InvalidCharacterError.prototype.name = 'InvalidCharacterError'; | ||
_.btoa = _.btoa || function(inStr){ | ||
var retVal = '', buf; | ||
if (/[^\x00-\xFF]/.test(inStr)) { // Test for valid input | ||
throw new InvalidCharacterError('String contains an invalid character'); | ||
} else { | ||
for (var cntPos = 0; cntPos < inStr.length; cntPos += 3) { | ||
buf = [0]; | ||
for (var cntChar = 0; cntChar < 3; cntChar ++) { | ||
var thisCode = ((cntPos+cntChar) < inStr.length) //-> | ||
? inStr.charCodeAt(cntPos+cntChar) : null; | ||
buf[cntChar] |= thisCode >> ((cntChar)*2) | ||
buf[cntChar] = buf[cntChar] >> 2 | ||
if (thisCode !== null) { | ||
buf[cntChar+1] = (thisCode << (8-((cntChar+1)*2)) & 0xFF) | ||
if (cntChar === 2) { buf[cntChar+1] = buf[cntChar+1] >> 2; }; | ||
} else { | ||
buf[2] = (inStr.length-cntPos === 1) ? null : buf[2]; | ||
buf[3] = null; | ||
break; | ||
} | ||
} | ||
for (var cntBuf = 0; cntBuf < 4; cntBuf ++) { | ||
buf[cntBuf] = (buf[cntBuf] === null) //-> | ||
? 0x3D //-> | ||
: (buf[cntBuf] < 26) //-> | ||
? buf[cntBuf] + 65 //-> | ||
: (buf[cntBuf] < 52) //-> | ||
? buf[cntBuf] + 71 //-> | ||
: (buf[cntBuf] < 62) //-> | ||
? buf[cntBuf] - 4 //-> | ||
: (buf[cntBuf] === 62) ? 43 : 47; | ||
retVal += String.fromCharCode(buf[cntBuf]); | ||
} | ||
} | ||
} | ||
return retVal; | ||
}; | ||
_.atob = _.atob || function(inStr){ | ||
var retVal = '', buf; | ||
if (/[^A-Za-z0-9+\/=]/.test(inStr)) { // Test for valid input | ||
throw new InvalidCharacterError('String contains an invalid character'); | ||
} else { | ||
while (inStr.length % 4) { inStr += '='; }; | ||
for (var cntPos = 0; cntPos < inStr.length; cntPos += 4) { | ||
buf = [0]; | ||
for (var cntChar = 0; cntChar < 4; cntChar ++) { | ||
var thisCode = inStr.charCodeAt(cntPos+cntChar); | ||
thisCode = ((thisCode & 0x5F) === thisCode) //-> | ||
? thisCode - 65 //-> | ||
: (thisCode === 0x3D) //-> | ||
? null //-> | ||
: (thisCode === 0x2B) //-> | ||
? 62 //-> | ||
: (thisCode === 0x2F) //-> | ||
? 63 //-> | ||
: ((thisCode & 0x3F) === thisCode) //-> | ||
? thisCode + 4 //-> | ||
: ((thisCode & 0x7F) === thisCode) //-> | ||
? thisCode - 71 : null; | ||
thisCode = (thisCode === null) ? null : thisCode << ((cntChar+1)*2); | ||
if ((cntChar) && (buf[cntChar-1] !== null)) { buf[cntChar-1] |= ((thisCode & 0xFF00) >> 8); }; | ||
buf[cntChar] = (thisCode === null) ? null : (thisCode & 0xFF); | ||
} | ||
retVal += String.fromCharCode(buf[0]); | ||
retVal += (buf[2] === null) ? '' : String.fromCharCode(buf[1]); | ||
retVal += (buf[3] === null) ? '' : String.fromCharCode(buf[2]); | ||
} | ||
} | ||
return retVal; | ||
}; | ||
})(window); |
Oops, something went wrong.