Skip to content

Instantly share code, notes, and snippets.

View hamidrhashmi's full-sized avatar
🏠
Working from home

Hamid R. Hashmi hamidrhashmi

🏠
Working from home
View GitHub Profile
@hamidrhashmi
hamidrhashmi / opensips_b2bua.cfg
Last active May 28, 2021 04:13
OpenSIPs B2BUA Server
####### Global Parameters #########
#debug_mode=yes
log_level=3
log_stderror=no
log_facility=LOG_LOCAL0
children=8
#tcp_children=32
@hamidrhashmi
hamidrhashmi / gist:c299e0939d87992d390f78d93e7b5ed2
Created October 28, 2023 14:02
How to make resolve.conf persistent

Edit file /etc/dhcp/dhclient.conf

supersede domain-name "ims.mnc001.mcc001.3gppnetwork.org";
prepend domain-name-servers 192.168.0.189, 192.168.0.1;

edit file /etc/systemd/resolved.conf

DNS=192.168.0.189
FallbackDNS=192.168.0.1
I am a lazy person. I have not written it yet.
@hamidrhashmi
hamidrhashmi / clickhouse-install.md
Created December 27, 2023 11:02
How to Install Clickhouse Server

This installation procedure is for Debain/Ubuntu

apt install curl
curl https://clickhouse.com/ | sh

this will download a clickhouse file, you need run the following command to install

sudo ./clickhouse install

it will ask following questions

@hamidrhashmi
hamidrhashmi / install_node.md
Last active December 27, 2023 14:25
How to Install Node

Download the package

wget https://nodejs.org/dist/v21.5.0/node-v21.5.0-linux-x64.tar.xz

untar the files

tar -xvf node-v21.5.0-linux-x64.tar.xz

move it to /usr/local/

@hamidrhashmi
hamidrhashmi / qryn_install.md
Last active January 4, 2024 10:33
How to Install qryn

STEP 3: Install qryn

go to the directory

cd /usr/local/
git clone https://github.com/metrico/qryn && cd qryn
npm install

Create a Unit file

@hamidrhashmi
hamidrhashmi / install_grafana.md
Last active January 3, 2024 06:36
How to configure Logging Server with Grafana and qryn

STEP 3: Install qryn

STEP 4: Install grafana-server

apt-get install -y apt-transport-https software-properties-common wget
mkdir -p /etc/apt/keyrings/
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
@hamidrhashmi
hamidrhashmi / install_vector.md
Last active January 3, 2024 06:27
Install Vector to received syslog and send them as Loki

Install vector

curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev | bash

this will install vector in home directory, move it to /usr/local

mv /root/.vector /usr/local/vector/

create a config file

@hamidrhashmi
hamidrhashmi / Install_grafana_agent.md
Created January 3, 2024 06:33
How to configure grafana agent to send logs

Go to Grafana agent git repo, and download the altest release or use the following command to download for Debian

wget https://github.com/grafana/agent/releases/download/v0.38.1/grafana-agent-0.38.1-1.amd64.deb

instal the agent

dpkg -i grafana-agent-0.38.1-1.amd64.deb

Edit grafana-agent configuration file /etc/grafana-agent.yaml

@hamidrhashmi
hamidrhashmi / INSTALL.md
Last active October 1, 2024 07:13
How to install Freeswitch from Source on Debian 12

Step 1: install dependencies

Please execute the following commands to resolve the package/libraraies dependencies for package installation in further steps

apt install aptitude build-essential
aptitude install autoconf libtool libtool-bin pkg-config libpq-dev lua5.4 liblua5.4-dev libmariadb-dev git libtiff-dev libsqlite3-dev libcurl4-openssl-dev libcurl4-nss-dev libcurl4-gnutls-dev libpcre3 libpcre3-dev libspeex-dev libspeexdsp-dev libldns-dev yasm uuid-dev uuid libopencore-amrnb-dev libopencore-amrnb0 libopencore-amrwb-dev libopencore-amrwb0 libvo-amrwbenc-dev libvo-amrwbenc0 libswscale-dev libavformat-dev libopus-dev libshout3-dev libmpg123-dev libmp3lame-dev libsndfile-dev libapr1 libapr1-dev libncurses5 libncurses5-dev libsctp-dev libsctp1 libtinfo5 sqlite3 unzip zip libedit-dev cmake

For Rockey Lilnux follow this

Step 2: Install spandsp