Skip to content

Instantly share code, notes, and snippets.

View oehrlis's full-sized avatar
🏡
Working from home

Stefan Oehrli oehrlis

🏡
Working from home
View GitHub Profile
@oehrlis
oehrlis / docker_fix_db.md
Created August 30, 2023 13:13
Manuel fix Oracle DB container

Manually fix / configure a few things which have not been added to the Oracle Database Container

export CON_NAME='cdbua190'

Install missing packages:

docker exec -it -u root $CON_NAME yum install -y hostname rlwrap
@oehrlis
oehrlis / vsc_regex.md
Created August 25, 2023 06:25
VSC RegEx Examples

VSC RegEx Examples

Some

Replace filename with a link

  • Search for the following RegEx
([\w\d\-.]+\.sql)
@oehrlis
oehrlis / update_bastion_hosts.md
Last active June 23, 2020 09:45
Update Table README.md

Create a tempfile before the Table

sed '1,/^- \*\*Kurs Dauer:\*\*.*$/!d' README2.md >README_part1.md
echo "" >>README_part1.md

Create a tempfile after the table. Do also remove the table itself

sed '/^|.*|/d' README2.md|sed '0,/^- \*\*Kurs Dauer:\*\*.*$/d' >README_part3.md

Create the list of bastion hosts

@oehrlis
oehrlis / oci_cli_commands.md
Last active July 20, 2022 16:56
Miscellaneous oci cli commands

Below you find a couple of oci cli commands and examples. Query syntax http://jmespath.org/examples.html#filters-and-multiselect-lists

list all activ compartments

oci iam compartment list --all --output table --compartment-id-in-subtree true \
--query "data [?\"lifecycle-state\" =='ACTIVE'].{Name:name,OCID:id}"

list all inactive compartments

oci iam compartment list --all --output table --compartment-id-in-subtree true \

@oehrlis
oehrlis / oci_public_keys.md
Created June 3, 2020 07:27
Deploy ssh public keys to OCI

First convert the public Key (tutorialinux.com/convert-ssh2-openssh/)

ssh-keygen -i -f ssh2.pub > openssh.pub

Upload the Key to the cloud jump host

scp openssh.pub opc@jumphost.trivadislabs.com:~/.ssh/
ssh opc@jumphost.trivadislabs.com 'cat ~/.ssh/openssh.pub >> ~/.ssh/authorized_keys'

And to the oud server for user oracle

Simple alias to execute base in docker container with some terminal settings

alias deo='function _deo() { if [ -n "${1}" ]; then docker exec -e COLUMNS="`tput cols`" -e LINES="`tput lines`" -it -u oracle ${1} bash --login; else echo "No docker container specified"; fi } ; _deo'
alias der='function _der() { if [ -n "${1}" ]; then docker exec -e COLUMNS="`tput cols`" -e LINES="`tput lines`" -it -u root ${1} bash --login; else echo "No docker container specified"; fi } ; _deo'

Search TEX package for a specific file:

tlmgr search --global --file
@oehrlis
oehrlis / bash_link_software.md
Last active May 14, 2019 07:18
bash loop to add a links for software packages
@oehrlis
oehrlis / build_docker_tools.md
Last active May 3, 2021 10:15
Just an other bash for loop....

Build my local docker tools using a loop

docker pull oraclelinux:7-slim
docker pull 06kellyjac/markdownlint-cli
docker pull treeder/bump
docker pull markdownlint/markdownlint
docker pull alpine
docker pull busybox
for i in $HOME/Development/github.com/oehrlis/docker-*/Dockerfile; do 
@oehrlis
oehrlis / DOAG_Oracle_and_Docker_Demos.md
Created March 8, 2019 12:20
DOAG Webinar Oracle and Docker

title: "Demo Oracle und Docker" subtitle: "DOAG Webinar Oracle Datenbanken in Docker Container" author: [Stefan Oehrli] date: "08 März 2019" tvddocversion: 1.0 papersize: a4 listings-disable-line-numbers: true titlepage: true toc: true