Skip to content

Instantly share code, notes, and snippets.

View andrewthetechie's full-sized avatar
😀
Writing software

Andrew andrewthetechie

😀
Writing software
View GitHub Profile
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
"time"
from pyHS100 import Discover
from scapy.all import *
living_room_lights = []
dining_room_lights = []
kitchen_lights = []
living_room_on = False
dining_room_on = False
kitchen_on = False
@andrewthetechie
andrewthetechie / gist:b1c967c975021bdd10611824a11d8c9d
Created August 14, 2018 01:14
/r/computertechs automod config
# This is the AM config page for r/ComputerTechs. Please do not make any changes without mod approval. - /u/Deeperkyo
---
# Report a submission that has help in the title.
type: submission
title: ["help", "why", "isn't", "wrong", "assistance", "problem", "issue", "fixable"]
action: report
moderators_exempt: true
action_reason: Item was reported for having a common r/Techsupport word in the title.
modmail: |
The above item was reported for having a common r/Techsupport word in the title. Please look at this submission.

Keybase proof

I hereby claim:

  • I am andrewthetechie on github.
  • I am andrewthetechie (https://keybase.io/andrewthetechie) on keybase.
  • I have a public key whose fingerprint is 217E 05CC C523 F22D 65A8 9032 AF9A 3FC8 C5A3 4E33

To claim this, I am signing this object:

from threading import RLock
from wrapt import synchronized # https://stackoverflow.com/a/29403915
# These locks are for our synchronized decorator
_WATCHDOG_LOCK = RLock()
@synchronized(_WATCHDOG_LOCK)
def watchdog(self):
self.log.debug("watchdog called")
@andrewthetechie
andrewthetechie / errbot-help.py
Created January 29, 2018 17:43
A modification of errbot to allow custom help text
import re
import shlex
import inspect
from functools import wraps
from typing import Callable, Any
from errbot import BotPlugin
from errbot import botcmd
from errbot import _tag_botcmd
from errbot import ArgumentParser