Skip to content

Instantly share code, notes, and snippets.

View drewfranz's full-sized avatar

Drew Franz drewfranz

View GitHub Profile
var d6 = {}
d6.answers = [
"Hell no!",
"No",
"No, but...",
"Yes, but...",
"Yes",
"Hell yes!"
]
d6.doubles = [
@drewfranz
drewfranz / update-route53-record.sh
Created December 5, 2019 19:17
Shell script to update AWS Route53 Record Set with current dynamically assigned IP address.
#!/bin/bash
# Use of this script relies on the AWS CLI tool being installed. More
# information on this command line tool here:
# https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html
# (optional) You might need to set your PATH variable at the top here
# depending on how you run this script
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
echo "starting update-route53-record.sh"
@drewfranz
drewfranz / geocodio.php
Created September 17, 2019 23:59
Drupal 7 Geocoder handler plugin file for adding custom integration with the Geocod.io geolocation API
<?php
/**
* @file
* Plugin to provide a Geocod.io geocoder.
*/
/**
* Plugins are described by creating a $plugin array which will be used
* by the system that includes this file.
*/
@drewfranz
drewfranz / cache_form_util.module
Created September 17, 2019 23:46
Example Drupal 7 Utility Module
<?php
/**
* @file
* Provides cache utility functions
*/
/**
* Implements hook_menu().
*/
// This code has been modified from the original to comply with NDA.
// Code may not run as expected due to the modifications applied.
(function ($) {
'use strict';
Drupal.behaviors.client_init_accordions = {
attach: function (context, settings) {
var w = $(window).width();
$('.js-accordion-module').each(function(){
var $el = $(this);
var request = require("request-json");
var url = require("url");
const fetch = require('node-fetch');
const logger = require('heroku-logger');
const newrelic = require ('newrelic');
const express = require('express')
const path = require('path')
const PORT = process.env.PORT || 5000
@drewfranz
drewfranz / routes.js
Last active September 17, 2019 23:34
/*jslint maxlen: 3000*/
var Chaps = require('chaps'),
//config = require('rind').config,
chaps = new Chaps({
//hostname : config.app.api.host,
hostname : 'https://api.example.com', // TODO: temporary get prod data
timeout : 3000
});