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
[from-internal] | |
;The letter X or x represents a single digit from 0 to 9. | |
;The letter Z or z represents any digit from 1 to 9. | |
;The letter N or n represents a single digit from 2 to 9. | |
; These are our typical "call a phone number" rules | |
exten => _NXXNXXXXXX,1,Verbose(2, Dialing out ${EXTEN}) | |
exten => _NXXNXXXXXX,n, Dial(SIP/${EXTEN}@voipms) | |
exten => _NXXNXXXXXX,n,Hangup() | |
exten => 1NXXNXXXXXX,1,Verbose(2, Dialing out ${EXTEN}) | |
exten => 1NXXNXXXXXX,n, Dial(SIP/${EXTEN}@voipms) |
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
use strict; | |
use warnings; | |
use POE qw(Component::IRC); | |
# Load words. | |
open my $in, "<:encoding(utf8)", "words.txt" or die "words.txt: $!"; | |
my @lines = <$in>; | |
close $in; | |
chomp @lines; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> | |
<body> | |
<?php | |
$user = "user"; | |
$password = "pass"; | |
if (array_key_exists("port", $_GET) and is_numeric($_GET["port"] )) { |
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/expect | |
# expect power.expect 192.168.5.3 username password 4 on | |
# expect power.expect 192.168.5.3 username password 4 off | |
set timeout 20 | |
set name [lindex $argv 0] | |
set user [lindex $argv 1] | |
set password [lindex $argv 2] | |
set outlet [lindex $argv 3] | |
set state [lindex $argv 4] | |
spawn telnet $name |
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/perl | |
# How it works: We're looking at 2 important pieces of information in this script. A thread id, and an event in the logs. | |
# For every log line, we update the correspending thread hash with a new start time. | |
# When we see an "ARRAY" line, we calculate the thread sleep time based on the last "start" and the current log time. | |
# This tells us how long asterisk was waiting on that query. The script can be modified to look for things other than "ARRAY". | |
use strict; | |
use warnings; | |
use Time::Piece; | |
use feature 'say'; | |
use POSIX qw(strftime); |
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
# | |
# Based on url logging script by Riku Voipio, lite. | |
# http://nchip.ukkosenjyly.mine.nu/irssiscripts/ | |
use DBI; | |
use Irssi; | |
use Irssi::Irc; | |
use vars qw($VERSION %IRSSI); |
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
use Data::Dumper; | |
use Term::ANSIColor; | |
use Net::Ping; | |
use Term::ANSIScreen qw(cls); | |
use Term::Screen; | |
my $clear_screen = cls(); | |
$path_to_file = $ARGV[0]; | |
open my $handle, '<', $path_to_file; | |
chomp(my @host_array = <$handle>); | |
close $handle; |
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
/* | |
* Asterisk -- An open source telephony toolkit. | |
* | |
* Copyright (C) 1999 - 2006, Digium, Inc. | |
* | |
* Mark Spencer <markster@digium.com> | |
* | |
* See http://www.asterisk.org for more information about | |
* the Asterisk project. Please do not directly contact | |
* any of the maintainers of this project for assistance; |
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
# | |
# Print hilighted messages & private messages to window named "hilight" for | |
# irssi 0.7.99 by Timo Sirainen | |
# | |
# Modded a tiny bit by znx to stop private messages entering the hilighted | |
# window (can be toggled) and to put up a timestamp. | |
# | |
use Irssi; | |
use POSIX; |
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 | |
filemtime=`stat -c %Y /var/tmp/crashme.lock` | |
currmtime=`date +%s` | |
diffmtime=$(($currmtime - $filemtime)) | |
if [ $diffmtime -lt 600 ] | |
then | |
touch /var/tmp/crashme.lock | |
DATE=`date +%Y%m%d-%H%M` | |
LOG=/var/tmp/CRASHLOG-${DATE}.log |
NewerOlder