Skip to content

Instantly share code, notes, and snippets.

View byronmansfield's full-sized avatar

Byron Mansfield byronmansfield

View GitHub Profile
@byronmansfield
byronmansfield / logger.go
Created May 23, 2015 02:11
Go logger server
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
type LogMsg struct {
@byronmansfield
byronmansfield / tmux.conf
Last active August 29, 2015 14:23
my tmux config
##############################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
#############################
# COPY AND PASTE
@byronmansfield
byronmansfield / .vimrc
Last active August 29, 2015 14:23
my vimrc
" Load Pathogen and all bundles
" runtime ~/.vim/bundle/vim-pathogen/autoload/pathogen.vim
call pathogen#infect()
call pathogen#helptags()
" Basic goodness
set nocompatible
syntax on
filetype plugin indent on
filetype plugin on
@byronmansfield
byronmansfield / releaser.sh
Last active November 9, 2020 13:48
Release script
#! /bin/bash
# Release Manager
# Bumps version of project
# Tags the new version
# Produces Changelog
# Get Project Current Version
version=$(sed -n 's/.*"version": "\(.*\)",/\1/p' package.json)
@byronmansfield
byronmansfield / donut.js
Last active August 29, 2015 14:23
Angular Directive for top 5 D3 Donut Chart with Legend
'use strict';
/**
* @ngdoc directive
* @name perfmanApp.directive:donut
* @description
* # donut
*/
angular.module('perfmanApp')
.directive('donut', function() {
@byronmansfield
byronmansfield / paginator.js
Last active August 29, 2015 14:23
Angular Pagination Factory
'use strict';
/**
* @ngdoc factory
* @name perfmanApp.Paginator
* @description
* # Paginator
* Factory in the perfmanApp.
*/
angular.module('perfmanApp')
@byronmansfield
byronmansfield / .zshrc
Created August 2, 2015 20:37
My .zshrc
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Node Stuff
NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath`
# command
unset MANPATH # delete if you already modified MANPATH elsewhere in your config
@byronmansfield
byronmansfield / awesomeConfig
Created October 31, 2015 02:42 — forked from drGrove/awesomeConfig
Capscr [awesome]
-- capture screen area
awful.key({ modkey, "Control" }, "p", function() awful.util.spawn(".bin/capscr") end)
@byronmansfield
byronmansfield / docker-cheatsheet
Last active February 27, 2016 18:11
docker-cheatsheet
######################
# Docker Cheat Sheet #
######################
docker build -t <username>/<repo-name> . | builds an image
docker run -p 80:80 --name <somename> <username>/<repo> | runs a container from this image
docker ps -a | shows all contains even stopped
docker rm <name> | removes container
docker rmi <id> | removes image
docker inspect <container-id> | grep IPAddress | cut -d '"' -f 4 | gives ip address
@byronmansfield
byronmansfield / main.go
Created January 17, 2016 19:40
refactor aws-ec2 main
package main
import (
"flag"
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
)