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
from threading import Timer | |
def debounce(wait): | |
""" Decorator that will postpone a functions | |
execution until after wait seconds | |
have elapsed since the last time it was invoked. """ | |
def decorator(fn): | |
def debounced(*args, **kwargs): | |
def call_it(): |
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 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 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 | |
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 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
### 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 | |
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
// Copyright (C) 2011 - Texas Instruments, Jason Kridner | |
// | |
var fs = require('fs'); | |
var child_process = require('child_process'); | |
var http = require('http'); | |
var url = require('url'); | |
var path = require('path'); | |
var winston = require('winston'); | |
var b = require('../bonescript'); | |
var socketio = require('socket.io'); |
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
/* | |
* Sample file using the Linux kernel coding convention. | |
* | |
* https://www.kernel.org/doc/Documentation/CodingStyle | |
* | |
* General rules: | |
* - Indents are tabs and must be 8 spaces wide. | |
* - Each line must be at most 80 characters long. | |
* - Use C-style comments. | |
* - File names should be lower-case.c |
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
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
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
geocache.service: | |
< https://gist.github.com/Technicus/7b7ce39254bc36711add > | |
statuspin_1.sh: | |
< https://gist.github.com/Technicus/b17d754550592ced9094 > | |
statuspin_0.sh: | |
< https://gist.github.com/Technicus/97fa961f4a3db6131a1d > | |
geocache.service - status: |
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 | |
if [$1 == ""];then | |
echo Need a file name! | |
else | |
fswebcam --no-banner --rotate -90 -v -r 768x1024 --jpeg 95 -D 1 $1.jpg | |
feh -F $1.jpg | |
fi |
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
#/etc/systemd/system/geocache-shmile.service | |
[Unit] | |
Description=shmile for geocache | |
[Service] | |
Type=simple | |
WorkingDirectory=/home/debian/shmile | |
ExecStart=/home/debian/shmile/node_modules/coffee-script/bin/coffee /home/debian/shmile/app.coffee |
OlderNewer