Skip to content

Instantly share code, notes, and snippets.

View jaganthoutam's full-sized avatar
🎯
Focusing

Jag Thoutam jaganthoutam

🎯
Focusing
View GitHub Profile
@jaganthoutam
jaganthoutam / FreeSWITCH-notes.md
Created May 13, 2023 06:06 — forked from toraritte/FreeSWITCH-notes.md
FreeSWITCH notes (and Stackoverflow backup)

TODO Start saving posts off Stackoverflow, and only contribute conservatively.

What is the purpose of FreeSWITCH's mod_esl?

There is [another question][1] trying to figure out the connection between mod_event_socket and the Event Socket Library (ESL).

The [Event Socket Library][2] itself is a C library ([libesl][3]) that can be used to build external C applications to control FreeSWITCH via its [event system][4].

As far as I understand, [mod_esl][5] is only a FreeSWITCH module wrapper around [libesl][3], used to extend programming languages with the same functionality (i.e., to control a FreeSWITCH instance). The [documentation][5] doesn't mention this, but basing this assumption on the quoted sources below, and on the fact that I couldn't find anyone ever using it directly (i.e., found no mailing list question, nothing on slack, no SO questions, no blog posts, [the books][6] also barely mention it, and so on). Are there any other use cases that I'm missing?

# Source: https://gist.github.com/0431989df4836eb82bdac0cc53c7f3d6
# Used in https://youtu.be/R6OeIgb7lUI
##############################
# Flux 2 With GitOps Toolkit #
##############################
# What Is GitOps And Why Do We Want It?: https://youtu.be/HKkhD6nokC8
# Argo CD: Applying GitOps Principles To Manage Production Environment In Kubernetes: https://youtu.be/vpWQeoaiRM4
@jaganthoutam
jaganthoutam / clean-docker.sh
Created July 12, 2022 06:33 — forked from hungbang/clean-docker.sh
Stop all docker processes, remove all containers, remove all images
# stop all processes
docker stop $(docker ps -aq)
# remove all containers
docker rm $(docker ps -aq)
# remove all images
docker rmi $(docker images -aq)
# delete all volumes
@jaganthoutam
jaganthoutam / how-to-install-openssl-1.1.1-on-centos-7.md
Created May 29, 2022 05:04
How to install openssl 1.1.1 on CentOS 7

How To Install OpenSSL 1.1.1 on CentOS 7

This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.

Requirements

Upgrade the system

yum -y update
@jaganthoutam
jaganthoutam / s3-to-es-lambda.py
Created January 6, 2021 06:08 — forked from giuliocalzo/s3-to-es-lambda.py
S3 Logs to Elasticsearch
##################################################
### Elasticsearch host name
ES_HOST = "search-******************.ap-northeast-1.es.amazonaws.com"
### Elasticsearch prefix for index name
INDEX_PREFIX = "elb_log"
### ELB name for type name
ELB_NAME = "*****"
helm install consul hashicorp/consul --set global.name=consul
helm install vault hashicorp/vault -f vault-values.yaml
#vault-values.yaml file
global:
enabled: true
injector:
$LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor = "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound)
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:
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-fields
namespace: kube-system
labels:
k8s-app: filebeat
name: 'filebeat-fields'
data:
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
data:
filebeat.yml: |-