Skip to content

Instantly share code, notes, and snippets.

View tannerjfco's full-sized avatar

Tanner J Ferguson tannerjfco

View GitHub Profile
@tannerjfco
tannerjfco / findfilebyext.go
Created April 5, 2017 23:11
golang FindFileByExtension
// FindFileByExtension walks a given directory searching for a given extension and returns a list of matching results.
func FindFileByExtension(dirpath string, ext string) ([]string, error) {
var match []string
err := filepath.Walk(dirpath, func(path string, f os.FileInfo, _ error) error {
if !f.IsDir() && strings.HasSuffix(f.Name(), ext) {
match = append(match, f.Name())
}
return nil
})
if err != nil {
@tannerjfco
tannerjfco / hubot-ping-pong.coffee
Created February 22, 2016 03:47
hubot-ping-pong.coffee
# Description:
# ping teh pongs
#
# Dependencies:
# probably hubot
#
# Configuration:
# nope
#
# Commands:
@tannerjfco
tannerjfco / newbox.sh
Last active May 6, 2016 05:15
newbox.sh
#! /bin/sh
echo "Restore Privacy"
curl -sSL https://fix-macosx.com/fix-macosx.py | python
echo "Installing xcode"
xcode-select --install
wait
echo "Installing Homebrew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
<?php
/**
* eck.inc
*
* Import default content for custom entities from a CSV
* This Migration requires migrate_extras
*
*/
@tannerjfco
tannerjfco / gist:8676971
Created January 28, 2014 21:33
heatmap code
<script type="text/javascript">
setTimeout(function(){var a=document.createElement("script");
var b=document.getElementsByTagName("script")[0];
a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0021/0660.js?"+Math.floor(new Date().getTime()/3600000);
a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
</script>