Skip to content

Instantly share code, notes, and snippets.

Adam Tuttle atuttle

Block or report user

Report or block atuttle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
atuttle / leeroy.cfg
Created Oct 20, 2011
This is my preseed file for auto-installing Ubuntu 11.04 on my Jenkins server
View leeroy.cfg
#### Contents of the preconfiguration file (for squeeze)
### Localization
# Preseeding only locale sets language, country and locale.
# The values can also be preseeded individually for greater flexibility.
#d-i debian-installer/language string en
#d-i debian-installer/country string NL
#d-i debian-installer/locale string en_GB.UTF-8
# Optionally specify additional locales to be generated.
#d-i localechooser/supported-locales en_US.UTF-8, nl_NL.UTF-8
d-i debian-installer/locale string en_US
atuttle / Amazon S3 Upload.cfm
Created Jan 28, 2013
Upload files to Amazon S3 with ColdFusion. This is heavily based on code from Joe Danziger's s3.cfc:
View Amazon S3 Upload.cfm
<cffunction name="uploadToAmazonS3">
<cfargument name="fileName" required="true" />
<cfargument name="contentType" required="true" />
<cfargument name="data" required="true" />
<cfargument name="acl" default="public-read" />
<cfargument name="storageClass" default="STANDARD" />
<cfargument name="HTTPtimeout" default="300" />
<cfargument name="bucket" default="#getProperty('EmailAttachmentS3Bucket')#" />
<cfargument name="accessKeyId" default="#getProperty('EmailAttachmentS3AccessKeyId')#" />
<cfargument name="secretKey" default="#getProperty('EmailAttachmentS3SecretKey')#" />
atuttle / timezones.cfm
Last active Dec 7, 2018
Dealing with Time Zones in ColdFusion
View timezones.cfm
Many thanks to Sean Corfield and Ryan Guill who set me down the correct path of java.util.TimeZone
writeDump(label="Conversion Examples",var={
"0-local-tz": getSystemTZ()
,"1-local-now": now()
,"2-utc-now": toUTC(now())
,"3-eastern-now": TZtoTZ( getSystemTZ(), now(), "America/New_York" )
atuttle /
Last active Oct 1, 2018
Push Packt Free Book of the Day alert into your slack channel

Push alerts about the daily 🆓 Packt eBook into Slack

Install this globally. Yes, globally.

$ npm install -g scrape-html

Now create a local project somewhere:

atuttle / artist.cfm
Created Mar 25, 2011
An example of writing REST web services in ColdFusion, without a framework. This code is provided as an example of a simple implementation, but should not be considered a best practice or something I am promoting. I use this in one of my presentations as
View artist.cfm
An example of writing REST web services in ColdFusion, without a framework (and why you should use one).
Provided as an example of a simple implementation, but should not be considered a best practice or something
I am promoting. Not thoroughly tested, not very maintainable, not even that reusable.
<cfsetting enablecfoutputonly="true" showdebugoutput="false" />
<cffunction name="StructKeyRequire" output="false">
<cfargument name="s" type="struct" />
atuttle / api.js
Created Feb 4, 2014
Angular.js REST API Service Wrapper
View api.js
app.factory('API', function($http, $q){
var basePath = '';
// =>
function makeRequest(verb, uri, data){
var defer = $q.defer();
verb = verb.toLowerCase();
//start with the uri
atuttle / Gruntfile.js
Created Jun 10, 2016
My Browserify & Grunt config for React.js with LESSCSS
View Gruntfile.js
module.exports = function(grunt){
'use strict';
less: {
bundle: {
options: {
compress: true
,report: 'min'
View deORM.cfm
function deORM( obj, depth = 1, depthLimit = 10 ){
var deWormed = {};
if (depth >= depthLimit){
return {};
if (isSimpleValue( obj )){
deWormed = obj;
else if (isObject( obj )){
atuttle / Cobalt2.spTheme
Created Apr 25, 2016
Cobalt2 theme (ported from the Sublime Text theme by @wesbos) for Sequel Pro: -- save it as Cobalt2.spTheme and import it from your settings.
View Cobalt2.spTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
atuttle / EOL.cfm
Created Apr 18, 2016
Determining what char codes ACF uses on different operating systems
View EOL.cfm
fn = "ram://eol.txt";
f = fileOpen( fn, "append", "utf-8" );
fileWriteLine( f, '1' );
fileWriteLine( f, '2' );
fileClose( f );
r = fileRead( fn );
chars = listToArray( r, '' );
You can’t perform that action at this time.