Skip to content

Instantly share code, notes, and snippets.

View rwatts3's full-sized avatar
💭
Engineering Stuff

Ryan Watts rwatts3

💭
Engineering Stuff
View GitHub Profile
# Also refer to https://gist.github.com/stevewithington/5060602 if you wish to allow for mixed siteIDs in URLs
# Apache mod_rewrite Docs: http://httpd.apache.org/docs/current/rewrite/
# Intro: http://httpd.apache.org/docs/current/rewrite/intro.html
# Flags: http://httpd.apache.org/docs/current/rewrite/flags.html
Options All -Indexes
Options +FollowSymLinks
# -------------------------------------------------------------------------------
# MURA REWRITE OPTIONS
@rwatts3
rwatts3 / muraImportUsersViaCSV.cfm
Created October 27, 2015 07:29 — forked from stevewithington/muraImportUsersViaCSV.cfm
Example of how to import Users into Mura CMS via .CSV file. Also see https://gist.github.com/stevewithington/4742829 to import content from an RSS Feed.
<cfscript>
param name='form.csvUrl' default='#getPageContext().getRequest().getScheme()#://#cgi.server_name##getDirectoryFromPath(getPageContext().getRequest().getRequestURI())#users.csv';
param name='form.group' default='Temp';
param name='form.isSubmitted' default='false';
param name='form.isTest' default='true';
param name='form.siteid' default='default';
$ = application.serviceFactory.getBean('$').init(form.siteid);
if ( !$.currentUser().isSuperUser() && !$.currentUser().isInGroup('admin') ) {
@rwatts3
rwatts3 / muraImportContentFromRSS.cfm
Created October 27, 2015 07:29 — forked from stevewithington/muraImportContentFromRSS.cfm
Mura CMS: Example of how to import content into Mura CMS from an RSS feed. Place the file under your Mura root. For example: http://yourdomain.com/temp/import/index.cfm. Also see https://gist.github.com/stevewithington/5051646 to importUsersViaCSV
<cfscript>
param name='form.rssurl' default='';
param name='form.parentfilename' default='blog';
param name='form.isSubmitted' default='false';
param name='form.istest' default='true';
param name='form.siteid' default='default';
$ = application.serviceFactory.getBean('$').init(form.siteid);
if ( !$.currentUser().isSuperUser() && !$.currentUser().isInGroup('admin') ) {
@rwatts3
rwatts3 / mura-node.cfm
Created October 28, 2015 07:34 — forked from ronnieduke/mura-node.cfm
Create a new Mura content node
<cfscript>
// Load a new content Bean
bean=$.getBean('content');
//Set the parent node of where you want the new node to live
bean.setParentID('some id');
bean.setTitle('Some Title');
//Should this go live immediately? 0=no 1=yes
@rwatts3
rwatts3 / jquery.scrolldepth.js
Created October 28, 2015 17:06
jQuery Scroll Depth Fix for Google Tag Manager
/*!
* @preserve
* jquery.scrolldepth.js | v0.7
* Copyright (c) 2014 Rob Flaherty (@robflaherty)
* Licensed under the MIT and GPL licenses.
*/
if (window.jQuery) {
;(function ( $, window, document, undefined ) {
@rwatts3
rwatts3 / submit_form.html
Created October 30, 2015 07:14 — forked from jeremyhodges/submit_form.html
Using Dropzone.JS to upload via orion.filesystem with drag and drop support.
<template name="submit_form">
<div class="alert alert-success" style="display: none;" role="alert">
<strong>Your work has been submitted!</strong> You successfully submitted your work. It is now in-review.
</div>
<div class="well">
{{# with job }}
<h3 class="text-info job-name" data-job-id="{{ _id }}">{{ name }}</h3>
@rwatts3
rwatts3 / code.sh
Created June 10, 2016 01:14
Docker Machine connect to existing Digital Ocean Account using "generic" drive.
cat ~/.ssh/id_dsa.pub | ssh user@remotehost 'cat >> ~/.ssh/authorized_keys'
@rwatts3
rwatts3 / readme.md
Created June 10, 2016 22:57 — forked from philipz/readme.md
Send file over SSH

cat docker-compose.yml | docker-machine ssh mhs-demo0 "cat - &gt; docker-compose.yml"

@rwatts3
rwatts3 / Dockerfile
Created June 29, 2016 03:17 — forked from Maxim-Filimonov/Dockerfile
Docker meteor example files
# User for local dev
FROM app/base
RUN npm install -g orion-cli
# This forces package-catalog update. Should speed up further runs
RUN meteor show meteor-platform
@rwatts3
rwatts3 / ajaxData.cfc
Created September 12, 2016 21:38 — forked from stevewithington/ajaxData.cfc
Mura CMS : jQuery Ajax example. Sometimes, you'll need to access a file via Ajax in Mura. Some key things to keep in mind are 1) You cannot directly access a .cfm file located under a SiteID unless a) it resides in a directory called 'remote' [as of v6.1], or b) You edit the file located under /{SiteID}/includes/Application.cfc on approximately …
<cfscript>
// Save this file to a path such as /{SiteID}/includes/themes/{ThemeName}/remote/ajaxData.cfc
component {
remote string function getData(siteid='default', contentid='00000000000000000000000000000000001') returnformat='plain' {
var str = '';
var $ = get$(arguments.siteid, arguments.contentid);
savecontent variable='str' {
WriteOutput("<h1>Hello from ajaxData.cfc</h1>