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
@andyshinn
andyshinn / Dockerfile
Created December 24, 2015 19:07
BusyBox cron container example
FROM gliderlabs/alpine:3.3
COPY myawesomescript /bin/myawesomescript
COPY root /var/spool/cron/crontabs/root
RUN chmod +x /bin/myawesomescript
CMD crond -l 2 -f
@andyshinn
andyshinn / composer.json
Last active February 18, 2024 12:05
Docker Compose PHP Composer Example
{
"require": {
"mfacenet/hello-world": "v1.*"
}
}
@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 / README.md
Last active December 29, 2023 20:05
Terraform variables per-workspace
$ terraform workspace new staging   
Created and switched to workspace "staging"!

You're now on a new, empty workspace. Workspaces isolate their state,
so if you run "terraform plan" Terraform will not see any existing state
for this configuration.
from flask import Flask, request, send_file, jsonify
import hashlib
import requests
import json
from PIL import Image
from io import BytesIO
from geolite2 import geolite2
app = Flask(__name__)
@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
import os
import yaml
from ansible.parsing.vault import VaultLib, VaultSecret
from ruamel.yaml import YAML
from ruamel.yaml.scalarstring import LiteralScalarString
def custom_literal_presenter(dumper, data):
return dumper.represent_scalar('tag:yaml.org,2002:str', data, style='|')
@andyshinn
andyshinn / code.py
Created November 3, 2022 17:30
CircuitPython NeoPixel Matrix 16x16 Pumpkin
from time import sleep
import board
import neopixel
from adafruit_pixel_framebuf import PixelFramebuffer
from pumpkin import pumpkins_tileset_data, pumpkin_palette
pixel_pin = board.D10
pixel_width = 16
pixel_height = 16
# [include Macros.cfg] # You have to copy it /home/pi/klipper_config https://www.klipper3d.org/Config_Reference.html#include
# [include client_macros.cfg] # These macros are required for Fluidd to correctly function.
# This is a Klipper configuration for Qidi X-Max, with
# V4.6 motherboard. with the cooperation of Funkton and oaba200
# instruction https://github.com/KevinOConnor/klipper/blob/master/docs/Config_Reference.md
[mcu]
restart_method: command
serial: /dev/ttyS0
@andyshinn
andyshinn / README.md
Last active March 24, 2022 06:40
CoreOS on Digital Ocean using Terraform

Terraform, CoreOS, and Digital Ocean

Let's use Terraform to easily get a CoreOS cluster up on Digital Ocean. In this example we will get a 5 node CoreOS cluster up and running on the Digital Ocean 8GB size.

Install Terraform

Grab a copy of Terraform for your platform from http://www.terraform.io/downloads.html. Follow the instructions at http://www.terraform.io/intro/getting-started/install.html by getting Terraform in your PATH and testing that it works.

Digital Ocean API Key