Skip to content

Instantly share code, notes, and snippets.

Questions are not from any actual exam!!!
Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl
and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
Once the job has completed, check the logs to and export the result to pi-result.txt.
Solution:
@onuryaz
onuryaz / linux_find_size_modified_date_and_remove_files.sh
Created August 12, 2020 19:18 — forked from joostvanveen/linux_find_size_modified_date_and_remove_files.sh
Linux commands to find all files modified older than a certain date or time, remove, find largest files or folder in a human readable way.
## NOTE: when finding file by time, use one of the following flags:
# ctime : the time a file was changed, in hours. On most systems this timestamp cannot be altered by any user, so it is fairly reliable
# atime : the time a file was last accessed, in hours. This is also set by the system.
# mtime : the modified time of a file, in hours. This can be set by any user. So if you are looking for mailcious files, never use this flag.
# cmin : same as mtime, but in minutes.
# amin : same as atime, but in minutes.
# mmin : same as mtime, but in minutes.
# Find all files in current directory changed more than 8 hours ago (480 minutes)
find $PWD -mindepth 1 -type f -cmin +480
@onuryaz
onuryaz / ansible_local_playbooks.md
Created October 23, 2019 21:48 — forked from alces/ansible_local_playbooks.md
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@onuryaz
onuryaz / CKAD.md
Created August 7, 2019 18:26 — forked from veggiemonk/CKAD.md
CKAD exam preparation
oc new-project image-uploader --display-name='Image Uploader Project'
oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git
oc new-app --image-stream=php --code=https://github.com/OpenShiftInAction/image-uploader.git --name=app-cli
oc describe svc/app-cli
oc expose svc/app-cli
oc describe route/app-cli
oc scale dc/app-cli --replicas=2
oc scale dc/app-cli --replicas=1
oc get pods --show-all=false
oc exec app-cli-1-9hsz1 hostname
@onuryaz
onuryaz / docker-compose.yml
Created August 1, 2019 15:03 — forked from devrkd/docker-compose.yml
Dockerise kafka and elasticsearch
version: '2'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
@onuryaz
onuryaz / file1.txt
Created June 2, 2015 13:09
the description for this gist
Erdem in gist
@onuryaz
onuryaz / file1.txt
Created June 2, 2015 12:59
the description for this gist
Erdem in gist
@onuryaz
onuryaz / file1.txt
Created June 2, 2015 12:57
the description for this gist
Erdem in gist
@onuryaz
onuryaz / file1.txt
Created June 2, 2015 12:56
the description for this gist
String file contents