Skip to content

Instantly share code, notes, and snippets.

View AKSarav's full-sized avatar
🎯
Focusing

Sarav AKSarav

🎯
Focusing
View GitHub Profile
@AKSarav
AKSarav / WebhookToAirtable.php
Last active April 27, 2018 20:50
Webhook program to receive data from some remote client and process it and send to Airtable and add a record in table
<?php
class Processor {
public function execute($targetFile) {
$data = sprintf(
"%s %s %s \n\nHTTP headers:\n",
$_SERVER['REQUEST_METHOD'],
$_SERVER['REQUEST_URI'],
$_SERVER['SERVER_PROTOCOL']
);
foreach ($this->getHeaderList() as $name => $value) {
@AKSarav
AKSarav / f5-GetAllPartition-PersistenceProfile_VIP_Mapping.py
Created May 23, 2018 22:34
f5-GetAllPartition-PersistenceProfile_VIP_Mapping.py
#!/usr/bin/python
import subprocess
import re
import sys
from sys import argv
# Class Declaration
class VIPDICT(list):
def __init__(self, name):
@AKSarav
AKSarav / logstash-tomcat.conf
Created November 20, 2019 22:50 — forked from chanjarster/logstash-tomcat.conf
Tomcat Access Log Logstash configration
input {
file {
path => "/path/to/tomcat/logs/localhost_access_log*.txt"
}
}
filter {
grok {
match => {
"message" => "%{COMBINEDAPACHELOG} %{IPORHOST:serverip} %{NUMBER:serverport} %{NUMBER:elapsed_millis} %{NOTSPACE:sessionid} %{QS:proxiedip} %{QS:loginame}"
@AKSarav
AKSarav / Kubectl Diff Env variables
Created November 7, 2022 09:02
Kubectl Diff Env variables
diff <(kubectl get deployments deployment1 -n ns1 -o jsonpath='{range .spec.template.spec.containers[*].env[*]}{@.name}{"\n"}{end}'|sort) <(kubectl get deployments deployment2 -n ns2 -o jsonpath='{range .spec.template.spec.containers[*].env[*]}{@.name}{"\n"}{end}'|sort)