Skip to content

Instantly share code, notes, and snippets.

View canit00's full-sized avatar
🖥️
01101100 01100101 01100001 01110010 01101110 01101001 01101110 01100111

canit00

🖥️
01101100 01100101 01100001 01110010 01101110 01101001 01101110 01100111
  • U.S.
View GitHub Profile
@canit00
canit00 / mail_body.j2
Created February 6, 2019 17:36 — forked from halberom/mail_body.j2
ansible - example of using mail module to send one email for all hosts
# templates/mail_body.j2
{% for host in play_hosts %}
The {{ host }} says {{ hostvars[host]['result']['stdout'] }}
{% endfor %}
@canit00
canit00 / openshift-cheatsheet.md
Created March 25, 2019 11:34 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet

My Openshift Cheatsheet

Examine the cluster quota defined for the environment:

$ oc describe AppliedClusterResourceQuota

Install pkgs using yum in a Dockerfile

@canit00
canit00 / alert.sh
Created September 22, 2019 15:49 — forked from cherti/alert.sh
send a dummy alert to prometheus-alertmanager
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
kind: ServiceAccount
apiVersion: v1
metadata:
name: ldap-group-syncer
namespace: openshift-authentication
labels:
app: cronjob-ldap-group-sync
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@canit00
canit00 / git-clearHistory
Created August 22, 2020 22:32 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git