Skip to content

Instantly share code, notes, and snippets.

View rip747's full-sized avatar

Anthony Petruzzi rip747

View GitHub Profile
' This script will add a host header to an existing site in IIS6
' First save this script to a file
' Then run simply by calling the script from the command line passing in the arguments:
' 1) the Site Name in IIS (can be found under the description header)
' 2) the IPAddress of the host header you
' 3) the Port number for the host header (usually 80)
' 4) the full qualified host (domain) name
' EXAMPLE: wscript addHostHeader.vbs mytestsite 127.0.0.1 80 site3.example.com
Const IISService = "IIS://localhost/w3svc"
From 8922990286e83f9d9307d07dbc286b7d4ecb348e Mon Sep 17 00:00:00 2001
From: Tony Petruzzi <tpetruzzi@gmail.com>
Date: Mon, 27 Sep 2010 16:59:40 -0400
Subject: [PATCH] saving work
---
wheels/controller/layouts.cfm | 2 +-
wheels/controller/rendering.cfm | 1 +
wheels/global/appfunctions.cfm | 2 +
wheels/global/cfml.cfm | 18 +++++
@rip747
rip747 / split_repo.bash
Created October 21, 2010 15:57 — forked from pk/split_repo.bash
git extract directory into it's own repo
#!/bin/bash
FROM=$1 #/cygdrive/c/temp/oldrepo
TO=$2 #/cygdrive/c/temp/newrepo
echo "Spliting '$TO' from '$FROM'"
git clone --no-hardlinks $FROM $TO
cd $TO
git filter-branch --subdirectory-filter $TO HEAD -- --all
git reset --hard
@rip747
rip747 / wheels 1.1 settings
Created November 10, 2010 11:19
default settings for wheels 1.1
<!--- disable automatic validations --->
<cfset set(automaticValidations=false)>
<!--- delay redirections --->
<cfset set(functionName="redirectTo", delay=true)>
<!--- disable automatic form field labels --->
<cfset set(functionName="textField", label=false)>
<cfset set(functionName="textFieldTag", label=false)>
<cfset set(functionName="passwordField", label=false)>
<cfset set(functionName="passwordFieldTag", label=false)>
@rip747
rip747 / cfwheels password handling in models
Created November 16, 2010 16:53
cfwheels password handling in models
<!---
this is for wheels.1.1
--->
<cffunction name="init">
<cfset afterFind("passwordToBlank")>
<cfset beforeSave("passwordProtection")>
<!---
only valid the password when creating a record or if the password isn't
blank. this allows you to not enter anything when updating a record
@rip747
rip747 / cfwheels gitignore
Created November 23, 2010 14:01
cfwheels gitignore
# unpacked plugin folders
plugins/**/*
# files directory where uploads go
files
# DBMigrate plugin: generated SQL
db/sql
# AssetBundler plugin: generated bundles
@rip747
rip747 / cfmiddleware
Created January 4, 2011 22:06
cfmiddleware
<cfcomponent>
<cfset $class = {}>
<cffunction name="init">
<cfargument name="relativePath" type="string" default="" hint="the relative component path from the webroot">
<cfset $class.container = []>
<cfset $class.relativePath = arguments.relativePath>
</cffunction>
@rip747
rip747 / wheels tabless model
Created May 19, 2011 02:16
wheels tableless model
diff --git a/wheels/model/initialization.cfm b/wheels/model/initialization.cfm
index 3755c2c..24a6c94 100644
--- a/wheels/model/initialization.cfm
+++ b/wheels/model/initialization.cfm
@@ -45,140 +45,144 @@
// run developer's init method if it exists
if (StructKeyExists(variables, "init"))
init();
-
- // make sure that the tablename has the respected prefix
@rip747
rip747 / gist:1116619
Created July 31, 2011 08:58
cfwheels api doc generation... idea
<cfcomponent extends="Controller">
<cffunction name="index">
<cfsetting showdebugoutput="false">
<cfset releasesDir ="#get('rootpath')##get('filePath')#/releases">
<cfdirectory action="list" directory="#expandPath(releasesDir)#" filter="*.zip" name="releases">
@rip747
rip747 / gist:2853902
Created June 1, 2012 17:38
implementing a CFWheels service layer
<!--- add the following to the events/onapplicationstart.cfm --->
<cffunction name="initServices" returntype="void" hint="I initialize the services objects for this app">
<cfset var loc = {}>
<cfset application.$_ServiceObjects = {}>
<cfdirectory action="list" directory="#expandPath('services')#" name="loc.services"/>
<cfloop query="loc.services">
<cfset application.$_ServiceObjects[ListFirst(name, '.')] = createObject("component", "services.#ListFirst(name, '.')#").init()>
</cfloop>
</cffunction>
<cfset initServices()>