Skip to content

Instantly share code, notes, and snippets.

@trashpandas
trashpandas / animatronic_mouth.py
Created March 30, 2018 16:57 — forked from aarmea/animatronic_mouth.py
Open and close an animatronic mouth on a Raspberry Pi GPIO pin
#!/usr/bin/env python
"""
animatronic_mouth.py
This script animates a motorized mouth on a Raspberry Pi GPIO pin so that it
appears to be speaking alongside the audio on the specified PulseAudio source
(which usually should be a sink's monitor).
Find PA_SOURCE with `pactl list` and look for a monitor device that corresponds
#!/bin/bash
# Run this script just before you put the laptop in the bin for security scanning.
# You can add the seconds the laptop will be waiting before speaking. The default
# is waiting for 180 seconds (3 minutes).
# Switch to the login screen, effectively locking the screen.
function lockscreen() {
/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend
}

Keybase proof

I hereby claim:

  • I am trashpandas on github.
  • I am richardh (https://keybase.io/richardh) on keybase.
  • I have a public key whose fingerprint is D908 D82B AF46 71F0 2A65 8CEB 2694 5D3B D44C 10B9

To claim this, I am signing this object: