Skip to content

Instantly share code, notes, and snippets.

@mhenke
mhenke / HothConfig.cfc_github
Created February 16, 2011 14:31
hoth config files from github and sample code
/**
Aaron Greenlee
http://aarongreenlee.com/
This work is licensed under a Creative Commons Attribution-Share-Alike 3.0
Unported License.
// Original Info -----------------------------------------------------------
Author : Aaron Greenlee
Created : 10/01/2010
@mhenke
mhenke / HothReporter.cfc
Created February 17, 2011 02:40
hoth report interface - coldfusion
/**
Aaron Greenlee
http://aarongreenlee.com/
This work is licensed under a Creative Commons Attribution-Share-Alike 3.0
Unported License.
// Original Info -----------------------------------------------------------
Author : Aaron Greenlee
Created : 01/12/2011
@mhenke
mhenke / migration1.cfc
Created April 14, 2011 15:21
db migrations for wheels to rename columns
<cfcomponent extends="plugins.dbmigrate.Migration" hint="change primary keys to tablenameid">
<cffunction name="up">
<cfscript>
t = renameColumn(table='products',columnName='id',newColumnName='productid');
t = renameColumn(table='productlines',columnName='id',newColumnName='productlinesid');
t = renameColumn(table='departments',columnName='id',newColumnName='departmentsid');
t = renameColumn(table='categories',columnName='id',newColumnName='categoryid');
t = renameColumn(table='classes',columnName='id',newColumnName='classid');
t = renameColumn(table='subclasses',columnName='id',newColumnName='subclassid');
t.change();
@mhenke
mhenke / style.scss
Created June 17, 2011 15:14
Starter CSS based on Blueprint CSS for use with CFWheels helpers (sass)
form.generic {
input[type="text"], textarea, select {
background: #FBFBFB;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
float: left;
}
input {
&[type="password"] {
@mhenke
mhenke / gist:1081078
Created July 13, 2011 19:12
jquery add new record
$(function(){
var template = $('#riders-div .rider-new:first').clone(),
ridersCount = 0;
var addRider = function(){
ridersCount++;
var rider = template.clone().removeClass("dontshow").find(':input').each(function(){
var newId = this.id.replace('-', 's['+ ridersCount + '][') + ']';
$(this).prev().attr('for', newId); // update label for (assume prev sib is label)
this.name = this.id = newId; // update id and name (assume the same)
@mhenke
mhenke / build.xml
Created December 19, 2011 17:24
compile check for ant script snippets
<target name="init">
<property name="jenkins_workspace" value="C:/Program Files/Jenkins/workspace/SSO/" />
<!--CFcompile Properties -->
<property name="webroot" location="//ricdev/servers/sso/cfusion.ear/cfusion.war" />
<property name="cfcompile.path" location="${webroot}/WEB-INF/cfusion/bin"/>
<property name="cfcompile.tmpClasses" location="${webroot}/WEB-INF/cfclasses/" />
<property name="cfuser" value="cfusion" />
<!--Compiler Properties-->
@mhenke
mhenke / test.cfm
Created March 15, 2012 18:19
example of another way to handle neq 0
<h2>NEQ 0</h2>
<h3>try -1,0,1,8</h3>
<cfdump var="#testneq0(-1)#"><br>
<cfdump var="#testneq0(0)#"><br>
<cfdump var="#testneq0(1)#"><br>
<cfdump var="#testneq0(8)#"><br>
<h3>try list</h3>
<cfdump var="#testneq0("ringo,john,paul,george")#"><br>
<cfdump var="#testneq0("0,1,2,3")#"><br>
@mhenke
mhenke / heroku.md
Created July 14, 2012 19:49 — forked from jaymcgavren/heroku.md
A Code TV screencast on getting started with Heroku

Description

Heroku is a simple way to publish your Rails app, and a powerful platform that will allow it to scale. In this episode, Jay McGavren gets you started with your first Heroku app. http://www.codeschool.com/code_tv/heroku

Set up your Rails app

Isolate your gem environment

  • You WANT Rails to fail locally if a gem isn't in your Gemfile
  • Otherwise you're in for a surprise when it's missing on Heroku
@mhenke
mhenke / wandrr.md
Last active December 11, 2015 21:09
@mhenke
mhenke / gist:4687026
Last active December 12, 2015 00:58
cloudy with chance of tests and deploy
<?xml version="1.0" encoding="UTF-8"?>
<project name="CloudyBuild" default="all" basedir=".">
<description>Build file for compile and other easy to implement coldfusion checks</description>
<!--
=================================
Target: init
Initializes the general settings and properties used in the build
=================================
-->
<target name="init">