Skip to content

Instantly share code, notes, and snippets.

@egustafson
egustafson / docker-exec.md
Last active March 12, 2018 22:28
Get a shell inside a running docker

docker exec -it /bin/bash

Keybase proof

I hereby claim:

  • I am egustafson on github.
  • I am egustafson (https://keybase.io/egustafson) on keybase.
  • I have a public key ASDPKQ3FrPQ967JyE8giu-eCwv-uqrrcJLBxq_9lMzFP4Qo

To claim this, I am signing this object:

@egustafson
egustafson / steps.txt
Last active September 15, 2016 17:03
git stash on a true branch
# 1. Store the "stash" on a branch
git checkout -b my-stashing-branch ## checkout, creating the branch
git add <the files to 'stash'>
git commit -m "comment" ## you now have the files on a branch
git push -u origin my-stashing-branch ## and saved in your central repo (GitHub)
# 2. Use your "stash" branch somewhere else.
git checkout somewhere-else
git merge my-stashing-branch --no-commit --no-ff ## origin/my-stashing-branch if new clone.
git reset
@egustafson
egustafson / apt.conf
Created June 3, 2016 16:50
APT Proxy with HTTPS proxing disabled
Acquire::http::Proxy "http://proxy-host.domain:3142/";
Acquire::https::Proxy "DIRECT";

Local non-cloud cluster

This document describes how to run a Kraken Kubernetes cluster locally using Terraform, Vagrant, and Samsung vagrant and coreos providers.

The difference between running on a cloud environment (AWS) and locally is that instead of building a container and having that container connect to AWS (or other cloud) and running all the steps and possessing all the necessary software (Ansible, AWS client, terraform, terraform drivers, etc) the local host will run all of these steps and use a local hypervisor (Virtualbox by default) and use Samsung's terraform execute provider to run vagrant and provide it the necessary arguments for setting up the machines the cluster will run on. It should be noted that a docker container still runs on every virtual machine for the provisioning of that machine the same way the EC2 AMIs run docker to do the same.

OS X

On OS X, brew is the means of obtaining Terraform and other components:

Kraken - Local 'cluster' on Linux using VirtualBox

The following documents using Kraken to create a Kubernetes 'cluster' on a Linux host (Ubuntu 15.10) using VirtualBox+Vagrant as the technology to form the cluster, (of virtual machines).

Starting Point

Install Ubuntu 15.10 (Wily Werewolf) on a host that is capable of running VirtualBox to create virtual machines.

@egustafson
egustafson / gist:9762888
Created March 25, 2014 14:23
updating command
#!/bin/bash
while `/bin/true`; do (clear; updating-command | grepping-command); date; sleep 60; done
## ##########
while `/bin/true`; do
(clear; updating-command | grepping-command)
date
sleep 60
done
# full packet capture
tcpdump -i <interface> -s 65535 -w <out-file>
@egustafson
egustafson / gist:6372851
Created August 29, 2013 00:00
cloud new user
sudo adduser <username>
sudo adduser <username> [admin|sudo]
sudo mkdir ~<username>/.ssh
sudo cp ~/.ssh/authorized_keys ~<username>/.ssh/
sudo chown -R <username> ~<username>/.ssh
# (exit; ssh <username>@host)
@egustafson
egustafson / gist:6024867
Last active December 19, 2015 22:08
HP Blue (new blue -- circa 2013)
<html>
<head>
</head>
<body>
<h1 style="color: #00A0D2;">Hewlett Packard Blue</h1>
Circa 2013 and on
</body>
</html>