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
<html> | |
<head> | |
<style type="text/css"> | |
body { background-color: #000; margin: 0;} | |
.adblock { display: block; | |
float: left; | |
width: 46%; | |
text-align: center; | |
height: 190px; | |
margin: 5px; |
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 | |
// nag.php by Will Bradley, www.zyphon.com/arduino-nagios | |
// Script to parse Nagios status.dat and present it in simplified HTML. | |
// Also grabs graph images from /pnp4nagios if you edit pnp4nagios' apache.conf to not require authentication. | |
// | |
// Based on statusXML.php by Jason Antman | |
// | |
// +----------------------------------------------------------------------+ | |
// | PHP EMS Tools http://www.php-ems-tools.com | | |
// +----------------------------------------------------------------------+ |
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
On Error Resume Next | |
'''Variables | |
Dim wsNetwork | |
Dim outUser | |
Dim outComputer | |
Dim outIP | |
Dim logPath | |
Dim septxt |
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 | |
$output = array(); | |
// This command finds the last 100 mentions of "Peer" in the log. Modify using your own keywords! | |
exec("grep Peer /var/log/asterisk/full | tail --lines=100", $output); | |
$output = array_reverse($output); | |
$today = date("M d"); | |
$yesterday = date("M d",time()-86400); |
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 | |
# newpingmonitor.sh | |
# Sets up monitoring for new basic ping monitors in nagios | |
# Ths script may be called remotely | |
E_BADARGS=65 | |
if [ ! -n "$1" ] | |
then | |
echo "Usage: `basename $0` <servername> <ip address>" |
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
<html> | |
<head> | |
<style type="text/css"> | |
body { | |
background-color: #000; | |
color: #fff; | |
font-family: Arial,Helvetica,sans-serif; | |
} | |
</style> | |
</head> |
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
# img2mpg - Will Bradley 2012-2015 | |
# Licensed under Creative Commons Attribution-ShareAlike (CC BY-SA 2.0) | |
# http://creativecommons.org/licenses/by-sa/2.0/ | |
# | |
# https://gist.github.com/zyphlar/2629626/ | |
# | |
# Requirements: imagemagick and ffmpeg (the convert and ffmpeg commands) | |
# | |
# This is not a very 'safe' script because it moves and deletes files. You should run it with junk data at first, maybe copying each section into a separate script for testing before trying to run the whole thing. |
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
function find_min_rent($xml, $floorplanid) { | |
$min_rent = 999999; // a ridiculously high number | |
foreach($xml->xpath("/PhysicalProperty/Property/Unit[@FloorplanID='$floorplanid']") as $unit) { | |
if($unit->EffectiveRent['min'] < $min_rent) { // save this rent amount if it's the lowest so far | |
$min_rent = $unit->EffectiveRent['min']; | |
} | |
} | |
return $min_rent; | |
} |
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
require "openssl" | |
require "base64" | |
require "digest/md5" | |
require "net/http" | |
class String | |
def esc | |
CGI.escape(self).gsub("%7E", "~").gsub("+", "%20") | |
end | |
end |
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 | |
/* Cheap and Dirty Asterisk Logfile Analysis | |
* by Will Bradley, http://willbradley.name | |
* Released to the public domain, 6-26-2012 | |
* | |
* To install, modify the $dbname and other variables, | |
* create the MySQL database, user, and permissions, | |
* and double-check the asterisk logfile paths/formats below. | |
* This is a very cheap script, use at your own risk! | |
* |
OlderNewer