Skip to content

Instantly share code, notes, and snippets.

View 123andy's full-sized avatar

Andy Martin 123andy

  • Stanford University
  • Stanford, CA
View GitHub Profile
@123andy
123andy / fix bad commit
Created March 19, 2020 21:15
Dealing with a corrupt redcap builder issue
We have seen cases where an EM repo ends up nesting the entire REDCap web repo inside of it recursively. You often get /webauth/webauth/webuath runaways.
determine the hash for the last 'good' commit.
git checkout dev
git log -5 // determine last good commit
git reset --hard HASH
git push -f origin dev
Then repeat for master and prod if it ended up there...
@123andy
123andy / update_pull.php
Last active February 3, 2020 18:57
A script to update any cloned modules in your local REDCap development server
<?php
/*
* This script is intended to help you keep your many cloned external modules current...
* To run, place this in your redcap root folder and from the command line run
*
* php update_pull.php
*
* Note that nothing will be automatically done unless you pass in a true argument as in
*
@123andy
123andy / config.js
Created April 30, 2019 17:00
converting format of js...
// Create a javascript object to hold all of our config features
var SummarizeConfig = {
init: function(params) {
// Make true
this.isDev = true;
// We need to delay a little bit for the rest of the config to finish loading
setTimeout(function() {
SummarizeConfig.configAjax.call(SummarizeConfig,'pages/ConfigAjax')
@123andy
123andy / ActionTagHelper.php
Last active March 22, 2021 13:40
Custom Action Tag to convert "Andy's Hook Framework" things into External Modules
<?php
namespace Stanford\Utility;
use \REDCap as REDCap;
/**
* Class ActionTagHelper
*
* A class for helping to parse custom action tags
*/
class ActionTagHelper