Skip to content

Instantly share code, notes, and snippets.

View benrowe's full-sized avatar
😀
building things!

Ben Rowe benrowe

😀
building things!
View GitHub Profile
@benrowe
benrowe / .editorconfig
Created January 28, 2020 20:17
editorconfig
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
@benrowe
benrowe / docker commands.md
Created October 30, 2019 04:04
Handy docker commands

Handy Docker Commands

Stop all running docker containers

docker stop $(docker ps -q)
@benrowe
benrowe / konami.js
Created June 5, 2019 06:08
old konami jquery plugin
$.fn.konami = function (options) {
var enterKey = 13;
if (typeof options == 'function') {
options = { callback: options };
}
options = options || {};
options = $.extend({
@benrowe
benrowe / .zshrc
Created November 20, 2018 20:34
oh my zsh config
export ZSH=/Users/ben/.oh-my-zsh
ZSH_THEME="af-magic"
plugins=(git)
plugins=(zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh
export GOPATH=$HOME/go
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
@benrowe
benrowe / Brewfile
Last active November 19, 2018 22:41
tap "eugenmayer/dockersync"
tap "go-delve/delve"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "homebrew/dupes"
tap "homebrew/php"
tap "homebrew/versions"
cask "java"
brew "awscli"
@benrowe
benrowe / TestConstructorCallsMethod
Created May 17, 2018 06:41
PHPUnit Test Examples
public function testConstructorCallsMethod()
{
$callMethod = 'init'
$mock = $this
->getMockBuilder(ClassToTest::class)
->disableOriginalConstructor()
->getMock();
$mock
->expects($this->once())
@benrowe
benrowe / Makefile
Last active June 16, 2020 01:55 — forked from prwhite/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
.PHONY: help
# COLORS
GREEN := $(shell tput -Txterm setaf 2)
YELLOW := $(shell tput -Txterm setaf 3)
WHITE := $(shell tput -Txterm setaf 7)
RESET := $(shell tput -Txterm sgr0)
TARGET_MAX_CHAR_NUM=20
@benrowe
benrowe / .aliases
Last active July 10, 2023 03:26
Local machine config
alias dk_restart="osascript -e 'quit app \"Docker\"' && open -a Docker"
alias dkps="docker ps --format '{{.ID}} - {{.Names}} - {{.Status}} - {{.Image}}'"
alias dk="docker"
alias dkl="docker logs"
alias dklf="docker logs -f"
alias dki="docker images"
alias dks="docker service"
alias dkrm="docker rm"
alias dkrmi="docker rmi"
@benrowe
benrowe / .hyper.js
Last active October 27, 2017 04:15
Hyper Terminal Sync Settings
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
@benrowe
benrowe / git-find-parent-branch.sh
Last active October 16, 2017 02:39
Based on the currently checked out branch, find where it branched from
git show-branch -a \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| head -n1 \
| sed 's/.*\[\(.*\)\].*/\1/' \
| sed 's/[\^~].*//'