This file contains hidden or 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
<!--- coldfusion 8 version ---> | |
<cfcomponent> | |
<cffunction name="plupload" access="remote" returntype="struct" returnformat="json" output="false"> | |
<cfargument name="name" default="" /> | |
<cfscript> | |
var uploadDir = expandPath('../assets/'); | |
var uploadFile = uploadDir & arguments.NAME; | |
var response = {result = arguments.NAME, id = 0}; | |
var result = {}; |
This file contains hidden or 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
// the cache version gets updated every time there is a new deployment | |
const CACHE_VERSION = 10; | |
const CURRENT_CACHE = `main-${CACHE_VERSION}`; | |
// these are the routes we are going to cache for offline support | |
const cacheFiles = ['/', '/about-me/', '/projects/', '/offline/']; | |
// on activation we clean up the previously registered service workers | |
self.addEventListener('activate', evt => | |
evt.waitUntil( |
This file contains hidden or 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
component { | |
variables.ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
variables.BASE = bigInt(len(ALPHABET).toString()); | |
private any function bigInt (required string input ){ | |
return createObject("java", "java.math.BigInteger").init(input); | |
} | |
private any function stringBuilder (string input = "") { |
This file contains hidden or 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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
This file contains hidden or 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
<cfcomponent> | |
<cffunction name="upload" access="remote" returntype="struct" returnformat="json" output="false"> | |
<cfscript> | |
// var uploadDir = expandPath('.') & '/uploads/'; // should be a temp directory that you clear periodically to flush orphaned files | |
var uploadDir = getTempDirectory(); | |
var uploadFile = uploadDir & arguments.NAME; | |
var response = {'result' = arguments.NAME, 'id' = 0}; | |
var result = {}; | |
// if chunked append chunk number to filename for reassembly |