Skip to content

Instantly share code, notes, and snippets.

View andyshinn's full-sized avatar
🖥️
don't put computers in your mouth

Andy Shinn andyshinn

🖥️
don't put computers in your mouth
View GitHub Profile
ubuntu@maasnode7:~$ ps fauxw
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         2  0.0  0.0      0     0 ?        S    04:16   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    04:16   0:00  \_ [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S<   04:16   0:00  \_ [kworker/0:0H]
root         7  0.0  0.0      0     0 ?        S    04:16   0:00  \_ [rcu_sched]
root         8  0.0  0.0      0     0 ?        S    04:16   0:00  \_ [rcu_bh]
root         9  0.0  0.0      0     0 ?        S    04:16   0:00  \_ [migration/0]
root        10  0.0  0.0      0     0 ?        S    04:16   0:00  \_ [watchdog/0]
@andyshinn
andyshinn / Dockerfile
Created July 2, 2017 17:58
nginx serving Angular 4 application built as Docker multi-stage image
FROM node:8.1.2-onbuild as builder
ARG TARGET=production
RUN npm install @angular/cli
RUN node_modules/.bin/ng build -aot --target ${TARGET}
FROM nginx:1.13-alpine
COPY nginx.conf /etc/nginx/conf.d/
COPY --from=builder /usr/src/app/dist /usr/src/app
version: "3"
services:
test:
env_file: ./myenv
image: alpine
command: env
@andyshinn
andyshinn / GCLOUD-EXAMPLE.md
Last active August 20, 2018 19:29
Postal on Google Container Engine

Postal on Kubernetes in Google Cloud Platform

Requirements

  1. Google Cloud Platform (GCP) account.
  2. A project in the account (we're using postal-165921 in our example commands).

Infrastructure

  1. Set the defailt zone to use with our gcloud commands: gcloud config set compute/zone us-central1-a
@andyshinn
andyshinn / Dockerfile
Last active August 8, 2023 08:39
Postal on Docker
FROM ruby:2.3-onbuild
VOLUME /opt/postal/config
ENV LOG_TO_STDOUT 1
ENV AM_CONFIG_ROOT /opt/postal/config
RUN gem install procodile
RUN apt-get update -qq && apt-get install -yqq nodejs
@andyshinn
andyshinn / STEPS.md
Created April 11, 2017 21:46
Confluence in Docker

Steps

  1. Run docker-compose up to bring up the two containers (Confluence and MySQL).
  2. Navigate to http://192.168.99.100:8090/ (replace the IP with the correct IP of your Docker Machine).
  3. Choose "Production Installation" and click the Next button.
  4. Click the Next button on the Add-ons screen.
  5. Add your license key and click Next.
  6. Choose "MySQL" and then click the External Database button.
  7. Click the Direct JDBC button.
  8. Change localhost to mysql in the Database URL, set User name to confluence, Password to myconfluencepass, and click Next.
@andyshinn
andyshinn / gist:3511fbd091dc87ad78771e380fb527d4
Created September 9, 2016 20:54
Mimicking CORS preflight responses in Apache
<VirtualHost _default_:443>
ServerName yourhost
ServerAdmin [email protected]
SSLEngine on
SSLCertificateFile /etc/ssl/private/yourorg.com.crt
SSLCertificateKeyFile /etc/ssl/private/yourorg.com.key
SSLCertificateChainFile /etc/ssl/private/chain.pem
SSLProxyEngine On
2016-09-07 17:10:25,445 [pool-3-thread-1] INFO com.sumologic.scala.collector.input.docker.DockerLogInput - Log stream for bd823e8c618fa908b395ff20e80d41781f32c6442462f22e5b5b5326315f0a23 is closed
2016-09-07 17:10:25,445 [Blade: 0000000006ED5E95 - b32a7b70-4712-4089-ac8d-e3ba7f2deeac] INFO com.sumologic.scala.collector.input.docker.DockerLogInput - Log stream for bd823e8c618fa908b395ff20e80d41781f32c6442462f22e5b5b5326315f0a23 finished running
2016-09-07 17:10:25,449 [Blade: 0000000006ED5E95 - b32a7b70-4712-4089-ac8d-e3ba7f2deeac] INFO com.sumologic.scala.collector.blade.docker.DockerLogBlade - Checking if container bd823e8c618fa908b395ff20e80d41781f32c6442462f22e5b5b5326315f0a23 is running via Docker Client com.github.dockerjava.core.DockerClientImpl@22c5c785 on attempt 1
2016-09-07 17:10:25,664 [pool-2-thread-1] ERROR com.sumologic.scala.collector.input.docker.DockerEventInput - error processing payload for 116219541 while consuming docker event message
java.lang.NullPointerException
at scala.uti
@andyshinn
andyshinn / pom.xml
Last active September 7, 2016 19:15
Basic Spring Cloud Config Server
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building configserver 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ configserver ---
[INFO] com.test:configserver:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:1.3.7.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.3.7.RELEASE:compile
---
security:
user:
password: appdefault
---
spring:
profiles: test
security:
user:
password: apptest