Skip to content

Instantly share code, notes, and snippets.

View dudash's full-sized avatar
🎸
Be excellent to each other

Jason Dudash dudash

🎸
Be excellent to each other
View GitHub Profile
@dudash
dudash / magic_mirror_custom.css
Created May 3, 2020 14:45
Magic Mirror custom CSS for weather and google maps traffic
a[href^="http://maps.google.com/maps"]{display:none !important}
a[href^="https://maps.google.com/maps"]{display:none !important}
.gmnoprint a, .gmnoprint span, .gm-style-cc {
display:none;
}
.gmnoprint div {
background:none !important;
}
@dudash
dudash / magic_mirror_newsfeed_remove_url.js
Last active May 3, 2020 15:05
Remove URLs from Magic Mirror news feed titles
// remove URLS from the feed title
var urlFree = this.newsItems[this.activeItem].title.replace(/(?:https?|ftp):\/\/[\n\S]+/g, '');
this.newsItems[this.activeItem].title = urlFree;
// remove pic.twitter.com from the feed too (sometimes this exists w/o the http prefix)
var urlFree = this.newsItems[this.activeItem].title.replace(/pic.twitter.com[\n\S]+/g, '');
this.newsItems[this.activeItem].title = urlFree;
/**
oc patch cm/keycloak-probes -p '{"data":{"liveness_probe.sh":"#!/bin/bash\necho pass\n","readiness_probe.sh":"#!/bin/bash\necho pass\n"}}'
#!/bin/bash
#
# A simplifed CLI command to scale all deployments to 1
#
# source: https://gist.github.com/dudash/e62b3b25c8713386a28c19b64604891e
# docs: https://docs.openshift.com/container-platform/4.7/cli_reference/openshift_cli/extending-cli-plugins.html
#
# To install/use this:
# put this script in /usr/local/bin
# chmod a+x oc-scale1
@dudash
dudash / deployment_config.yaml
Created July 25, 2019 01:02
OpenShift Deployment Config EAP JMX Ports YAML
ports:
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 8443
name: https
protocol: TCP
- containerPort: 8778
name: jolokia
protocol: TCP
@dudash
dudash / 2019-06-20-demolinks.md
Last active June 19, 2019 20:25
Demo Links June 2019
@dudash
dudash / istioselect
Last active September 21, 2020 23:03
istioctl version selector
#!/bin/bash
# Simple script to help configuring which istio CLI to use when you
# have a need to keep multiple versions and switch between them.
# Install and notes:
# 1. put this in /usr/local/bin and chmod +x
# 2. keep all the versions of istioctl in the /Applications directory
# 3. name istioctl executables with corresponding version - e.g. /Applications/istioctl-1.4.8
@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]

@dudash
dudash / tty_into_docker_VM_on_OSX.md
Created January 3, 2019 20:59
Connect to Docker VM on OSX

Docker for Mac uses Hyperkit as the VM so it's likely you have no idea how to get into the VM. Not likely you really need to either. But in the case you do need to get on that VM, here is how...

Use screen to connect to a Docker Desktop VM on a Mac

screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

To kill the session when you're done

ctrl+a then press k

Related Links

@dudash
dudash / docker-inspectall-runtimeuser
Created September 14, 2018 20:38
CLI to list running image details for Image, User, and Container Name
docker inspect $(docker ps -aq) --format '{{.Config.Image}} {{.Config.User}} {{.Name}}'