Skip to content

Instantly share code, notes, and snippets.

View timcunningham's full-sized avatar

Tim Cunningham timcunningham

View GitHub Profile
@timcunningham
timcunningham / gist:115ac64c8e3f04f15b191016c0eb0b52
Last active November 4, 2021 17:12
Converting IP Addresses To Integer Values With ColdFusion
<!--- Set the IP address. --->
<cfset ipAddress = "10.150.160.228" />
<!--- Break the IP address into numeric units. --->
<cfset ipParts = listToArray( ipAddress, "." ) />
<!--- Create a running total for our numeric IP equivalent. --->
<cfset ipNumber = 0 />
<!---
@timcunningham
timcunningham / docfetcher.cfm
Last active December 11, 2020 20:06
docfetcher
<cfscript>
param name="url.document" default="";
param name="statusText" default="";
// Get document path. Replace backslashes in url.document with forward slashes for OS consistency
documentPath = settings.batchDirectory & "/" & url.document.replace("\", "/", "all");
// Respond with 404 if the document does not exist on disk
if (! url.document.len() || ! fileExists(documentPath)) {
response.statusCode = 404;
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you 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
~
~ http://www.apache.org/licenses/LICENSE-2.0
4077 1431 1511 4710
0225
350
zip 31008
$name = $args[0] #-- Name and folder name of project
$site =$args[1] #-- site name like www.foo.com
$config = $args[2] #-- cfconfig json file to setup datasources etc..
if (!(Get-Module -ListAvailable -Name IISManager)) {
Install-Module -Name IISManager -Confirm:$False -Force
}
if (!(Get-Module -ListAvailable -Name Hosts)) {
Install-Module -Name Hosts -Confirm:$False -Force
}
$Project = $args[0]
$repo = "IDMI/$Project.git"
$fullPath = "C:\Domains\$Project"
$getLocation = Get-Location
if (-not (Test-Path -Path $fullPath) ) {
Write-Output "Clone $repo to $fullPath"
git clone git@github.com:$repo $fullPath
cd $fullpath
git fetch integration
@timcunningham
timcunningham / IISInstall.ps1
Last active January 13, 2020 16:50
IISInstall.ps1
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
# OR
# Install-BoxstarterPackage -PackageName <URL-TO-RAW-GIST> -DisableReboots
#
#Silent properties for ColdFusion 2018
INSTALLER_UI=SILENT
#Valid Values are full/trial/developer
SILENT_LICENSE_MODE=developer
#SILENT_SERIAL_NUMBER=
#Use when it is upgrade
@timcunningham
timcunningham / cfdevBoxStarter.ps1
Last active January 15, 2020 14:39
cfdevBoxStarter.ps1
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Modified: Tim Cunningham <timcunningham71@gmail.com>
# Last Updated: 2020-01-02
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Modified: Tim Cunningham <timcunningham71@gmail.com>
# Last Updated: 2020-01-02
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#