Skip to content

Instantly share code, notes, and snippets.

View k4gdw's full-sized avatar

Bryan Johns k4gdw

  • Montgomery, AL
View GitHub Profile
@k4gdw
k4gdw / instructions.sh
Last active August 24, 2017 16:00 — forked from nachocab/instructions.sh
How to make git diff work perfectly with .docx files in Mac OS X (it even colors by word)
# Execute the following commands one at a time from a bash prompt.
# download docx2txt by Sandeep Kumar
wget -O docx2txt.pl http://www.cs.indiana.edu/~kinzler/home/binp/docx2txt
# make a wrapper
echo '#!/bin/bash
docx2txt.pl $1 -' > docx2txt
chmod +x docx2txt
# make sure docx2txt.pl and docx2txt are your current PATH. Here's a guide
@k4gdw
k4gdw / git-remove-file.sh
Last active September 22, 2016 17:32 — forked from bartlomiejdanek/git-remove-file.sh
remove file from git history
#!/bin/bash
#-------------------------------------------------------------------------------
# Name : git-remove-file.sh
# Written By: David Underhill, with modifications by, Bryan K. Johns, K4GDW
# Purpose : Script to permanently delete files / folders from your git
# : repository. To use it, cd to the root of your repository and then
# : run the script as shown.
# Calls : ./git-sanitize.sh path1 path2...
# Comments : This is my version of the git-delete-history script found here:
@k4gdw
k4gdw / gitcreate.sh
Created April 8, 2016 20:07 — forked from robwierzbowski/gitcreate.sh
A simple litte script. Create and push to a new github repo from the command line.
#!/bin/bash
# https://gist.github.com/robwierzbowski/5430952/
# Create and push to a new github repo from the command line.
# Grabs sensible defaults from the containing folder and `.gitconfig`.
# Refinements welcome.
# Gather constant vars
CURRENTDIR=${PWD##*/}
GITHUBUSER=$(git config github.user)
@k4gdw
k4gdw / .gitconfig
Created January 27, 2016 22:54 — forked from robmiller/.gitconfig
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@k4gdw
k4gdw / ReduceThatDB.sql
Created October 29, 2015 17:56 — forked from ferventcoder/ReduceThatDB.sql
D to the B to the A - Reducing the size of a SQL Server database
/*
* Scripts to remove data you don't need here
*/
/*
* Now let's clean that DB up!
*/
DECLARE @DBName VarChar(25)