Skip to content

Instantly share code, notes, and snippets.

View ca0abinary's full-sized avatar

Jonathan DeMarks ca0abinary

  • SPS Commerce
  • West Plains MO US
View GitHub Profile
@ca0abinary
ca0abinary / user-data
Created March 19, 2015 19:30
CoreOS + Etcd + Flannel = Pretty Cool (user-data)
#cloud-config
---
coreos:
etcd:
addr: $public_ipv4:4001
peer-addr: $public_ipv4:7001
discovery: https://discovery.etcd.io/ff10c58e472358739a4d57e315cc94f3
fleet:
public-ip: $public_ipv4
@ca0abinary
ca0abinary / config.rb
Created March 19, 2015 19:32
CoreOS + Etcd + Flannel = Pretty Cool (config.rb)
$new_discovery_url='https://discovery.etcd.io/new'
# To automatically replace the discovery token on 'vagrant up', uncomment
# the lines below:
if File.exists?('user-data') && ARGV[0].eql?('up')
require 'open-uri'
require 'yaml'
token = open($new_discovery_url).read
@ca0abinary
ca0abinary / [email protected]
Created March 27, 2015 14:50
CoreOS (Mesos + Marathon + Zookeeper)
[Unit]
Description=Zookeeper service
After=docker-flannel.service
ConditionFileNotEmpty=/etc/zookeeper-release
ConditionFileNotEmpty=/etc/zookeeper-environment
[Service]
EnvironmentFile=/etc/environment
EnvironmentFile=/etc/zookeeper-release
EnvironmentFile=/etc/zookeeper-environment
@ca0abinary
ca0abinary / [email protected]
Created March 27, 2015 14:52
CoreOS (Mesos + Marathon + Zookeeper)
[Unit]
Description=MesosMaster
After=docker.service
Requires=docker.service
[Service]
Restart=on-failure
RestartSec=20
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill mesos_master
@ca0abinary
ca0abinary / [email protected]
Created March 27, 2015 14:53
CoreOS (Mesos + Marathon + Zookeeper)
[Unit]
Description=MesosSlave
After=docker.service
Requires=docker.service
[Service]
Restart=on-failure
RestartSec=20
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill mesos_slave
@ca0abinary
ca0abinary / [email protected]
Created March 27, 2015 14:54
CoreOS (Mesos + Marathon + Zookeeper)
[Unit]
Description=Marathon
After=docker.service
Requires=docker.service
[Service]
Restart=on-failure
RestartSec=20
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill marathon
@ca0abinary
ca0abinary / keybase.md
Last active November 30, 2020 13:21
Keybase proof

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@ca0abinary
ca0abinary / Dockerfile
Last active December 2, 2020 06:10
Docker - Build pyOdbc Microsoft SQL AWS Lambda Layer
FROM lambci/lambda:build-python3.7
WORKDIR /root
RUN yum -y update
RUN curl ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.5.tar.gz -O && \
tar xvzf unixODBC-2.3.5.tar.gz && \
cd unixODBC-2.3.5 && \
./configure --sysconfdir=/opt/python --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/home && \
make install && \
cd .. && \
mv /home/* . && \
@ca0abinary
ca0abinary / Dockerfile
Created June 22, 2021 22:16
Windows Container + IIS + HTTPS (Self-signed) + ARR 3.0 Proxy
# escape=`
FROM mcr.microsoft.com/windows/servercore:20H2
# Windows Features
RUN powershell -Command `
Add-WindowsFeature Web-Server; `
Add-WindowsFeature NET-Framework-45-ASPNET; `
Add-WindowsFeature Web-Asp-Net45; `
Add-WindowsFeature NET-WCF-TCP-Activation45; `
Add-WindowsFeature NET-WCF-HTTP-Activation45;
# Chocolatey
@ca0abinary
ca0abinary / main.go
Last active July 12, 2021 15:54
Producer consumer
package main
import (
"fmt"
"math/rand"
"sync"
"sync/atomic"
"time"
)