Skip to content

Instantly share code, notes, and snippets.

View TRoetz's full-sized avatar

Tommie Roetz TRoetz

View GitHub Profile
#!/usr/bin/env bash
# Setup default values for variables
VERSION="3.2.0"
CLUSTER=false
SERVICE=false
TASK_DEFINITION=false
MAX_DEFINITIONS=0
IMAGE=false
MIN=false
@TRoetz
TRoetz / Howto convert a PFX to a seperate .key & .crt file
Created May 29, 2019 19:14 — forked from TemporaryJam/Howto convert a PFX to a seperate .key & .crt file
How to convert a .pfx SSL certificate to .crt/key (pem) formats. Useful for NGINX
source: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/
`openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]`
What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file.
Now let’s extract the certificate:
`openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]`
FROM alpine:3.7
RUN echo 'http://dl-4.alpinelinux.org/alpine/edge/community/' >> /etc/apk/repositories
ENV PYTHON_VERSION=2.7.14-r2
ENV PY_PIP_VERSION=9.0.1-r1
ENV SUPERVISOR_VERSION=3.3.1
ENV NGINX_VERSION=1.12.2-r3
RUN mkdir /www && mkdir /www/myapp/
@TRoetz
TRoetz / GoProStreamer.java
Created March 17, 2019 09:48 — forked from mekya/GoProStreamer.java
GoPro Hero4 Silver - Live Preview on PC (java, ffplay, ffmpeg)
import java.io.IOException;
import java.io.InputStream;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.SocketException;
import java.net.URL;
import java.util.Locale;
@TRoetz
TRoetz / ecr-cred-updater.sh
Created July 6, 2018 01:47 — forked from cablespaghetti/ecr-cred-updater.sh
Automatic Updating Amazon ECR Credentials in Kubernetes
#!/bin/bash
# Get directory of script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [[ $# -ne 1 ]]
then
echo "ERROR: This script expects the namespace name to be given as an argument"
echo "e.g. ./ecr-cred-updater.sh my-namespace"
exit 1
apiVersion: v1
kind: ConfigMap
metadata:
name: fluentd-config
namespace: fluentd
labels:
app: fluentd
data:
fluentd.conf: |
@include prometheus.conf
#add the repositories
sudo apt-get update && sudo apt-get install -y curl
curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | sudo apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" | sudo tee /etc/apt/sources.list.d/freeswitch.list
sudo apt-get update
# install dependencies
sudo apt-get install -y yasm nasm libyuv-dev libvpx2-dev liblua5.2-dev libvpx2-dev libvpx2 zlib1g-dev libspeex1 libopus-dev libsndfile-dev autoconf automake devscripts gawk g++ git-core 'libjpeg-dev|libjpeg62-turbo-dev' libncurses5-dev 'libtool-bin|libtool' make python-dev gawk pkg-config libtiff5-dev libperl-dev libgdbm-dev libdb-dev gettext libssl-dev libcurl4-openssl-dev libpcre3-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libedit-dev libldns-dev libpq-dev yasm nasm unixodbc-dev unixodbc-bin unixodbc odbc-postgresql
@TRoetz
TRoetz / setup-kubernetes-ubuntu-16.md
Last active February 6, 2020 03:44 — forked from ruanbekker/setup-kubernetes-ubuntu-16.md
Install a 3 Node Kubernetes Cluster on Ubuntu 18.04

Master: Dependencies

DISABLE SWAP: This is how to disable the swap file in Ubuntu 17.04

To turn off the swapfile. Run the following command:

sudo swapoff /swapfile

Now disable the swap file in /etc/fstab. I'm using Vim.

@TRoetz
TRoetz / chat.html
Created February 7, 2018 23:55 — forked from orkaplan/chat.html
simple node.js socket.io client/server example
<html>
<head>
<title>Node.js IL Chat</title>
<script type="text/javascript" src="/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
<script language="javascript">
var socket;
$(document).ready(function()
{
@TRoetz
TRoetz / README-Template.md
Created February 4, 2018 19:19 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites