1 Wind: Speed - Average - Current (Knots)
2 Wind: Speed - Current (Knots)
3 Wind: Dir - Current (Compass heading)
4 Temp: Outside - Current (Celsius)
5 Humidity: Outside - Current (Percent)
6 Baro: Current (hPa)
7 Rain: Today - Current total (Millimeters)
8 Rain: Total for Month (Millimeters)
9 Rain: Total for Season (Millimeters)
10 Rain: Rain Rate - Current (Millimeters)
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 | |
/** | |
* Genetic algorithm test. | |
* This is basically a rough implementation of the Weasel program | |
* https://en.wikipedia.org/wiki/Weasel_program | |
*/ | |
$ascii = "abcdefghijklmnopqrstuvwxyz "; // Ascii characters |
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
SUBJECT=`formail -xSubject:` | |
FROM=`formail -xFrom:` | |
:0 c | |
*^To:.*root.* | |
|formail -I "" | gpg --trust-model always -ear "[email protected]" | mail -r "$FROM" -s "$SUBJECT" [email protected] |
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
// Try simple regex, strip quoted (>) replies from an email | |
return preg_replace('/(^\w.+:\n)?(^>.*(\n|$))+/mi', '', $message); | |
// Try simple regex, strip replies from email using > | |
return preg_replace('/(^\w.+:\n)?(^>.*(\n|$))+/mi', '', $message); |
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 piface.pfio | |
import time | |
import sys | |
import syslog | |
import json | |
import urllib | |
import httplib | |
class SecurityIndicator: | |
""" A switch and LED link: Displays light when switch is closed """ |
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 piface.pfio | |
import time | |
import sys | |
import syslog | |
class SecurityIndicator: | |
""" A switch and LED link: Displays light when switch is closed """ | |
def __init__(self, pin_pair, label): | |
self.pin_pair = pin_pair |
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 piface.pfio | |
import time | |
import sys | |
class crossinglight: | |
""" A (UK) Crossing traffic light """ | |
def __init__(self, red_pin, amber_pin, green_pin, red_man_pin, green_man_pin, beeper, button): | |
self.red_pin = red_pin | |
self.amber_pin = amber_pin |
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 piface.pfio | |
import time | |
import sys | |
class trafficlight: | |
""" A (UK) Traffic light """ | |
def __init__(self, red_pin, amber_pin, green_pin, start_on_red = False): | |
self.red_pin = red_pin | |
self.amber_pin = amber_pin |
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 piface.pfio | |
import time | |
import sys | |
def main(argv): | |
piface.pfio.init() | |
cnt = 0 | |
loop = 0 |
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
#Turn on XDebug profiling in .htaccess | |
php_value xdebug.profiler_enable On | |
php_value xdebug.profiler_output_dir "/tmp" | |
php_value xdebug.profiler_output_name "%H.%R.%u.cachegrind.out" |