Skip to content

Instantly share code, notes, and snippets.

View torkildr's full-sized avatar

Torkild Retvedt torkildr

View GitHub Profile
@natcl
natcl / light_button_control.py
Last active November 16, 2021 14:59
Script to toggle my Philips Hue lights on and off using a Raspberry Pi and a button
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
This script toggles lights on and off using the phue library and a physical switch
It is started on boot in /etc/rc.local with this line:
python /home/pi/light_button_control/light_button_control.py &
'''
from time import sleep
@VictorLowther
VictorLowther / att-6rd.wanup
Created June 21, 2012 23:35
AT&T 6rd script for DD-WRT
#!/bin/sh
# This adds the appropriate 6rd tunnel for AT&T DSL users with a DD-WRT based router.
# Place it in /jffs/etc/config/att-6rd.wanup, and then ln -s /jffs/etc/config/att-6rd.ipup to it.
# The AT&T customer 6rd gateway.
# This is an anycast address that picks the closest one to you on the AT&T network.
REMOTE=12.83.49.81
# Your local IP address.
LOCAL="$(ip -o -4 addr show dev ppp0 |awk '{print $4}')"