Skip to content

Instantly share code, notes, and snippets.

@bootleg224
bootleg224 / OW.html
Created January 19, 2017 13:38
OpenWater Tracking Codess
<meta name="google-site-verification" content="_qHAqKZrRO6BYzXtVGhCrpr2hewt8OYw7ll8nRg8LQk">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-39112981-4']);
_gaq.push(['_setDomainName', '.getopenwater.com']);
_gaq.push(['_trackPageview']);
(function()
{ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); }
@bootleg224
bootleg224 / EE Gallery
Created April 14, 2017 17:26
Place this in the footer
@bootleg224
bootleg224 / cosida.js
Created October 1, 2017 16:16
Cosida Field Lookup
function computeDistrict(division, stateOrCanada, football, nonFootball, currentSport) {
if (division == "Division I") {
if (stateOrCanada == 'ct') return 'District 1';
if (stateOrCanada == 'ma') return 'District 1';
if (stateOrCanada == 'me') return 'District 1';
if (stateOrCanada == 'nh') return 'District 1';
if (stateOrCanada == 'ny') return 'District 1';
if (stateOrCanada == 'ri') return 'District 1';
if (stateOrCanada == 'vt') return 'District 1';
Pushed to CFPC (live mode)
$(".refreshAddress").click(function()
{
var memberId = $(".cfpcMemberId input[type='text']").val();
if(memberId)
{
$.ajax("https://integration.secure-platform.com/cfpccac/getdatabymemberid?memberId=" + memberId).done(function (data)
{
var cfpcData = JSON.parse(data);
$(".primaryAddress input[name *='.Street']").val(cfpcData.Address1).change();
$(function() {
$('.practice-history-canada input[type="text"]').waitUntilExists(function() {
// total inputs fields
var $pTime = $('.practice-history-total input[type="text"]');
var $bTime = $('.practice-history-breaks-total input[type="text"]');
var $fTime = $('.practice-history-foreign input[type="text"]');
var $cTime = $('.practice-history-canada input[type="text"]');
// calculate number of days between start and end dates
var daysBetween = function(date1, date2) {
@bootleg224
bootleg224 / tinymce-cdn.html
Created August 15, 2018 17:52
TinyMCE with CDN HTML Example
<!DOCTYPE html>
<html>
<head>
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<script>
tinymce.init({
selector: 'textarea',
external_plugins:
{
'saveToPdf': 'https://cdn.rawgit.com/Api2Pdf/api2pdf.tinymce/master/save-to-pdf/dist/save-to-pdf/plugin.js'
@bootleg224
bootleg224 / CKEditorDemo.html
Created September 5, 2018 00:06
CKEditorDemo.html
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.ckeditor.com/4.10.0/standard/ckeditor.js"></script>
<script>
CKEDITOR.plugins.addExternal( 'save-to-pdf', 'https://rawgit.com/Api2Pdf/api2pdf.ckeditor4/master/plugins/save-to-pdf/', 'plugin.js' );
</script>
</head>
<body>
<textarea name="editor1"></textarea>
@bootleg224
bootleg224 / test.json
Created September 5, 2018 16:56
Test.json
{
"html": "test"
}
{"html":"<html style=\"color:green;\" lang=\"en\">\n <head>\n <title>Getting Started with Api2Pdf.com</title>\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.min.css\" />\n </head>\n <body>\n <div class=\"container\">\n <div class=\"row justify-content-md-center text-center\">\n <img src=\"https://www.api2pdf.com/wp-content/themes/api2pdf/assets/images/logo.png\" />\n </div>\n <div class=\"page-header\">\n <h2> Quick Start Guide</h2>\n </div>\n <p class=\"lead\"><a href=\"https://www.api2pdf.com/documentation\">REST API</a> | <a href=\"https://github.com/Api2Pdf/api2pdf.python\">Python</a> | <a href=\"https://github.com/Api2Pdf/api2pdf.dotnet\">.NET</a> | <a href=\"https://github.com/Api2Pdf/api2pdf.node\">Nodejs</a> | <a href=\"https://github.com/Api2Pdf/api2pdf.php\">PHP</a></p>\n <h3>What is Api2Pdf.com?</h2>\n <p>Api2Pdf.com is a REST API for instantly generating PDF documents from H