View recordRequestsLazy.sh
#!/bin/bash | |
apt-get update && apt-get upgrade -y | |
apt-get install -y apache2 php5 | |
echo '' > /etc/apache2/sites-available/000-default.conf | |
echo '<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/html | |
<Directory "/var/www/html"> | |
AllowOverride All | |
</Directory> |
View echoSerial.c
/* | |
Software serial multple serial test | |
Receives from the hardware serial, sends to software serial. | |
Receives from software serial, sends to hardware serial. | |
The circuit: | |
* RX is digital pin 10 (connect to TX of other device) | |
* TX is digital pin 11 (connect to RX of other device) | |
View stepper.sh
#!/bin/bash | |
gpio mode 0 out && gpio mode 1 out && gpio mode 2 out && gpio mode 3 out | |
gpio write 0 0 && gpio write 1 0 && gpio write 2 0 && gpio write 3 0 | |
while true | |
do gpio write 0 1 && gpio write 3 1 | |
gpio write 3 0 && gpio write 1 1 | |
gpio write 0 0 && gpio write 2 1 | |
gpio write 1 0 && gpio write 3 1 | |
gpio write 2 0 | |
done |
View line-counting-apache2-stoplight.sh
#!/bin/bash | |
##I had greater hopes and dreams at the start | |
export red="gpio write 0 0" | |
export yellow="gpio write 1 0" | |
export green="gpio write 2 0" | |
#CLAR MEANS CLEAR!! CLAR MEANS CLEAR!! DIVE! DIVE! | |
export clar_red="gpio write 0 1" | |
export clar_yellow="gpio write 1 1" | |
export clar_green="gpio write 2 1" | |
# |
View index.php
<?php | |
///////////////////////// | |
// | |
//For multilevel put 0-99 in as a status and click the light bulb | |
// more at http://thomasloughlin.com/new-open-zwaveraspbian-image-ready-for-download/ | |
//////////////////////////// | |
session_start(); | |
define("ZWAVE_HOST", "localhost"); | |
define("ZWAVE_PORT", 6004); |
View RainWaterOutputLogger.pde
#include <SD.h> | |
/* | |
This script is a simple combination of two existing example files. | |
The goal is to measure water flow coming from a rain collection barrel | |
The project progress can be found at http://thomasloughlin.com/rain-water-collection/. | |
*/ | |
/********************************************************** | |
This is example code for using the Adafruit liquid flow meters. |
View tradeking_streaming_quotes.php
<?php | |
/* | |
Very quick and dirty expansion on the TradeKing PHP example to allow you to handle and process streaming quotes | |
see more at http://thomasloughlin.com | |
enjoy at your own risk | |
*/ | |
date_default_timezone_set('America/Chicago'); | |
// Your keys/secrets for access | |
$consumer_key = 'uqM2342345234523452345234520NT'; |
View manage_remote
#!/bin/bash | |
WGET="/usr/bin/wget" | |
$WGET -q --tries=10 --timeout=5 http://youralwaysonserver/openpi.php -O /tmp/openpi &> /dev/null | |
if grep -Fxq "yes" /tmp/openpi | |
then | |
ssh -gNnT -R *:55555:raspberrypi.local:80 piremoteuser@youralwaysonserver & | |
PID=$! | |
echo "Opened" | |
sleep 360s; |