This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Usage: backup_hook.py <id> | |
# | |
import requests | |
import sys | |
import base64 | |
import tempfile | |
hookurl = '' | |
TMPDIR = tempfile.gettempdir() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from hypchat import HypChat | |
hc = HypChat("KEY") | |
room = hc.get_room('ROOMNAME') | |
room.message('Hello World', "green") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* TrueCNAM module | |
* Service Details at http://truecnam.com/products | |
* Free Users get 2 lookups/minute 25/hour as of this note. Visit site for latest info | |
* Copyright (C) 2015 Sangoma Technologies | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU Affero General Public License as | |
* published by the Free Software Foundation, either version 3 of the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import xml.etree.ElementTree as ET | |
from distutils.version import LooseVersion | |
bumped = False | |
tree = ET.parse(sys.argv[1]) | |
root = tree.getroot() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { | |
include_once('/etc/asterisk/freepbx.conf'); | |
} | |
$outfile = '/tmp/report.csv'; | |
$dbh = \FreePBX::Database(); | |
$sql = "SELECT * FROM asteriskcdrdb.cdr WHERE date(calldate) >= date(now()-interval 30 day);"; | |
$stmt = $dbh->prepare($sql); | |
$stmt->execute(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import xml.etree.ElementTree as ET | |
tree = ET.parse(sys.argv[1]) | |
root = tree.getroot() | |
version = root.find('version').text | |
description = root.find('description').text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
if (file_exists($argv[1])) { | |
$modinfo = simplexml_load_file($argv[1]); | |
}else{ | |
exit; | |
} | |
$name = (string) $modinfo->name; | |
$description = (string) $modinfo->description; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BACKUP_IFS=$IFS | |
IFS=$(echo -en "\n\b") | |
GETOPTS="$(which getopt)" | |
if [[ "$OSTYPE" == "darwin"* ]] ; then READLINK=greadlink; GETOPTS="$(brew list gnu-getopt | grep bin/getopt)"; else READLINK=readlink;fi; | |
if [[ "$OSTYPE" == "cygwin" ]] ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright (c) 2015 "James Finstrom" | |
* | |
* This is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU Affero General Public License as | |
* published by the Free Software Foundation, either version 3 of the | |
* License, or (at your option) any later version. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "BY USING THIS SCRIPT, YOU AGREE TO ASSUME ALL RESPONSIBILITY" | |
echo "FOR USE OF THE PROGRAM INCLUDED IN THIS INSTALLATION. NO WARRANTIES" | |
echo "EXPRESS OR IMPLIED INCLUDING MERCHANTABILITY AND FITNESS FOR PARTICULAR" | |
echo "USE ARE PROVIDED. YOU ASSUME ALL RISKS KNOWN AND UNKNOWN AND AGREE TO" | |
echo "HOLD GOATS, CHICKENS, PHIL FROM THE 3RD FLOOR, AND THE ENTIRE" | |
echo "WORLD HARMLESS FROM ANY AND ALL LOSS OR DAMAGE" | |
echo "WHICH RESULTS FROM YOUR USE OF THIS SOFTWARE. IF ANY OF THESE TERMS" | |
echo "AND CONDITIONS ARE RULED TO BE UNENFORCEABLE, YOU AGREE TO ACCEPT ONE" | |
echo "DOLLAR IN U.S. CURRENCY AS COMPENSATORY AND PUNITIVE LIQUIDATED DAMAGES" |