Skip to content

Instantly share code, notes, and snippets.

View BretFisher's full-sized avatar
🗃️
All Day Containers!

Bret Fisher BretFisher

🗃️
All Day Containers!
View GitHub Profile
@BretFisher
BretFisher / # et - 2017-12-13_05-58-36.txt
Created December 13, 2017 11:02
et (mistertea/et/et) on macOS 10.13.2 - Homebrew build logs
Homebrew build logs for mistertea/et/et on macOS 10.13.2
Build date: 2017-12-13 05:58:36
@BretFisher
BretFisher / alias.sh
Last active February 28, 2018 09:51
Docker Cloud Swarm Connect Alias
# so docker cloud now has swarms fleet mgmt
# and you can use something like this to connect from cli to your swarm via docker remote api:
docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST dockercloud/client bretfisher/swarm1
# but maybe we can put that in a bash alias to make it easier
alias cswarm="docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST dockercloud/client"
#then
cswarm bretfisher/dude-swarm1
@BretFisher
BretFisher / copy-paste.txt
Last active February 28, 2018 09:51
install docker engine for swarm3k on Ubuntu 16.04. 2 options for installing
#option 1: copy and paste this into ssh to install docker engine
# NOTE: update --label=owner=YOURNAME below if you want to easily identify yours
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \
mkdir -p /etc/apt/sources.list.d && \
echo deb https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list && \
printf 'net.ipv4.neigh.default.gc_thresh1 = 30000\nnet.ipv4.neigh.default.gc_thresh2 = 32000\nnet.ipv4.neigh.default.gc_thresh3 = 32768' >> /etc/sysctl.conf && \
sysctl -p && \
service lxcfs stop && apt-get remove -y -q lxc-common lxcfs lxd lxd-client && \
apt-get update -q && apt-get install -y -q linux-image-extra-$(uname -r) linux-image-extra-virtual && \
@BretFisher
BretFisher / Dockerfile-selenium-nodejs
Created November 17, 2016 20:12
Dockerfile selenium with nodejs
FROM selenium/standalone-chrome
# lets install node 6.x then cleanup
# install build-essential and leave in case npm needs it
# we have to sudo because selenium defaults to seluser
WORKDIR /tmp
ADD https://deb.nodesource.com/setup_6.x nodesource_setup.sh
RUN sudo bash nodesource_setup.sh \
&& sudo apt-get install -y nodejs build-essential \
&& sudo rm -rf /var/lib/apt/lists/*
@BretFisher
BretFisher / halloween.md
Created October 31, 2019 20:46
Scary Course Sale for Halloween
@BretFisher
BretFisher / gruvbox-light.js
Last active May 17, 2020 17:31 — forked from anhari/gist:23ae031e93e2f465258439cb6802acad
gruvbox *light* blink shell theme
black = '#fbf1c7';
red = '#cc241d'; // red
green = '#98971a'; // green
yellow = '#d79921'; // yellow
blue = '#458588'; // blue
magenta = '#b16286'; // pink
cyan = '#689d6a'; // cyan
white = '#7c6f64'; // light gray
lightBlack = '#928374'; // medium gray
lightRed = '#9d0006'; // red
@BretFisher
BretFisher / certs.sh
Last active August 13, 2020 18:29
quickly make a local tls cert
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
DOMAIN_NAME=$1
openssl req \
-newkey rsa:2048 \
-x509 \
-nodes \
@BretFisher
BretFisher / .tmux.conf
Created February 25, 2017 00:40
My ugly tmux config, much copied from others and tweaked
# tmux config for ultimate winning
# make tmux display things in 256 colors
#set -g default-terminal "screen-256color"
# use this if italic enabled in term profile
set -g default-terminal "tmux-256color"
# set just true color without custom term
#set -ga terminal-overrides ",xterm-256color:Tc"
# fixes bug: https://github.com/tmux/tmux/issues/435
#set -ga terminal-overrides ',xterm*:sitm=\E[3m'
@BretFisher
BretFisher / docker-compose.yml
Created November 10, 2017 18:13
Docker Compose local development with wildcard DNS for multi-domain development
version: '3'
# vcap.me is a wildcard domain that resolves to localhost
# in case you need to pass URL's around from browser to
# containers this could help you get around localhost problem
services:
# use www.vcap.me to access web containter from host
# use api.vcap.me to access api container from host
proxy:
@BretFisher
BretFisher / docker-alias.sh
Created April 22, 2018 04:06
Docker Alias common stuff, mostly from oh-my-zsh
dcb='docker-compose build'
dcdn='docker-compose down'
dce='docker-compose exec'
dcl='docker-compose logs'
dclf='docker-compose logs -f'
dco=docker-compose
dcps='docker-compose ps'
dcr='docker-compose run'
dcrestart='docker-compose restart'
dcrm='docker-compose rm'