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 / 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 / syslog.txt
Created October 28, 2016 14:39
errors in syslog
Oct 28 14:37:18 ip-172-31-63-55 dockerd[26165]: time="2016-10-28T14:37:18.308189347Z" level=info msg="2016/10/28 14:37:18 [INFO] memberlist: Marking ip-172-31-59-92-7b438b1188a3 as failed, suspect timeout reached\n"
Oct 28 14:37:18 ip-172-31-63-55 dockerd[26165]: time="2016-10-28T14:37:18.753674582Z" level=info msg="2016/10/28 14:37:18 [INFO] memberlist: Marking ip-172-31-21-186-3dcc744b686c as failed, suspect timeout reached\n"
Oct 28 14:37:18 ip-172-31-63-55 dockerd[26165]: time="2016-10-28T14:37:18.842625022Z" level=info msg="2016/10/28 14:37:18 [INFO] memberlist: Suspect ip-172-31-23-36-12bf3bd381ff has failed, no acks received\n"
@BretFisher
BretFisher / docker-ps.txt
Created October 28, 2016 16:48
slowly adding containers
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0ed57993dc33 alpine:latest "top" About a minute ago Up About a minute c1m.26887.6hhpgf6e0ceh44u9m77o6ua5o
34bbec457d3f alpine:latest "top" About a minute ago Up About a minute c1m.24871.6sz0rw4sinx057q460rbryi9t
509cc29a7aac alpine:latest "top" 2 minutes ago Up 2 minutes c1m.23778.6fodlsp1gfb11z4zc3ht7nvfl
e2e852a5c42f alpine:latest "top" 3 minutes ago Up 3 minutes c1m.20352.epp244g73mt4s76wph31ixizl
0ef9694c621a alpine:latest "top" 5 minutes ago Up 5 minutes
@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 / hercules-proposal.md
Last active November 30, 2016 21:43
Hercules Original Proposal

Hack to Help 2015 Winners Original Proposal

Team

TOL DWS Explore Hampton Roads

Product

HRQLS "An easy-to-use tool for visualizing quality of life by regions in Hampton Roads.

Overall Vision & Functionality

EHR weights and merges QoL factors such as crime, cost, health, schools, transportation, sanitation, recreation, and others to produce a map representing QoL in regions within Hampton Roads. The user adjusts sliders for each factor to find the optimal location in which to live based on their input.

@BretFisher
BretFisher / cfa-talk.md
Last active December 3, 2016 20:01
Code For Hampton Roads Intro
@BretFisher
BretFisher / teams-presentations.md
Last active December 4, 2016 01:00
DE Hack Data 2016

Teams

HR Analysis, by team Spectre

  • Web visualizations of HR road accident data using Google Maps and D3 over the last 5 years
  • Data from github, not sure of source

NOAH, by team Haxton

  • Map visualizations of "overflow incidents" of storm and sewer processing systems
  • Some data from data.gov, some from HRSD, but didn't all line up to their desired data around nitrogen content due to overflow.
@BretFisher
BretFisher / present.zsh-theme
Last active September 22, 2023 11:33
oh-my-zsh theme for presentations (hides prompt features based on path)
# problem: when presenting, I want to obscure
# my prompt to act like it's at root of file system
# and be very basic with no git info, etc.
# solution: this theme lets you set a ENV to the path
# of your presentation, which will help remove unneeded prompt
# features while in that path
# oh-my-zsh theme for presenting demos
# based off the default rubbyrussell theme
@BretFisher
BretFisher / docker-for-mac.md
Last active April 26, 2024 09:38
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@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'