Skip to content

Instantly share code, notes, and snippets.

Eric Duncan eduncan911

Block or report user

Report or block eduncan911

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
eduncan911 / gnome-install-extensions
Last active Jul 25, 2019
Gnome: Manually add several Extensions (or, for those that don't trust browser extensions)
View gnome-install-extensions
#!/bin/bash -e
# A script to mass install Gnome extensions from a single folder.
# for global extensions, use /usr/share/gnome-shell/extensions/

Keybase proof

I hereby claim:

  • I am eduncan911 on github.
  • I am eduncan911 ( on keybase.
  • I have a public key ASCm86SHMqJZdxyA3BUcpZKRZ8FKk7y93384uEKOOA1SZAo

To claim this, I am signing this object:

eduncan911 /
Last active Oct 10, 2019
Revert Gist Commits

Revert / Undo a Gist Commit

It was not exactly obvious. Here's how to revert a Gist commit!

Checkout the gist like a normal git repo:

# replace the Gist ID with your own
git clone

Treat it like a normal repo. Edit, force push, etc.

eduncan911 / main.go
Created Jun 9, 2016
Labels in GoLang
View main.go
package main
import "fmt"
Here's a use of labels in Go to continue a for loop
from within another for and within a switch case.
func main() {
eduncan911 / go-build-all
Last active Sep 8, 2019
Go Cross-Compile Script
View go-build-all
# GoLang cross-compile snippet for Go 1.6+ based loosely on Dave Chaney's cross-compile script:
# To use:
# $ cd ~/path-to/my-awesome-project
# $ go-build-all
View json_indent.go
/*Package main is a simple test of Json Identing (aka pretty print)
To run:
$ go run main.go
"eventId": "xyz",
"articleId": "123"
eduncan911 / godoc2md-all
Last active Jun 20, 2018
Godoc2md for current and all sub-directories
View godoc2md-all
# bash script to create a GoLang in the current and all sub-directories.
# installation:
# place this in your ~/bin or similar. make sure to: chmod 755 godoc2md-all
# it is recommended to have a doc.go for each package, that allows for samples and
# additional instructions.
View ddd-in-golang.markdown

This is my response to an email asking about Domain-Driven Design in golang project.

Thank you for getting in touch. Below you will find my thoughts on how golang works with DDD, changing it. This is merely a perception of how things worked out for us in a single project.

That project has a relatively well-known domain. My colleagues on this project are very knowledgeable, thoughtful and invested in quality design. The story spelled out below is a result of countless hours spent discussing and refining the approach.

Conclusions could be very different, if there was a different project, team or a story-teller.

Short story

View gist:e325fc05b891691999be
# add this code to your .bashrc file
# gitpending() transverses from the current directory to
# inspect 1 directory level deep for any git repos that have
# pending changes to commit.
function gitpending()
for d in */ ; do
pushd $d > /dev/null
DIRNAME=$(basename "$d")
eduncan911 / gist:cd250bc78a4465c3b719
Created Oct 10, 2014
'git rebase' instead of 'git pull'
View gist:cd250bc78a4465c3b719
You can’t perform that action at this time.