Skip to content

Instantly share code, notes, and snippets.

View iogbole's full-sized avatar

Israel Ogbole iogbole

View GitHub Profile
@iogbole
iogbole / Apache Tomcat 8 Start stop script init.d script
Created May 26, 2017 09:51 — forked from miglen/Apache Tomcat 8 Start stop script init.d script
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
#!/bin/bash
#
# description: Apache Tomcat init script
# processname: tomcat
# chkconfig: 234 20 80
#
#
# Copyright (C) 2014 Miglen Evlogiev
#
# This program is free software: you can redistribute it and/or modify it under
Vagrant.configure("2") do |config|
config.vm.box = "windows10_msedge"
config.vm.boot_timeout = 500
config.vm.network "private_network", ip: WIN10_MSEDGE_IP
config.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.name = "windows10_msedge"
vb.cpus = 1
vb.memory = 2048
end
@iogbole
iogbole / MySQL Replication Check
Created April 19, 2020 21:26 — forked from OliverBailey/MySQL Replication Check
Just a simple Mysql Replication Health Check script I wrote. You can put this in a cron.
#!/bin/bash
### VARIABLES ### \
EMAIL=""
SERVER=$(hostname)
MYSQL_CHECK=$(mysql --login-path=mysql_login -e "SHOW VARIABLES LIKE '%version%';" || echo 1)
STATUS_LINE=$(mysql --login-path=mysql_login -e "SHOW SLAVE STATUS\G")"1"
LAST_ERRNO=$(grep "Last_Errno" <<< "$STATUS_LINE" | awk '{ print $2 }')
SECONDS_BEHIND_MASTER=$( grep "Seconds_Behind_Master" <<< "$STATUS_LINE" | awk '{ print $2 }')
IO_IS_RUNNING=$(grep "Slave_IO_Running:" <<< "$STATUS_LINE" | awk '{ print $2 }')
@iogbole
iogbole / ckad-learning.md
Created June 26, 2020 22:52 — forked from benc-uk/ckad-learning.md
Certified Kubernetes Application Developer (CKAD)
@iogbole
iogbole / Get-PerformanceCounter.ps1
Created July 3, 2020 21:45 — forked from dstreefkerk/Get-PerformanceCounter.ps1
A quick PowerShell function to extract Windows' list of performance counters and their corresponding IDs
function Get-PerformanceCounter
{
# Get the Performance Counters from the Registry
$counters = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009' -Name 'counter' | Select-Object -ExpandProperty Counter
# Remove the last line
$counters = $counters | Select-Object -SkipLast 1
# Split the string into an array
$counters = $counters.Split([Environment]::NewLine)
@iogbole
iogbole / mysql-initialization-with-init-container.yaml
Created July 21, 2020 21:45 — forked from hossainemruz/mysql-initialization-with-init-container.yaml
This sample show how to use init container to download init.sql file and initialize mysql database using this file
# this pvc will be used to store downloaded init.sql file
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: init-script
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources: