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 / ip_in_range.php
Created November 10, 2016 07:10 — forked from tott/ip_in_range.php
php check if IP is in given network range
/**
* Check if a given ip is in a network
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed
* @return boolean true if the ip is in this range / false if not.
*/
function ip_in_range( $ip, $range ) {
if ( strpos( $range, '/' ) == false ) {
$range .= '/32';
}
@rpfilomeno
rpfilomeno / curl-format.txt
Last active October 11, 2016 02:41
Timing Details With cURL
\n
============= HOST: ==========\n
\n
local_ip: %{local_ip}\n
local_port: %{local_port}\n
remote_ip: %{remote_ip}\n
remote_port: %{remote_port}\n
\n
======= CONNECTION: ==========\n
\n
@rpfilomeno
rpfilomeno / Polycom Provisioning
Last active September 29, 2016 00:33
Polycom Provisioning
Firmwares:
http://downloads.polycom.com/voice/voip/sip_sw_releases_matrix.html
http://downloads.polycom.com/voice/voip/uc_sw_releases_matrix.html
Configuration:
http://etel.wiki.oreilly.com/wiki/index.php/Dynamic_Phone_Provisioning_with_res_phoneprov_and_TFTP
https://freeswitch.org/confluence/display/FREESWITCH/Polycom+Configuration
Reset Codes:
1. Find and write down the MAC id of the phone you want to reset. You can typically find it on the back of the phone. If the label on the back of the phone with the MAC id is removed, you can find it by pressing Menu, Status, Network, Ethernet.
@rpfilomeno
rpfilomeno / Resize Centos LVM partion on VMWare guest.txt
Last active November 10, 2015 09:18
Resize Centos LVM partion on VMWare guest
1. Add the Gparted CD ISO
2. Change VM Properties -> Options Tab -> Boot Options: Check Force BIOS Setup
3. Boot VM and edit BIOS boot order to CDROM First then Exit setup with Save to reboot
4. Allow VM to Boot GParted
5. ON Gparted, select LVM Partition with Lock Icon then select Partition menu -> Disable
6. Expand the said partition and Apply. Exit Gparted.
7. Run terminal on GParted
8. run "lvm lvdisplay" and take note of the /dev/ path of the partition needing expansion
9. run "lvextend –l +100%FREE /dev/[path]"
10. shutdown Gparted
Extract voice fingerprint from previous customer call recording and store it for future
comparisons when the customer calls again.
Application:
* Fraud detection - detect the person voice print is different from the identity provided
and raise flag for review or detect known fraudulent individuals in calls and alert the agent
to inquire for additional indentification challenges.
* Identification - provide agents with additional feedback for user's authenticity of
his/her claimed identity
@rpfilomeno
rpfilomeno / April-Tracker-List
Created April 30, 2015 16:09
P2P Tracker List
udp://open.demonii.com:1337
udp://tracker.coppersurfer.tk:6969
udp://tracker.leechers-paradise.org:6969
udp://exodus.desync.com:6969
http://tracker.yify-torrents.com/announce
# ~/.tmux.conf
# use UTF8
set -g utf8
set-window-option -g utf8 on
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
set -g history-limit 30000
@rpfilomeno
rpfilomeno / Monitor Asterisk server
Created February 27, 2015 13:45
Server Monitoring
#watch -n 10 'asterisk -rx "sip show channels" | tail -n 1'
# netstat -pln | grep rtpp
@rpfilomeno
rpfilomeno / Find Large Files
Last active August 29, 2015 14:14
Linux Shell Tricks
Find files more than 50MB
# cd /
# find . -type f -size +50M -exec ls -lh {} \; | awk '{ print $5 ": " $9 }' | sort -k1
@rpfilomeno
rpfilomeno / Install Java on Centos
Last active August 29, 2015 14:11
Java Tricks
# cd /opt/
Check if you are using 32-bit or 64-bit
x86_64 ==> 64-bit kernel
i686 ==> 32-bit kernel
#uname -m
32-bit:
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-i586.tar.gz"