Skip to content

Instantly share code, notes, and snippets.

View xyntrix's full-sized avatar
:shipit:

Mike xyntrix

:shipit:
  • Red Hat
  • USA
View GitHub Profile
deployConfig(..):
...
env:
- name: DB_USER
value: skeletonuser
envFrom:
- secretRef:
name: foosecrets
secret(..):
@xyntrix
xyntrix / openshift-cheatsheet.md
Created January 23, 2018 08:24 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet
  • Binary Builds
oc new-build --binary=true --name=ola2 --image-stream=redhat-openjdk18-openshift
oc start-build ola2 --from-file=./target/ola.jar --follow
oc new-app 
  • Turn off/on DC triggers to do a batch of changes without spam many deployments
@xyntrix
xyntrix / tz.sh
Created April 6, 2018 21:37 — forked from chmouel/tz.sh
#!/usr/bin/env bash
# you can do things like this :
# % tz
# % tz 10h30
# % tz 10h30 next week
# % tz 11:00 next thursday
#
# and so on,
#
# This needs gnu date, on MacOSX just install gnuutils from brew
#!/bin/sh
SRC="${1}"
DST="${2}"
shopt -s dotglob
SRCFILES=$(ls -d ${SRC}/*)
/usr/bin/rsync -rlAgoDvxHX --progress ${SRCFILES} ${DST}
@xyntrix
xyntrix / rsync_parallel.sh
Created June 14, 2018 20:46 — forked from rcoup/rsync_parallel.sh
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes:
@xyntrix
xyntrix / is_it_up
Last active October 14, 2019 20:40
cli http/https status checker
#!/bin/sh
## How many seconds to wait for poll
POLLTIME=10
## How many seconds to wait between polls
SLEEPTIME=3
## Ignore invalid tls negotiation such as invalid/expired certs
INSECURE="-k"
if [ -z "${1}" ]; then
@xyntrix
xyntrix / crapplepy
Created November 5, 2019 17:37
run a flake8 lint test + command every time a .py file is written: the world's smallest/laziest py test
#!/bin/sh
if [ -z "${PYCMD}" ]; then
echo "# You can set the command to run like so:"
echo "# export PYCMD=\"python36 example.py\""
echo
fi
# where to set up the file event watch, default: present dir and
# recursive
@xyntrix
xyntrix / oc-collector.sh
Last active June 11, 2020 16:06
Openshift application state snapshot
#!/bin/sh
DT=`date +%s`
#NS="quay"
spec="all"
LOGLIMIT="3000"
if [ ! -z "${NS}" ]; then
NS="-n ${NS}"
else
@xyntrix
xyntrix / cmcurl
Last active February 9, 2021 21:51
#!/bin/sh
# cmcurl: curl shell wrapper to access Arris cable modems on Cox's network
# author: Jan-30-2021, xyntrix@bitz.org
# license: Apache License, Version 2.0
# license-text: https://www.apache.org/licenses/LICENSE-2.0
# intent: Cox Communications installed new firmware on my CPE without notice
# (as usual). This broke my automated modem status gathering. Wrote
# this simple shell script to process curl GETS to my cable modem