Skip to content

Instantly share code, notes, and snippets.

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

Ghulam Mustafa cyrenity

🏠
Working from home
View GitHub Profile
@cyrenity
cyrenity / websock_server_deepgram.py
Created October 26, 2024 12:16
Reference implementation of backend websocket server for mod_audio_fork!
import asyncio
import soundfile as sf
import numpy as np
import json
import websockets
import os
import logging
@cyrenity
cyrenity / API Preview
Created September 1, 2024 08:35
Django FreeSWITCH API
Visit following link to view API speficications!
https://app.swaggerhub.com/apis/cyrenity/FooSWITCH/v1
#!/usr/bin/env python3
import numpy as np
import os
import sys
import asyncio
import websockets
import concurrent.futures
import logging
import os
#!/usr/bin/env python3
import numpy as np
import os
import sys
import asyncio
import websockets
import concurrent.futures
import logging
import os
@cyrenity
cyrenity / l2-switch-using-openvswitch.png
Last active July 11, 2021 14:13
L2 Switch Using OpenVSwitch
## Setup L2 switch OpenVSwitch
@cyrenity
cyrenity / OpenvSwitch-Faucet-Lab1.png
Last active October 31, 2023 03:40
SDN using Open vSwitch and KVM
OpenvSwitch-Faucet-Lab1.png
@cyrenity
cyrenity / create_port.sh
Last active June 18, 2021 21:35
Create openstack port and bind it with one of management/storage/network node of your openstack cluster
# A Small Script for creating a port in an internal network and binding it with one of control/neutron node
#### !!!! CAUTION !!!! #####
# DO NOT RUN THIS SCRIPT UNLESS YOU KNOW HOW EACH LINE IS GOING TO DO WITH YOUR OPENSTACK INSTALL
# YOU ARE ADVISED TO FIRST UNDERSTAND AND THAN RUN EACH LINE OF THIS SCRIPT INTERACTIVELY
############################
NETWORK_NAME=demo1
SUBNET_NAME=demo1-net
MGMT_PORT_IP=172.16.2.10
@cyrenity
cyrenity / Parition_Layout.txt
Last active February 21, 2025 22:32
Ubuntu 20.04 Auto-install custom storage layout for multiple volume groups
Device: /dev/vda
Partition Table: gpt
/dev/sda1 - 1MB - for UEFI/Bootloader
/dev/sda2 - 10G - root partition
/dev/sda3 - Remaining Space - for cinder-volumes
LVM Volume Groups:
export VMNAME=instance01
export MAC_ADDR=$(printf '52:54:00:%02x:%02x:%02x' $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)))
export INTERFACE=enp1s0
export IP_ADDR=192.168.122.101
export CONFIG_DIR=/home/bitvizor.com/.local/share/libvirt/cloudconfigs/
export IMAGES_DIR=/home/bitvizor.com/.local/share/libvirt/images/
export SSH_KEYS=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDVtvTtRd3zOAo5bSgRR7muNdHTFeZg1RhxNkcl24W0ZfKTvLd1HWhL4LEvVjUwQY1xvPaEKiyCXIYf18feIy15KW3oBj4mqEk+YsUbTMSoV32DnMUyhDfoPKM4gOXMYRbliKr2mQ5RX6pEgm2H4mzI+kC6+f8v+/Fn6o6zOwgfo0ltbHfCH31YW1i+DIZtJ6/iWCzLJ7fDvRJW/YKH0DXOJQxaX4k9J7aGjjs8dXdJANtIgT4doa6ZpKTDh36sgBTsAlYQAnnH9DJxv71sRHSnXyzhjrgkkgkKbeG/GZy7Lr3fH/hqEc3P4DE8c7waAySNMOGThbVqx95uwNGSQa6XO3UsDxzg2NTuqmUqlOUQRAyLkteCOpAyd/8YUREriVotFKJGTIJTMo/7TnrPk5VpNQb/BQlGN12z0uQg8GkS88DlefPnDvdGpxemVBXAxtNscYfpoJzwB7H2kcfUeIrzJki929G/CI4K+A3K2i6v7dGXKgHlIbLGDCh3hgHF1a0= vasops@vasops
@cyrenity
cyrenity / k3s-using-k3os-in-vms.md
Created February 11, 2021 14:44
Create k3s - lightweight kubernetes cluster using k3os by Rancher Lab

Setup K3s (Lightweight Kubernetes) cluster in seconds using k3os

We are going to setup one master and two worker nodes

Prepare nodes/hosts

Create the master node k3s-master with following script: