Skip to content

Instantly share code, notes, and snippets.

@basitengr
basitengr / README.md
Created March 17, 2023 00:57 — forked from hwdsl2/README.md
My IPTables rules for securing the Asterisk VoIP server
## This will be fixed by
find /var/www -type d -exec chmod 755 {} \;
find /var/www -type f -exec chmod 644 {} \;
@basitengr
basitengr / Tutorial.md
Created September 11, 2021 23:44 — forked from topdockerlead/Tutorial.md
Wireguard on CentOS 7/8

Set Up Your Own WireGuard VPN Server on CentOS

This tutorial is going to show you how to set up your own WireGuard VPN server on CentOS. WireGuard is made specifically for the Linux kernel. It runs inside the Linux kernel and allows you to create fast, modern, and secure VPN tunnel. TL;DR

Prerequisites

This tutorial assumes that the VPN server and VPN client are both running CentOS operating system.

Step 1: Install WireGuard on CentOS Server and Desktop

Log into your CentOS server, then run the following commands to install WireGuard.

# CentOS 8
@basitengr
basitengr / asterisk-codec-install.sh
Last active May 18, 2021 00:08
G729 and G723 Codecs install for asterisk
#!/bin/bash
# codec-install.sh version 1.00
#
# Copyright (C) 2018 James Pearson <jamesp@vicidial.com> LICENSE: AGPLv2
#
# Codecs installed from http://asterisk.hosting.lv/
# Supports 64-bit Asterisk v.1.8, 11, 12, 13, 14, 15, 16
@basitengr
basitengr / cluecon-tgi2021-dashboard.json
Created February 18, 2021 11:36 — forked from razvancrainea/cluecon-tgi2021-dashboard.json
ClueCon TGI2021: Configs for Quality Based Routing statistics
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@basitengr
basitengr / redis_cheatsheet.bash
Created April 3, 2020 03:29 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@basitengr
basitengr / db_backup.sh
Last active December 17, 2019 23:31 — forked from NARKOZ/db_backup.sh
MySQL backup shell script
#!/bin/bash
# Shell script to backup MySQL database
# Set these variables
DBUSER="" # DB_USERNAME
DBPASS="" # DB_PASSWORD
DBHOST="" # DB_HOSTNAME
# Backup Dest directory
DEST="/DBBackup"
for i in `git status | grep deleted | awk '{print $3}'`; do git rm $i; done
sudo apt-get install perl libdbi-perl libdbd-mysql-perl libdbd-pg-perl libfrontier-rpc-perl libterm-readline-gnu-perl libberkeleydb-perl gcc bison flex make
mkdir src
cd src/
wget http://opensips.org/pub/opensips/latest/src/opensips-1.6.2-notls_src.tar.gz
tar zxvf opensips-1.6.2-notls_src.tar.gz
cd opensips-1.6.2-notls/
make all include_modules=“db_mysql” modules
sudo apt-get install mysql-server
sudo make install include_modules=“db_mysql” modules
sudo bash
@basitengr
basitengr / install-docker-deb9.sh
Created July 27, 2018 20:19 — forked from upbeta01/install-docker-deb9.sh
Install Docker In Debian 9 (Stretch)
#!/bin/bash
#
# -----------------------
#
# This is a script that installs docker-ce (Docker Community Edition) on Debian 9
# Inspired by https://gist.github.com/frgomes/a6f889583860f5b330c06c8b46fa0f42
#
# -----------------------
# Pre-requesite