Skip to content

Instantly share code, notes, and snippets.

View rpfilomeno's full-sized avatar
💭
For Hire

Roger Filomeno rpfilomeno

💭
For Hire
View GitHub Profile
@rpfilomeno
rpfilomeno / A guide to SIPp testing Kamailio
Last active October 11, 2023 05:02
Testing Kamailio with 2 Asterisk load balanced with SIPp
SIPp Box
1. Download and Modify SIPp to auto respond always and include OPTIONS packet as well (-aa broken?), edit src/call.cpp:
call::T_AutoMode call::checkAutomaticResponseMode(char * P_recv)
{
if (strcmp(P_recv, "BYE")==0) {
return E_AM_UNEXP_BYE;
} else if (strcmp(P_recv, "CANCEL") == 0) {
return E_AM_UNEXP_CANCEL;
} else if (strcmp(P_recv, "PING") == 0) {
@rpfilomeno
rpfilomeno / php-docker-ext
Created August 8, 2022 10:48 — forked from hoandang/php-docker-ext
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@rpfilomeno
rpfilomeno / twitch_stream.sh
Created July 31, 2022 17:13 — forked from JPLeBreton/twitch_stream.sh
shell script for streaming to twitch.tv
#! /bin/bash
# from
# https://gist.github.com/3178130
# gist created by brodul
# modified for http://twitch.tv/jplebreton
# originaly from http://tinyurl.com/twitch-linux from taladan
# www.youtube.com/user/taladan
@rpfilomeno
rpfilomeno / WSL2-Ruby-Installation.md
Last active December 16, 2021 18:28
WSL2 Ruby Installation

Installation of required libraries

sudo apt-get update sudo apt-get upgrade -y ``

@rpfilomeno
rpfilomeno / Polycom LDAP
Created February 11, 2015 11:05
Polycom Phones
# directory.cfg
<dir
dir.corp.address="ldap://domaincontroller"
dir.corp.attribute.1.filter=""
dir.corp.attribute.1.label="Last Name"
dir.corp.attribute.1.name="sn"
dir.corp.attribute.1.sticky="0"
dir.corp.attribute.1.type="last_name"
dir.corp.attribute.2.filter=""
@rpfilomeno
rpfilomeno / Quintum Basic Command Line
Last active May 28, 2021 22:19
Quintum Gateway Tricks
Run the command “show –l” (This displays the system configuration).
Run the command “show –v” (This displays the product version).
Run the command “ev dump” (this will display the logs).
Run the command “lastcall” (Obtains the last call information).
Run the command “cmd calllog” (obtains a list of all calls in/out of the gateway).
A good way to defend against brute force attacks is to allow a certain number of login attempts, say three, and after that start delaying or blocking further attempts. Let's see how we can use ModSecurity to accomplish this.
If your login verification page is situated at yoursite.com/login, then the following rules will keep track of the number of login attempts by users:
#
# Block further login attempts after 3 failed attempts
#
<LocationMatch ^/login>
# Initalize IP collection with user's IP address
SecAction "initcol:ip=%{REMOTE_ADDR},pass,nolog"
@rpfilomeno
rpfilomeno / ModSecurity Installation + OWASP CRS for Centos 6.5
Last active February 28, 2020 16:40
ModSecurity Installation + OWASP CRS for Centos 6.5
Install yajl2
$cd ~
$git clone https://github.com/lloyd/yajl.git
$cd yajl/
$sudo ./configure
$sudo make
$sudo make install
$sudo ln -s /usr/local/lib/libyajl_s.a /usr/lib64/libyajl_s.a
@rpfilomeno
rpfilomeno / Cool Tools
Last active June 21, 2018 16:29
Cool Tools
The following are list of tools i use.
Encryption:
ShadowCrypt
Programming IDEs:
PHPStorm
IntelliJ
RStudio/Revolution R Open
RegEx Buddy
@rpfilomeno
rpfilomeno / Find Optimal Load Average
Created March 12, 2015 15:31
Linux Performance Testing
# less /proc/cpuinfo | grep "physical id" | sort|uniq | wc -l
2
# less /proc/cpuinfo | grep "core id" | sort|uniq | wc -l
1
Optimal load average (100% utilization) = 2.0
(The "Red line" load average = 5.0 per processor)