Skip to content

Instantly share code, notes, and snippets.

View jdeathe's full-sized avatar
💭
Taking a break from development projects to focus other things

James Deathe jdeathe

💭
Taking a break from development projects to focus other things
View GitHub Profile
@jdeathe
jdeathe / jdeathe.zsh-theme
Last active November 2, 2016 00:40
zsh theme
# Based on the default theme for oh-my-zsh:
# https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/robbyrussell.zsh-theme
#
# 1. Copy theme file to: ~/.oh-my-zsh/custom/themes/
# 2. Set ZSH_THEME="jdeathe" in ~/.zshrc
local ret_status="%(?:%{$fg_bold[green]%}❯ :%{$fg_bold[red]%}❯ )"
PROMPT='${ret_status}%{$fg[blue]%}%c%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[black]%}[%{$fg_bold[black]%}"
@jdeathe
jdeathe / jdeathe.itermcolors
Created November 2, 2016 00:33
iterm2 colours
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
@jdeathe
jdeathe / php-hello-world.yml
Last active March 11, 2017 14:51
Kubernetes Deployment definition for php-hello-world app based on the Docker image jdeathe/centos-ssh-apache-php
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: php-hello-world
spec:
replicas: 1
template:
metadata:
labels:
app: php-hello-world
@jdeathe
jdeathe / php-hello-world.svc.yml
Last active December 28, 2016 23:11
Kubernetes Service definition for php-hello-world app based on the Docker image jdeathe/centos-ssh-apache-php
apiVersion: v1
kind: Service
metadata:
name: php-hello-world
spec:
type: NodePort
ports:
- name: http
protocol: TCP
port: 80
@jdeathe
jdeathe / php-hello-world-kubernetes-notes.md
Last active March 12, 2017 08:28
Notes made during initial trial of Kubernetes minkube
@jdeathe
jdeathe / docker-compose.yml
Last active October 9, 2017 01:11
Initial docker-compose v2 proof of concept.
# ------------------------------------------------------------------------------
# Ref: https://docs.docker.com/compose/compose-file/
#
# This value is for testing only.
# export MYSQL_USER_PASSWORD="*03F7361A0E18DA99361B7A82EA575944F53E206B"
#
# docker-compose -p app1 down
# docker-compose -p app1 up -d --scale varnish=2 --scale httpd=3
#
# For older versions of docker-compose you will need to scale and recreate.
@jdeathe
jdeathe / docker-compose.yml
Last active September 23, 2019 02:03
Docker Compose definition to run a local Jenkins service in a Docker container.
# ------------------------------------------------------------------------------
# Ref: https://docs.docker.com/compose/compose-file/
#
# Install docker for Mac:
# https://www.docker.com/products/docker
#
# docker-compose -p local_jenkins down
# docker-compose -p local_jenkins up -d
# docker-compose -p local_jenkins logs
#
@jdeathe
jdeathe / centos-certbot.md
Last active December 4, 2019 08:30
Installation and Usage of Certbot on CentOS to obtain a Let’s Encrypt TLS/SSL certificate.

Installation and Usage of Certbot on CentOS

Installation

Install certbot-auto

# mkdir -p /opt/{bin,certbot/bin} \
  && curl -sS \
 -o /opt/certbot/bin/certbot-auto \
@jdeathe
jdeathe / centos-ssh--arukas.md
Last active December 19, 2016 00:20
Example Configuration of jdeathe/centos-ssh Docker image on the Arukas (https://app.arukas.io) CaaS

Example Configuration of jdeathe/centos-ssh on Arukas CaaS

In the following example the user, SSH public key and passwordless sudo access have been configured.

If you are intending to host anything publicly then don't forget to expose more than port 22 when creating the app.

centos-ssh--arukas.png

Public/Private SSH keys

@jdeathe
jdeathe / docker-compose-alias.md
Last active May 18, 2017 22:42
Alias for docker-compose (version 1.13.0) installed as a docker container

How to Install docker-compose as a Docker Container

It might be desirable to to install docker-compose as a container. The official way is to use wrapper script. Here is an alternative approach using an alias.

Using the Default docker Binary

# alias docker-compose='touch ${PWD}/.env; \
  docker run \
  --privileged \