View web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="api" stopProcessing="true">
<match url="^API/(.+.*)$" ignoreCase="true" />
<conditions>
<add input="{PATH_INFO}" pattern="^.*/index.cfm.*$" negate="true" />
</conditions>
View copyToClipboard.js
// Remove copy button if copy to clipboard method is not allowed
// Note: Button detection is broken before Chrome 48
var copyBtn = document.querySelector('.copyToClip');
if (copyBtn !== null) {
if( !document.queryCommandSupported('copy') ) {
copyBtn.parentNode.removeChild(copyBtn);
};
View jQueryAnimateDone.js
$container = $('myElem');
$(":animated").promise().done( function() {
if( $container[0].getBoundingClientRect().top < 50 ) {
$('html,body').animate({scrollTop: $container.offset().top}, 800);
};
});
View .htaccess
RewriteEngine on
RewriteBase /
#----- REQUIRE HTTPS for www.mysite.com -----
RewriteCond %{HTTP_HOST} ^www\.mysite\.com [NC]
RewriteCond %{HTTPS} !on
RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R]
View queryToArray.cfc
// convert a query to an array of structs
// credit: http://www.bennadel.com/blog/2367-coldfusion-10---looping-over-queries-using-a-for-in-loop-in-cfscript.htm
function queryToArray( required query query ){
var queryAsArray = [];
for (var row in query){
arrayAppend( queryAsArray, row );
}
return(queryAsArray);
}
View rebuildAllIndexes05-08.sql
-- credit: http://blog.sqlauthority.com/2009/01/30/sql-server-2008-2005-rebuild-every-index-of-all-tables-of-database-rebuild-index-with-fillfactor/
DECLARE @TableName VARCHAR(255)
DECLARE @sql NVARCHAR(500)
DECLARE @fillfactor INT
SET @fillfactor = 80
DECLARE TableCursor CURSOR FOR
SELECT OBJECT_SCHEMA_NAME([object_id])+'.'+name AS TableName
FROM sys.tables
OPEN TableCursor
View hideFileInput.htm
<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>
<body>
<style>
input {
View S3Wrapper.cfc
/**
* Amazon S3 REST Wrapper
* Version Date: 2015-09-03
*
* Copyright 2015 CF Webtools | cfwebtools.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
View S3BucketPolicy.js
{
"Version": "2012-10-17",
"Id": "BucketPolicy1",
"Statement": [
{
"Sid": "DenyUnEncryptedObjectUploads",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::myBucket/*",
View Tierney Light.tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>name</key>
<string>Tierney Light</string>