Skip to content

Instantly share code, notes, and snippets.

View sah-anshu's full-sized avatar

Anshu S. (Sudhanshu) sah-anshu

View GitHub Profile
@cyrenity
cyrenity / compile-and-install-freeswitch-1.10.x-on-ubuntu.md
Last active September 13, 2025 01:39
Install FreeSWITCH 1.10.x on Ubuntu 18.04 | 20.04 | 22.04 LTS

Installing FreeSWITCH 1.10.X on Ubuntu 18.04 | 20.04 | 22.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

@phiberoptick
phiberoptick / pritunl-server-custom-ssl_manually
Last active December 14, 2025 18:43
Use custom SSL cert in Pritunl Server Community
Ignore all that craziness below. These can be set from the cli with the "pritunl" command.
The commands below can be used to get/set the values of the cert, key, port and if the :80 -> "app.server_port" redirect is active.
# Get current SSL server cert:
pritunl get app.server_cert
# Get current SSL server key:
pritunl get app.server_key
@chetanppatil
chetanppatil / libModSecurity.sh
Last active May 30, 2023 15:17
Install and enable libModSecurity for your Nginx
##
# ModSecurity NGINX INSTALLATION SCRIPT
##
# Install Prerequisite Packages
echo "Install Prerequisite Packages";
sudo apt-get install -y apt-utils autoconf automake build-essential git libcurl4-openssl-dev libgeoip-dev liblmdb-dev libpcre++-dev libtool libxml2-dev libyajl-dev pkgconf wget zlib1g-dev
OPT_DIR=/opt
NGINX_DIR=/etc/nginx
@mrbar42
mrbar42 / README.md
Last active January 23, 2026 05:01
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster

Getting WiFi adapter running on the Raspberry Pi

Plug the USB WiFi adapter into one of the free USB ports on the Raspberry Pi. Power up the Raspberry Pi. At this point you need to either connect to the Raspberry Pi via an Ethernet cable or use a keyboard and a monitor to access the Raspberry Pi.

If you need help connecting to the Raspberry Pi look at this post remotely using a wired network connection.

After booting and logging-in you want to make sure that the Raspberry Pi found your new wireless adapter. To look at which peripherals the operating system found when booting run the following command:

dmesg | more

@rmehta
rmehta / erpnext_magento.php
Last active March 12, 2026 05:39
Sample ERPNext Magento Connector
<?php
// contributed by supplify.com
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once '../curl/Zebra_cURL.php';
require_once '../app/Mage.php';
Mage::app();
class action extends Zebra_cURL{
import pickle
from twisted.internet.defer import inlineCallbacks
from twisted.internet import reactor
from twisted.internet.protocol import ClientCreator
from twisted.python import log
from txamqp.protocol import AMQClient
from txamqp.client import TwistedDelegate
import txamqp.spec
""" Simple mod from the original gist submitted by @zoufou
https://gist.github.com/zoufou/5701d71bf6e404d17cb4
Mod by: @pguillem
Purpose:
- Integrates PySQLPool lib to handle MySQL
- Visit https://pythonhosted.org/PySQLPool/tutorial.html
Requirements:
@sjmach
sjmach / WhatsApp.java
Created March 29, 2015 10:02
Sample fiile to test whatsapp installation on android device via Appium
package com.sundeepmachado;
import java.io.File;
import java.net.URL;
import junit.framework.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
@dokterbob
dokterbob / open_csv.py
Created November 10, 2014 18:43
Python dialect-sniffing CSV reader example.
import csv
sniff_range = 4096
delimiters = ';\t,'
infile_name = 'blabla.csv'
sniffer = csv.Sniffer()
print 'Reading file: %s' % infile_name