Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Govind Sharma govind0229

🏠
Working from home
  • Buzzworks business services pvt ltd
  • Delhi - North
  • @govind0229
View GitHub Profile
@govind0229
govind0229 / configureODBC.sh
Created Mar 10, 2021 — forked from radius314/configureODBC.sh
Used for configuring ODBC for FreeSWITCH
View configureODBC.sh
while true; do
read -p "If you already have compiled FreeSWITCH you will need to manually edit the configure file to set enable_core_odbc_support=yes, are you sure you want to continue? (y/n)" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes to continue to installing ODBC and compiling FreeSWITCH, answer no to abort this process.";;
esac
done
yum -y install unixODBC-devel mysql-connector-odbc
@govind0229
govind0229 / http2_apache2_ubuntu16.04.md
Created Jan 11, 2021 — forked from GAS85/http2_apache2_ubuntu16.04.md
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04
View http2_apache2_ubuntu16.04.md

Requirements

  • A self-managed VPS or dedicated server with Ubuntu 16.04 running Apache 2.4.xx.
  • For Ubuntu 18.04 please read here --> https://gist.github.com/GAS85/8dadbcb3c9a7ecbcb6705530c1252831
  • A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.
@govind0229
govind0229 / How to replace faulty hard-disk into Software Raid1.md
Last active Jan 9, 2021
How to replace faulty hard-disk into Software Raid1.
View How to replace faulty hard-disk into Software Raid1.md
@govind0229
govind0229 / Varnish + Hitch cache.md
Last active Dec 28, 2020
How to Install Varnish + Hitch Cache for Apache on CentOS/RHEL8
View Varnish + Hitch cache.md

How to Install Varnish + Hitch Cache for Apache on CentOS/RHEL8

  • Varnish Cache is a free open source, modern and high-performance web application accelerator. It is a fast reverse HTTP proxy that caches content to speed up your web server performance, by storing web content in server memory – in a cache. It is configured to run in front of an origin server such as Apache (HTTPD) webserver.

Hitch and varnish workflow

Step 1: Installing Apache Web Server.

@govind0229
govind0229 / Resize root partition.md
Last active Dec 21, 2020
Resize root partition (or how to delete the default /home partition) on CentOS 8 through SSH
View Resize root partition.md

Resize root partition (or how to delete the default /home partition) on CentOS 8 through SSH

This requires you to be able to ssh into the instance using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customation-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 8 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and /boot

Step 1 - Copy /home Contents

  • To backup the contents of /home, do the following:
@govind0229
govind0229 / Postgresql connection exceeded issue solve.md
Last active Dec 21, 2020
Postgresql connection exceeded issue solve
View Postgresql connection exceeded issue solve.md

Postgresql

Bash psql -U postgres -c 'SHOW config_file' psql -U postgres -c 'SHOW config_file' psql -U postgres -c 'SHOW max_connections' `bash

systemctl restart postgresql-12.service

`

@govind0229
govind0229 / Asterisk Caller-id.md
Last active Dec 21, 2020
How To Set Random Callerid In Asterisk.
View Asterisk Caller-id.md

How to set random callerid in asterisk

How to set Random Callerid in asterisk(vicidial goautodial freepbx)

Why Random callerid setting required

In call centers sometimes they need to show random callerids for each call, which are generated by autodiallers or predictive diallers ,so customers wont see that call is from same center. in this blog i will show two methods to set random callerid in asterisk or vicidial or goautodial based diallers, pbx.

Option 1 : using RAND function in asterisk

@govind0229
govind0229 / The check file differs from the remote server using ssh commands.md
Last active Dec 21, 2020
The check file differs from the remote server using ssh commands.
View The check file differs from the remote server using ssh commands.md

Compare remote server file using ssh commands

# ssh user@remote-host "cat /home/root/file_remote" | diff  - file_local 

# ssh -P<port> -l root <remote server ip> "cat  /home/root/file_remote" | diff - /home/root/local_server_file
enter password 
	> 
		diff will
	<
@govind0229
govind0229 / Outbound setup for freeswitch.md
Last active Dec 21, 2020
Free-switch outbound calling through Asterisk setup
View Outbound setup for freeswitch.md

Freeswitch outbound calling through Asterisk

[cloud]
type=peer
host=X.X.X.X
port=5080
allow=all
;allow=ulaw
;allow=alaw
trustrpid=yes
@govind0229
govind0229 / Pycurl Package Import Issue.md
Last active Dec 21, 2020
Auto-dial script not running getting pycurl package import issue.
View Pycurl Package Import Issue.md

-- autodial scriprt not running getting pycurl package import issue --

yum install openssl-devel pip install --compile --install-option="--with-openssl" pycurl