Skip to content

Instantly share code, notes, and snippets.

View davidpanzarella's full-sized avatar

David Panzarella davidpanzarella

View GitHub Profile
@Gaya
Gaya / redux-form-react-quill.jsx
Created November 9, 2017 16:00
How to use React Quill inside Redux Forms
import React from 'react';
import { Field } from 'redux-form';
import ReactQuill from 'react-quill';
function renderQuill({ input }) {
return (
<ReactQuill
{...input}
onChange={(newValue, delta, source) => {
if (source === 'user') {
function onSiteRequestStart($) {
if (external_service_gives_successful_login_message) {
userBean = $.getBean('user').loadBy(username=oAuth.prsId, $.event('siteID'));
userBean.setUsername(oAuth.prsId);
userBean.setPassword(oAuth.prsId & 'RANDOMREALLYCOMPLICATEDSTRING');
userBean.setFname(oAuth.firstName);
userBean.setLname(oAuth.lastName);
userBean.setEmail(oAuth.emailAddress);
userBean.save();
"postcssSorting.config": {
"order": [
"custom-properties",
"dollar-variables",
"at-rules",
"declarations",
{
"type": "at-rule",
"name": "media"
},

DOCKER FIRST (Webinar)

7.1 was designed with a Docker first work flow in mind.

Docker allows increased support for Continuous Deployment and Testing, Multi-Cloud Platforms, Environment Standardization and Version Control. As well as better Isolation and Security (stolen from https://dzone.com/articles/5-key-benefits-docker-ci)

@mairh
mairh / Redux-Form-Semantic-UI-React
Last active August 12, 2021 23:03
Semantic-UI-React form validation using redux-form example
// semantic-ui-form.js
import React from 'react';
import PropTypes from 'prop-types';
import { Form, Input } from 'semantic-ui-react';
export default function semanticFormField ({ input, type, label, placeholder, meta: { touched, error, warning }, as: As = Input, ...props }) {
function handleChange (e, { value }) {
return input.onChange(value);
}
@verticalgrain
verticalgrain / app.js
Last active April 26, 2022 15:37
React Router V4 Redirect after form submission
import React, { Component } from 'react'
import { Redirect } from 'react-router'
export default class ContactForm extends Component {
constructor () {
super();
this.state = {
fireRedirect: false
}
}
@stevewithington
stevewithington / mura-js-form.js
Last active April 27, 2018 19:09
Mura CMS: How to manipulate the DOM of a form in Mura CMS v7+
<script>
Mura.DisplayObject.Form.reopen({
onAfterRender: function() {
//this.context.targetEl is a pointer to the dom element that contains the rendered Mura form.
var container = Mura(this.context.targetEl);
console.log(this.context.targetEl);
}
@eballisty
eballisty / index.cfm
Created August 26, 2016 21:09
Enable Folder Expansion in Mura Site Map
<!--- This file is part of Mura CMS.
Mura CMS is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, Version 2 of the License.
Mura CMS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@eballisty
eballisty / eventHandler.cfc
Created August 26, 2016 20:13
Register Method with Mura's API
public void function onSiteRequestStart(required struct $) output=false {
var APIUtility = $.siteConfig().getApi('json', 'v1');
var Service = $.getBean('MyService');
APIUtility.registerMethod('getData', Service.getData);
// then call the method via this url:
// /index.cfm/_api/json/v1/site_id/?method=getData
}
@stevewithington
stevewithington / primary-nav-with-images.cfm
Last active April 27, 2018 19:10
Mura CMS: Custom primary navigation with primary associated images as links.
<!--- Mura 6.2 Syntax (will work in 7.0 as well) --->
<cfset it = $.getBean('feed').addParam(relationship='AND', field='parentid', condition='EQ', criteria='00000000000000000000000000000000001').getIterator() />
<!--- Mura 7.0 Syntax --->
<!--- <cfset it = $.getBean('feed').where().prop('parentid').isEQ('00000000000000000000000000000000001').getIterator() /> --->
<cfif it.hasNext()>
<ul>
<cfloop condition="it.hasNext()">
<cfset item = it.next() />
<li>
<a href="#item.getURL()#">