Skip to content

Instantly share code, notes, and snippets.

View lgaetz's full-sized avatar

Lorne Gaetz lgaetz

  • Nova Scotia, Canada
View GitHub Profile
#!/bin/bash
# THIS SCRIPT SETS UP SOME BASIC IP TABLES RULES FOR YOUR SYSTEM.
# YOU SHOULD BUY A BOOK AND GOOGLE TO UNDERSTAND WHAT IS GOING ON HERE.
# YOUR SYSTEM'S SECURITY SHOULD NOT BE LEFT UP TO A SCRIPT APPLICATION
# OR ME. IT IS YOUR RESPONSIBILITY TO ENSURE YOUR OWN SECURITY.
# THIS IS PRESENTED WITHOUT ANY WARRANTY. ANY USE OF THIS IS AT YOUR OWN RISK
#
# Written by James Finstrom (james.finstrom@schmoozecom.com)
#
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active May 23, 2022 12:28
A unit testing framework in a tweet.
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
@lgaetz
lgaetz / lgaetz-didloopback.php
Last active July 28, 2022 16:25
Asterisk AGI file for a FreePBX system that examines outbound dialed digits against inbound DIDs specified in inbound routes. With Asterisk dial plan, it can be used to redirect outbound calls back in for local DIDs.
#!/usr/bin/php -q
<?php
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
*
* Latest Version: https://gist.github.com/lgaetz/8633920
*
* Description:
*
* Script lgaetz-didloopback.php is used on a FreePBX server, with custom dialplan that calls
@hwdsl2
hwdsl2 / README.md
Last active March 17, 2023 00:57
My IPTables rules for securing the Asterisk VoIP server
@javier-lopez
javier-lopez / elastix-cli
Created September 2, 2013 22:29
elastix-cli, cli interface for elastix voip solution
#!/bin/bash
set -e #exit as soon as any command fail
default_ssh_passwd="c2VjcmV0Cg=="
default_mysql_passwd="c2VjcmV0Cg=="
exec 9>/tmp/$(basename $0).lock #verify only one instance is running
if ! flock -n 9 ; then #http://mywiki.wooledge.org/BashFAQ/045
echo "$(basename $0): another instance is running";
exit 1
@redoPop
redoPop / .gitignore
Created June 18, 2010 22:08
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your