This file contains hidden or 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 iquery($qry) | |
{ | |
if(!isset($this->database_link)) $this->connect(); | |
$temp = mysql_query($qry, $this->database_link) or die("Error: ". mysql_error()); | |
} |
This file contains hidden or 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 disconnect() | |
{ | |
if(isset($this->database_link)) mysql_close($this->database_link); | |
else mysql_close(); | |
} |
This file contains hidden or 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 connect() | |
{ | |
$this->database_link = mysql_connect($this->database_host, $this->database_user, $this->database_pass) or die("\ | |
Could not make connection to MySQL"); | |
mysql_select_db($this->database_name) or die ("Could not open database: ". $this->database_name); | |
} |
This file contains hidden or 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 changeUser($user) | |
{ | |
$this->database_user = $user; | |
} | |
function changePass($pass) | |
{ | |
$this->database_pass = $pass; | |
} |
This file contains hidden or 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 Database() | |
{ | |
$this->database_user = "motoma"; | |
$this->database_pass = "bI1dU5"; | |
$this->database_host = "localhost"; | |
$this->database_name = "dalDatabase"; | |
} |
This file contains hidden or 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
class Database | |
{ | |
var $database_name; | |
var $database_user; | |
var $database_pass; | |
var $database_host; | |
var $database_link; |
This file contains hidden or 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 | |
# video2ipod conversion script | |
# Christopher Gilbert | |
# September 26, 2006 | |
# | |
# Usage: | |
# video2ipod infile outfile | |
if [ -z "$2" ]; then | |
echo $0 "infile outfile" |
This file contains hidden or 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
*/5 * * * * /home/motoma/service-monitor.py http http://motomastyle.com/ [email protected] |
This file contains hidden or 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
$ crontab -e |
This file contains hidden or 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
$ ./service-monitor.py tcp devio.us:22 [email protected] | |
$ |