Skip to content

Instantly share code, notes, and snippets.

View johnsage25's full-sized avatar
🏠
Working from Office

John Nwanosike johnsage25

🏠
Working from Office
View GitHub Profile

Installing FreeSWITCH 1.10.X on Ubuntu 18.04 | Ubuntu 20.04 LTS

Introduction

FreeSWITCH is a software defined telecom stack that runs on any commodity hardware. FreeSWITCH can handle voice, video and text communication and support all popullar VoIP protocols. FreeSWITCH is flexible and modular, and can be used in any way you can imagine

This guide demonstrates how to get it install FreeSWITCH and get it up and running on a Ubuntu 20.04 LTS machine

Prerequisites

To follow along with this guide, you need one Ubuntu 20.04 LTS server which has prerequisite packages installed and configured. In order to install required packages issue following command

@johnsage25
johnsage25 / doc.adoc
Created May 9, 2023 22:51 — forked from KrustyHack/doc.adoc
proxmox-ubuntu-cloud-howto

Cloud-Init Support

Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network

@johnsage25
johnsage25 / prepare_ubuntu_template.sh
Created May 9, 2023 22:31 — forked from reluce/prepare_ubuntu_template.sh
Prepare Ubuntu 22.04 Cloud Image and Template for Proxmox
# All commands will be executed on a Proxmox host
sudo apt update -y && sudo apt install libguestfs-tools -y
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
# Install qemu-guest-agent on the image. Additional packages can be specified by separating with a comma.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent
# Read and set root user password from file.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --root-password file:password_root.txt
# Create an additional user.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --run-command "useradd -m -s /bin/bash myuser"
# Set password for that user.
@johnsage25
johnsage25 / 01-openstack.md
Created May 5, 2023 21:59 — forked from meetmatt/01-openstack.md
Scripted version of the how-to article by Rodrigo Nascimento "OpenStack Single-Node (MicroStack)" https://connection.rnascimento.com/2021/03/08/openstack-single-node-microstack/ Part 2 with Kubernetes can be found here https://gist.github.com/yurgol/92167f8cc61e85346bbb97b4501d8d22

Openstack

OS configuration

Add user to sudoers without password

echo 'user ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/user

Kernel optimizations

@johnsage25
johnsage25 / saveToExternalStorage.md
Created November 21, 2022 21:51 — forked from vxhviet/saveToExternalStorage.md
Android saving Bitmap to external storage.

Source: StackOverflow

Question: How do I save Bitmap to extrenal storage in Android?

Answer:

Use this function to save your bitmap in SD card:

public void saveTempBitmap(Bitmap bitmap) {
        if (isExternalStorageWritable()) {
@johnsage25
johnsage25 / nextjs-deploy.md
Created November 14, 2022 00:04 — forked from jjcodes78/nextjs-deploy.md
Deploying NEXTJS site with nginx + pm2

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

@johnsage25
johnsage25 / beautify-sql-schema.js
Created August 13, 2022 17:41 — forked from MartinMuzatko/beautify-sql-schema.js
Create SQLITE schema and format it
const sqlFormatter = require('sql-formatter')
const promisify = require('promisify-node')
const fs = promisify('fs')
const path = require('path')
const INDENT = '\t'
const SCHEMAFILE = path.resolve(__dirname, 'schema.sql')
(async () => {
try {
@johnsage25
johnsage25 / ejabberd-setup-steps.txt
Created April 14, 2022 23:57 — forked from umanda/ejabberd-setup-steps.txt
How to install Ejabberd 18.* XMPP Server with Mysql on Ubuntu 18.04
-------------------------------------
Build Ejabberd
-------------------------------------
1) sudo su
2) apt-get update
@johnsage25
johnsage25 / gist:61ca15813b91c1e0db04ebef59bfe0a7
Created March 2, 2022 15:32 — forked from jesusprubio/gist:4066845
Kamailio.cfg with SIP over websockets support included.NOTE: For GRUU support change (line 363): modparam("registrar", "gruu_enabled", 1)
#!KAMAILIO
#
# Kamailio (OpenSER) SIP Server v4.1 - default configuration script
# - web: http://www.kamailio.org
# - git: http://sip-router.org
#
# Direct your questions about this file to: <[email protected]>
#
# Refer to the Core CookBook at http://www.kamailio.org/wiki/
# for an explanation of possible statements, functions and parameters.