Skip to content

Instantly share code, notes, and snippets.

View mbach04's full-sized avatar
💭
This is my status

Matt mbach04

💭
This is my status
  • Red Hat
  • Virginia
View GitHub Profile
@dmc5179
dmc5179 / snowball.sh
Last active January 24, 2024 15:19
OpenShift 4 on an AWS Snowball Edge
#!/bin/bash -xe
SNOWBALL_IP='192.168.1.240'
S3="aws --profile snowballEdge --region snow --endpoint https://${SNOWBALL_IP}:8443 --ca-bundle /etc/pki/ca-trust/source/anchors/sbe.crt s3"
EC2="aws --profile snowballEdge --region snow --endpoint https://${SNOWBALL_IP}:8243 --ca-bundle /etc/pki/ca-trust/source/anchors/sbe.crt ec2"
BUCKET="redhat-dan"
IGN_CONFIGS='/home/danclark/openshift_clusters/snow/'
IGN_BASE='/home/danclark/openshift_clusters/install-config.yaml'
@dmc5179
dmc5179 / quay_fips_deploy.sh
Last active November 11, 2020 22:32
Quay upstream on a FIPS enabled OpenShift 4.6 cluster
#!/bin/bash
WORKING_DIR=/tmp/
QUAY_NAMESPACE='quay-enterprise'
S3BUCKET=''
ACCESS_KEY=''
SECRET_KEY=''
mkdir -p "${WORKING_DIR}"
pushd "${WORKING_DIR}"
@dudash
dudash / readme.md
Last active May 5, 2020 20:06
Works on OpenShift Version Badges --- CLICK TO SEE IT

[![OpenShift Version][openshift311-redimage]][openshift311-url] [![OpenShift Version][openshift311-heximage1]][openshift311-url] [![OpenShift Version][openshift311-heximage2]][openshift311-url] [![OpenShift Version][openshift311-heximage3]][openshift311-url] [![OpenShift Version][openshift311-heximage4]][openshift311-url]

[![OpenShift Version][openshift39-heximage]][openshift39-url] [![OpenShift Version][openshift310-heximage]][openshift310-url]

[![OpenShift Version][openshift311-logo]][openshift311-url]

@xjdrew
xjdrew / client.go
Last active June 20, 2025 01:31
golang tls client and server, require and verify certificate in double direction
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io"
"io/ioutil"
"log"
"os"
@harlow
harlow / golang_job_queue.md
Last active August 23, 2025 04:12
Job queues in Golang
@rochacon
rochacon / cmd-to-websocket.go
Created December 8, 2014 20:17
Stream a command stderr and stdout throught websockets
package main
import (
"bufio"
"fmt"
"github.com/gorilla/websocket"
"io"
"log"
"net/http"
"os/exec"
@mattes
mattes / check.go
Last active October 13, 2025 14:50
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) {
// path/to/whatever exists
}
@strezh
strezh / GStreamer-1.0 some strings.sh
Last active October 16, 2024 13:31
GStreamer-1.0 personal cheat sheet
#!/bin/bash
# play YUV444 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \
videoconvert ! \
autovideosink
# play YUV422 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
@tmichel
tmichel / index.html
Created November 9, 2013 22:07
simple websocket example with golang
<html>
<head>
<title>WebSocket demo</title>
</head>
<body>
<div>
<form>
<label for="numberfield">Number</label>
<input type="text" id="numberfield" placeholder="12"/><br />
## {{{ http://code.activestate.com/recipes/532908/ (r3)
#! /usr/bin/env python
"""
pyText2Pdf - Python script to convert plain text files into Adobe
Acrobat PDF files with support for arbitrary page breaks etc.
Version 2.0
Author: Anand B Pillai <abpillai at gmail dot com>