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
#!/bin/sh | |
# Updated for foo feature | |
# | |
# GPIO numbers should be from this list | |
# 0, 1, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 21, 22, 23, 24, 25 | |
# Note that the GPIO numbers that you program here refer to the pins | |
# of the BCM2835 and *not* the numbers on the pin header. | |
# So, if you want to activate GPIO7 on the header you should be | |
# using GPIO4 in this script. Likewise if you want to activate GPIO0 |
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
#!/usr/bin/env python | |
import time | |
import os | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BCM) | |
DEBUG = 1 | |
# read SPI data from MCP3008 chip, 8 possible adc's (0 thru 7) | |
def readadc(adcnum, clockpin, mosipin, misopin, cspin): |
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
test |
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
public void execute(Element element, RenderContext renderContext) { | |
if (element.getTextContent() == null || element.getTextContent().length() == 0) { | |
return; | |
} | |
String id = (String) getParameters().get(GIST_ID); | |
if (id != null && !id.trim().equals("")) { | |
Element wrapper = JAXPUtils.createElement(element.getOwnerDocument(), "span"); | |
Element script = JAXPUtils.createElement(element, "script"); |
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
#!/usr/bin/env python | |
# element14 Blog post: | |
# http://www.element14.com/community/groups/raspberry-pi/blog/2012/09/26/time-temp-display-for-raspberry-pi | |
# Based on Simon Monk's library: | |
# http://www.doctormonk.com/2012/08/led-clock-using-raspberry-pi.html | |
# | |
import i2c7segment as display | |
import time | |
import sensors | |
from time import sleep |
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
LOCATE_HOME="$HOME/locate" | |
UPLOADR_HOME="${LOCATE_HOME}/uploadr" | |
CUTY_HOME="${LOCATE_HOME}/CutyCapt" | |
IMAGE_DIR="${HOME}/images" | |
VDISPLAY=87 | |
URL='http://www.google.com/latitude/apps/badge/api?user=9019870671957975903&type=iframe&maptype=roadmap' | |
export FLICKR_UPLOADR_PY_API_KEY=515af04789bacc913dfd1eefaf1923ee | |
export FLICKR_UPLOADR_PY_SECRET=cceb46e3419eeb96 | |
rm -rf ${IMAGE_DIR}/*.png | |
pkill -9 Xvfb |
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
#!/bin/bash | |
for i in `wget -qO- 'http://www.flickr.com/services/rest/?method=flickr.photos.search&api_key=3ddb378de0dae3d12f1f9ec4e135827e&user_id=75040169@N05&page=1&per_page=500' |grep '<photo id=' |sed 's#.*<photo id="##' | sed 's#".*##'| tr '\t' ' ' | sed 's/ //g' | perl -ne 'print if ($i>1); $i++;'`; do echo deleting $i; sleep 1; flickcurl photos.delete $i; done |
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
test |
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
#!/bin/bash | |
LOG=/var/log/timetemp.log | |
echo tmp102 0x48 > /sys/class/i2c-adapter/i2c-0/new_device | |
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device | |
hwclock &> $LOG | |
date &>> $LOG | |
hwclock -s &>> $LOG | |
date &>> $LOG | |
/home/pi/timetemp/timetemp.py |
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
### BEGIN INIT INFO | |
# Provides: time and temp on 7-segment | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: 7-segment display | |
# Description: time and temp | |
### END INIT INFO | |
OlderNewer