Skip to content

Instantly share code, notes, and snippets.

View shashank-ssriva's full-sized avatar
🏠
Working from home

Shashank Srivastava shashank-ssriva

🏠
Working from home
View GitHub Profile
root@k8s-master shashank]# kubeadm init --apiserver-advertise-address 10.128.0.27 --pod-network-cidr=10.244.0.0/16
[init] Using Kubernetes version: v1.20.4
[preflight] Running pre-flight checks
[WARNING Firewalld]: firewalld is active, please ensure ports [6443 10250] are open or your cluster may not function correctly
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.5. Latest validated version: 19.03
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
#Author : Shashank Srivastava
#Date : 27th of October, 2017
from pync import Notifier
import subprocess
def notify(text):
Notifier.notify(text)
COMMAND = "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep SSID | tail -1 | awk '{print $2}'"
[
{
"ref": "Environments/LocalHost",
"type": "udm.Environment"
}
]
CREATE DATABASE XE
USER SYS IDENTIFIED BY system123
USER SYSTEM IDENTIFIED BY system123
controlfile reuse
LOGFILE GROUP 1 ('/u01/app/oracle/oradata/XE/redo01.log') SIZE 100M,
GROUP 2 ('/u01/app/oracle/oradata/XE/redo02.log') SIZE 100M,
GROUP 3 ('/u01/app/oracle/oradata/XE/redo03.log') SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
#TextInFile! A cute, little utility that allows you to search for the text inside directories from the command-line.
#Author : - Shashank Srivastava
#Date : - 16 August 2017
#set -x
#!/bin/bash
echo ""
if [ $# -eq 0 ]
then
echo "Error!! Please enter absolute path of the directory inside which you want to perform the search. Run this utility as ./textinfile /path/to/directory. Prefix sudo if needed."
echo ""
<VirtualHost *:*>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ProxyPreserveHost On
<IfModule mod_proxy.c>
# If you want to use apache2 as a forward proxy, uncomment the
# 'ProxyRequests On' line and the <Proxy *> block below.
# WARNING: Be careful to restrict access inside the <Proxy *> block.
# Open proxy servers are dangerous both to your network and to the
# Internet at large.
#
# If you only want to use apache2 as a reverse proxy/gateway in
# front of some web application server, you DON'T need
<VirtualHost *:8889>
ErrorLog /var/log/apache2/error_forward_proxy.log
CustomLog /var/log/apache2/access_forward_proxy.log combined
</VirtualHost>
<IfModule mod_proxy.c>
# If you want to use apache2 as a forward proxy, uncomment the
# 'ProxyRequests On' line and the <Proxy *> block below.
# WARNING: Be careful to restrict access inside the <Proxy *> block.
# Open proxy servers are dangerous both to your network and to the
# Internet at large.
#
# If you only want to use apache2 as a reverse proxy/gateway in
# front of some web application server, you DON'T need
@shashank-ssriva
shashank-ssriva / Output HTML File
Last active September 9, 2022 12:30
Another version of my Shell Script that generates a server(Linux) Health Report in a vivid & vibrant HTML format, complete with 3D colorful charts & visual elements. Run this as sudo. For more details & screenshots, go to my blog post https://watilearnd2day.wordpress.com/2017/05/14/bash-shell-script-to-create-a-rich-colorful-server-health-report…
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd>
<html>
<head>
<link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css integrity=sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u crossorigin=anonymous>
<link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css integrity=sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp crossorigin=anonymous>
<script src=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js integrity=sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa crossorigin=anonymous></script>
<script type=text/javascript src=https://www.gstatic.com/charts/loader.js></script>
<script type=text/javascript>
google.charts.load('current', {'packages':['gauge']});
google.charts.setOnLoadCallback(drawChart);