Skip to content

Instantly share code, notes, and snippets.

View dlbewley's full-sized avatar
📺

Dale Bewley dlbewley

📺
View GitHub Profile
@dlbewley
dlbewley / gist:11123974
Created April 20, 2014 20:09
Verifying myself: I am dlbewley on Keybase.io.
### Keybase proof
I hereby claim:
* I am dlbewley on github.
* I am dlbewley (https://keybase.io/dlbewley) on keybase.
* I have a public key whose fingerprint is A67C CD3E 836F E306 4F0B C3AB E38F 6DE5 99A0 CA6A
To claim this, I am signing this object:
@dlbewley
dlbewley / gist:a062df2612fb1e4b7e5f
Last active October 4, 2015 18:32
Update github fork with upstream changes in original repo

How do I get changes from Sean's sweet repo?

git remote add upstream [email protected]:SeanPlusPlus/WebDevTemplates.git
git fetch upstream
git checkout master
git merge upstream/master

Beware of conflicts

@dlbewley
dlbewley / setLogLevel.py
Created May 24, 2015 00:38
python setLogLevel function to setup logging; with OS X detection
import os
import platform
import logging, logging.handlers
def setLogLevel(loglevel='debug'):
numeric_loglevel = getattr(logging, loglevel.upper(), None)
if not isinstance(numeric_loglevel, int):
raise ValueError('Invalid log level: "%s"\n Try: "debug", "info", "warning", "critical".' % loglevel)
logging.basicConfig(level=numeric_loglevel, format='%(asctime)s %(name)s %(levelname)s %(message)s')
@dlbewley
dlbewley / gist:53c0b85f8e922788a125
Created July 5, 2015 02:08
Openshift Ansible pull req 319 Node1 Log
[vagrant@ose3-node1 ~]$ sudo journalctl -u openshift-node -l -f
-- Logs begin at Sat 2015-07-04 20:46:38 UTC. --
Jul 05 02:06:13 ose3-node1.example.com systemd[1]: Starting OpenShift Node...
Jul 05 02:06:14 ose3-node1.example.com openshift-node[15676]: I0705 02:06:14.233054 15676 start_node.go:171] Starting an OpenShift node, connecting to https://ose3-master.example.com:8443
Jul 05 02:06:14 ose3-node1.example.com openshift-node[15676]: I0705 02:06:14.461147 15676 common.go:66] Self IP: 192.168.100.200.
Jul 05 02:06:14 ose3-node1.example.com openshift-node[15676]: I0705 02:06:14.465570 15676 node.go:53] Connecting to Docker at unix:///var/run/docker.sock
Jul 05 02:06:14 ose3-node1.example.com openshift-node[15676]: I0705 02:06:14.466589 15676 util.go:485] Default route transits interface "enp0s3"
Jul 05 02:06:14 ose3-node1.example.com openshift-node[15676]: I0705 02:06:14.466714 15676 util.go:332] Interface enp0s3 is up
Jul 05 02:06:14 ose3-node1.example.com openshift-node[15676]: I0705 02:06:14.466
@dlbewley
dlbewley / gist:26c7ca655975f7157062
Created July 9, 2015 23:14
openshift-ansible-336
...
PLAY [Configure node instances] ***********************************************
GATHERING FACTS ***************************************************************
ok: [node2]
ok: [node1]
TASK: [Ensure certificate directory exists] ***********************************
changed: [node1]
changed: [node2]
@dlbewley
dlbewley / hosts
Created January 29, 2016 21:53
OSE 3.1 HA Cluster Ansible Inventory Hosts file
# This is an example of a bring your own (byo) host inventory
# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes
etcd
lb
# Set variables common for all OSEv3 hosts
@dlbewley
dlbewley / Dockerfile
Last active March 22, 2016 19:19
OpenShift STI static httpd builder dockerfile test
# static-builder
FROM openshift/base-centos7
# TODO: Put the maintainer name in the image metadata
MAINTAINER Dale Bewley <[email protected]>
# TODO: Rename the builder environment variable to inform users about application you provide them
ENV BUILDER_VERSION 1.0
# TODO: Set labels used in OpenShift to describe the builder image

Mac Livestreaming with OBS

To get OBS virtual camera or NDI to work in some video conferencing software you must disable library validation.

Typically, the Hardened Runtime’s library validation prevents an app from loading frameworks, plug-ins, or libraries unless they’re either signed by Apple or signed with the same team ID as the app. The macOS dynamic linker (dyld) provides a detailed error message when this happens. Use the Disable Library Validation Entitlement to circumvent this restriction.

Zoom, Ring Central

@dlbewley
dlbewley / docker-pull-secret.sh
Created March 1, 2021 17:21
Add Docker Hub Credentials as OpenShift Pull Secret
# https://developers.redhat.com/blog/2021/02/18/how-to-work-around-dockers-new-download-rate-limit-on-red-hat-openshift/
# https://docs.docker.com/docker-hub/access-tokens/
oc create secret docker-registry docker \
--docker-server=docker.io \
--docker-username=<username> \
--docker-password=<password> \
--docker-email=<email>
oc secrets link default docker --for=pull
@dlbewley
dlbewley / ceph-toolbox.sh
Last active April 6, 2023 22:32
How to run Ceph commands in OpenShift Container Storage OCS / ODF
#!/bin/bash
if [ "$1" == "off" ]; then
oc patch OCSInitialization/ocsinit -n openshift-storage \
--type=merge -p='{"spec":{ "enableCephTools": false}}'
sleep 3
echo "removing any existing toolbox pod"
oc delete pods -n openshift-storage -l app=rook-ceph-tools
else
oc patch OCSInitialization/ocsinit -n openshift-storage \
--type=merge -p='{"spec":{ "enableCephTools": true}}'