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
import serial, time, os | |
def main(): | |
pid = os.getpid() | |
pidFile = open("/home/davidr/solar/solarSerial.pid", "w") | |
pidFile.truncate() | |
pidFile.write(str(pid)) | |
pidFile.close() | |
print "getting started here" | |
s = serial.Serial('/dev/ttyACM0', 9600) |
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
#include "Tlc5940.h" // external library for TLC lighting controller | |
// http://code.google.com/p/tlc5940arduino/ | |
#include <SoftwareSerial.h> // standard/built-in external library for creating virtual serial ports. Used to output to the LCD displays | |
#define txPin1 2 // name pin 2 on the Arduino "txPin1" for later use | |
#define txPin2 4 // pin 4 connects to the second LCD display | |
#define photocellPin 5 // et cetera | |
#define buttonOne 6 // et cetera | |
#define buttonTwo 8 |
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 | |
$tomorrow = mktime(0, 0, 0, date("m"), date("d")+1, date("Y")); | |
$tomorrow_egrep = date('n/j/Y', $tomorrow); # like "10/19/2012" without quotes | |
$shellCommands= <<<END | |
rm ~/temp/PoolDeletingDomainsList.zip ~/temp/PoolDeletingDomainsList.txt ~/temp/email_tmp.txt ~/temp/tomorrow.txt; | |
wget http://www.pool.com/Downloads/PoolDeletingDomainsList.zip -O ~/temp/PoolDeletingDomainsList.zip -q; | |
unzip -o ~/temp/PoolDeletingDomainsList.zip -d ~/temp/; | |
egrep -e "{$tomorrow_egrep}" ~/temp/PoolDeletingDomainsList.txt > ~/temp/tomorrow.txt; |
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 | |
class caching { | |
public $useCache = true; | |
public $hours_cache_remains_valid = 8; | |
private $curDirectory; | |
private $cacheFolder; // DOCUMENT_ROOT + this + $cacheFileName == cached_filename | |
private $serverFilename; | |
public $cacheFileName; // this is just the filename -- used to test if over 255 characters | |
public $cached_filename; // this includes the full path | |
public $saveCache; // boolean |