Skip to content

Instantly share code, notes, and snippets.

$ ./service-monitor.py tcp devio.us:22
$
$ ./service-monitor.py http <a href="http://devio.us/">http://devio.us/</a>
$
$ ./service-monitor.py tcp devio.us:23349
Unable to connect to the service TCP devio.us:23349
$ ./service-monitor.py http http://www.thispagedoesntexistevar.com/
Unable to connect to the service HTTP http://www.thispagedoesntexistevar.com/
$
#! /usr/bin/env python
from os import system
from urllib2 import urlopen
from socket import socket
from sys import argv
from time import asctime
def tcp_test(server_info):
cpos = server_info.find(':')
$ ./service-monitor.py tcp devio.us:22 [email protected]
$
$ crontab -e
*/5 * * * * /home/motoma/service-monitor.py http http://motomastyle.com/ [email protected]
#!/bin/bash
# video2ipod conversion script
# Christopher Gilbert
# September 26, 2006
#
# Usage:
# video2ipod infile outfile
if [ -z "$2" ]; then
echo $0 "infile outfile"
class Database
{
var $database_name;
var $database_user;
var $database_pass;
var $database_host;
var $database_link;
function Database()
{
$this->database_user = "motoma";
$this->database_pass = "bI1dU5";
$this->database_host = "localhost";
$this->database_name = "dalDatabase";
}