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 | |
rrdtool create multirPItemp.rrd --step 300 \ | |
DS:in_temp:GAUGE:600:-30:50 \ | |
DS:out_temp:GAUGE:600:-30:50 \ | |
RRA:AVERAGE:0.5:1:12 \ | |
RRA:AVERAGE:0.5:1:288 \ | |
RRA:AVERAGE:0.5:12:168 \ | |
RRA:AVERAGE:0.5:12:720 \ | |
RRA:AVERAGE:0.5:288:365</pre> | |
The graphs are generated every five minutes from a cron job with with this script |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Device::BCM2835; | |
# must be run as root, in order to access the BCM 2835 GPIO address space! | |
# call set_debug(1) to do a non-destructive test on non-Raspberry Pi hardware | |
#Device::BCM2835::set_debug(1); | |
Device::BCM2835::init() || die "Could not init library"; |
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
// blinky.c | |
// | |
// gcc -o blinky blinky.c -l bcm2835 | |
// must be run as root | |
// sudo ./blinky | |
#include <bcm2835.h> | |
// Blinks on RPi Plug P1 pin 13 (which is GPIO pin 21) | |
#define PIN RPI_GPIO_P1_13 |
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
#!/usr/bin/env perl | |
# need to run as root. | |
# flashes an led connected to GPIO 11 aka PIN 17 | |
use strict; | |
use warnings; | |
use Device::BCM2835; | |
Device::BCM2835::init() || die "Could not init library"; |
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
#!/usr/bin/perl | |
$|++; | |
use warnings; | |
use strict; | |
#no warnings qw( syntax deprecated); | |
use String::IRC; |
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
@echo off | |
IF EXIST load.sql echo. > load.sql | |
for /f %%a IN ('dir /b *_iewpg.txt') do ( | |
echo %%a | |
echo load data LOCAL infile '%%a' into table iewpg fields terminated by '\t' lines terminated by '\n'; >>load.sql | |
) | |
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
use Time::HiRes qw(time); | |
use LWP::UserAgent; | |
$ua = new LWP::UserAgent; #create a new instance | |
$ua->proxy(http => 'http://194.73.75.22:80'); # set the proxy server | |
$ua->agent("Search-Report/0.1 " . $ua->agent); | |
print "The user agent is: " . $ua->agent . "\n\n"; | |
# REQUEST RADIUS FOR SEARCH, DEFAULT TO NATIONAL | |
print "Enter distance to search, in miles (or press ENTER for national).\n"; |
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
/* | |
* Wiegand API Raspberry Pi | |
* By Kyle Mallory All rights reserved. | |
* 12/01/2013 | |
* Based on previous code by Daniel Smith (www.pagemac.com) and Ben Kent (www.pidoorman.com) | |
* Depends on the wiringPi library by Gordon Henterson: https://projects.drogon.net/raspberry-pi/wiringpi/ | |
* | |
* This is linked with -lpthread -lwiringPi -lrt | |
* | |
* The Wiegand interface has two data lines, DATA0 and DATA1. These lines are normall held |
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
for %a in (u_ex??????.log) do ren %a TELWEBnnnP%a |
OlderNewer