Skip to content

Instantly share code, notes, and snippets.

View doctorallen's full-sized avatar

David Allen doctorallen

View GitHub Profile
@doctorallen
doctorallen / pre-commit
Last active October 9, 2019 08:28
Git pre-commit hook to check staged files for console logs
#!/bin/sh
# pre-commit hook to check for console logs in staged files
# Authors: David Allen drallen1, Spencer Nowak spencernowak
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
@doctorallen
doctorallen / gittug.pl
Created May 17, 2013 15:57
Pulls latest git master branch and sources any stored procedures that may have been changed during the last commit.
#!/usr/bin/perl
use strict;
use warnings;
#set vars
my $file_names;
my @split_names;
#run the pull command
`git pull origin master`;
@doctorallen
doctorallen / stored_procedure_parser.pl
Created May 7, 2013 17:16
Parses MySQL Dump files and creates individual stored procedure files for each procedure.
#!/usr/bin/perl
#Script written by David Allen on April 15th 2013
use warnings;
use Data::Dumper;
my @databases = ("TEST");
foreach( @databases )
{
$db = $_;
open(FD, $db . "_stored_procs.sql");
my @procedure;