Skip to content

Instantly share code, notes, and snippets.

View INDIAN2020's full-sized avatar

Gogula Sivannarayana INDIAN2020

View GitHub Profile
# Check the logs for more information to see why the api-server is not running and how to fix the problem:
journalctl -xn --unit kubelet.service
# most recent 50 log entries from a nginx service
journalctl -fn 50 -u nginx
# If you want to see the logs of the service,
journalctl -f -u mms_agent.service
# If any error happen
STEP 1: Install the AWS CLI tool in Cloud Shell to access the AWS resources from Google Cloud.
machine@cloudshell:~(xxyyxyyxyxyx)$ sudo apt-get update && sudo apt-get install dnsutils -y
machine@cloudshell:~(xxyyxyyxyxyx)$ dig <HOSTNAME>
machine@cloudshell:~(xxyyxyyxyxyx)$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
machine@cloudshell:~(xxyyxyyxyxyx)$ unzip awscliv2.zip && sudo ./aws/install
machine@cloudshell:~(xxyyxyyxyxyx)$ aws configure
Ask for:
AWS Access Key ID [None]:
AWS Secret Access Key [None]:
Default region name [None]:
@INDIAN2020
INDIAN2020 / highlight-share-posts-only.php
Created December 4, 2023 06:48 — forked from ronalfy/highlight-share-posts-only.php
Highlight and Share - Enable Posts Only
<?php
// Can use Code Snippets to insert: https://wordpress.org/plugins/code-snippets/
// Only enable on single posts (blog posts).
add_filter(
'has_enable_content',
function( $load_content ) {
if ( is_single() ) {
return true;
}
return false;
@INDIAN2020
INDIAN2020 / page-navigation.php
Created December 4, 2023 06:44 — forked from jwenerd/page-navigation.php
Page navigation shortcode for WordPress
<?php
/**
* @package Page Navigation Shortcode
* @version 0.1
*/
/*
Plugin Name: Page Navigation Shortcode
Description: This plugin automatically adds links to the previous and next pages at the bottom of page content. User's may disable for select pages as well on the page edit screen.
Author: TLT Studio
Version: 0.1
<?php
/* The new responsive image feature in wordpress 4.4 causes image sourceset attribuet
to insert images as HTTP rather than HTTPS. This completely breaks images on sites where
the site is loaded ( and in sometimes force-loaded) to be served via HTTPS
The following plugin changes these images to be HTTPS if the site is served via HTTPS
*/
if ( is_ssl() ) {
add_filter('wp_calculate_image_srcset', 'psu_https_srcset_fix' , 100 , 5);
}
function psu_https_srcset_fix( $sources, $size_array, $image_src, $image_meta, $attachment_id ){
---
apiVersion: v1
kind: Service
metadata:
name: redis-cluster-service
spec:
type: NodePort
selector:
app: redis-cluster
ports:
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: redis-pv-01
spec:
capacity:
storage: 1Gi
volumeMode: Filesystem
accessModes:
---
kind: ConfigMap
apiVersion: v1
metadata:
name: redis-config
data:
maxmemory: 2mb
---
apiVersion: apps/v1
kind: Deployment
gcloud container clusters create "cluster-1"
--project <PROJECT-ID>
--zone <ZONE-ID>
--no-enable-basic-auth
--cluster-version "1.20.10-gke.1600"
--release-channel "stable"
--machine-type "e2-medium"
--image-type "UBUNTU"
--disk-type "pd-standard"
--disk-size "100"