- Clean pkg cache
- Remove unused packages (orphans)
- Clean cache in /home
- remove old config files
- Find and Remove
- duplicates
- empty files
- empty directories
- broken symlinks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
/** | |
* This script transfers bash history to zsh history | |
* Change bash and zsh history files, if you don't use defaults | |
* | |
* Usage: node bash_to_zsh_history.js | |
* | |
* Author: Matteo Gaggiano | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################# | |
# = This script transfers bash history to zsh history | |
# = Change bash and zsh history files, if you don't use defaults | |
# | |
# = Usage: ruby bash_to_zsh_history.rb | |
# | |
# = Author: Ankit Goyal | |
################################################################# | |
# change if you don't use default values |
Install Oracle XE 18 under WSL2
- install package is RPM, it's easier to use CentOS 7 or 8 (from CentOS-WSL or wsldl)
- if you want to use Debian/Ubuntu, you must convert RPM to DEB (but conversion with
alien
fails under Debian) - first, install oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
- second, install oracle-database-xe-18c-1.0-1.x86_64.rpm
- see https://mikesmithers.wordpress.com/2019/01/03/installing-and-configuring-oracle-18cxe-on-centos/
- run as root:
/etc/init.d/oracle-xe-18c configure
- it would fail if host IP is auto-generated to be 127.0.1.1
- you can update the IP in
/etc /hosts
and try it again
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kyverno.io/v1 | |
kind: ClusterPolicy | |
metadata: | |
name: disallow-latest-tag | |
spec: | |
validationFailureAction: audit | |
background: true | |
rules: | |
- name: require-image-tag | |
match: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: CronJob | |
metadata: | |
name: kyverno-events-cleanup | |
namespace: openshift-ops # Infra-only-namespace | |
spec: | |
schedule: "*/10 * * * *" | |
concurrencyPolicy: Forbid #do not allow the creation of new job before the previous one had finished | |
jobTemplate: | |
spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for NAMESPACE in $(oc get namespace --no-headers | awk '{print $1}' | grep -v "openshift-*") ; | |
do | |
oc get deployment,deploymentconfig -o name -n $NAMESPACE |\ | |
xargs -n 1 -I OBJECT oc get OBJECT -o json -n $NS 2>/dev/null |\ | |
jq -r 'select(.spec.template.spec.containers[].securityContext!={}) | | |
"Kind: " + .metadata.kind, | |
"NAME: " + .metadata.name, | |
"NAMESPACE: " + .metadata.namespace, | |
"To see the exact SCC, run:", | |
"oc get " + .kind + " " + .metadata.name + " -n " .metadata.namespace + " -o jsonpath={.spec.template.spec.containers[].securityContext} | jq .", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kyverno.io/v1 | |
kind: ClusterPolicy | |
metadata: | |
name: block-cluster-admin-openshift-etcd-ns | |
annotations: | |
policies.kyverno.io/title: Block Cluster Admin on Openshift-etcd Namespace | |
policies.kyverno.io/category: Sample | |
policies.kyverno.io/subject: RBAC | |
spec: | |
validationFailureAction: enforce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: silence-alerts-script | |
namespace: openshift-monitoring | |
data: | |
runScript.sh: | | |
#!/bin/bash | |
oc -n openshift-monitoring exec alertmanager-main-0 -- amtool silence --alertmanager.url="http://localhost:9093" -o json | jq -r '.[].comment' >> /tmp/existing-silences.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
OlderNewer