Skip to content

Instantly share code, notes, and snippets.

@jeffmincey
jeffmincey / powermate.py
Last active December 18, 2024 00:02 — forked from aaugustin/powermate.py
Hook a Griffin PowerMate to a Raspberry Pi running HifiBerry!
#!/usr/bin/env python3
"""
To enable this service, copy this file to /opt, then:
# chmod +x /opt/powermate.py
# pip3 install websockets
# cat > /etc/systemd/system/powermate.service
[Unit]
Description=PowerMate
@jeffmincey
jeffmincey / bbb_rootfs.md
Last active September 16, 2015 20:46 — forked from treeherder/bbb_rootfs.md
how to expand the rootfs of the beagle bone black from a flashed eMMC onto the SD card

We have used the most recent beagleboard debian eMMC flasher image to flash the beagle bone black eMMC. As of this writing: wget http://debian.beagleboard.org/images/BBB-eMMC-flasher-debian-7.5-2014-05-14-2gb.img.xz After flashing is complete, erase the sd card, then reboot. Once booted, We can use fdisk -l to list our available devices, I found mine by checking the size and the partition table. After verfifying the card's address, we can reformat it to fit our needs. Of course, this can be done before plugging the card in, as well.

debian@beaglebone:~$ fdisk -l
Disk /dev/mmcblk1: 15.9 GB, 15931539456 bytes 
        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk1p1            8192    31116287    15554048    b  W95 FAT32
@jeffmincey
jeffmincey / matplotlibrc
Last active December 23, 2015 22:09 — forked from minrk/matplotlibrc
### MATPLOTLIBRC FORMAT
# http://matplotlib.org/users/customizing.html
#
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
@jeffmincey
jeffmincey / notebook_launcher.py
Created November 17, 2012 17:35 — forked from timo/notebook_launcher.py
branded ipython notebook launcher
"""==============================
Branded IPython Notebook Launcher
=================================
Executing this module will create an overlay over ipython notebooks own static
files and templates and overrides static files and templates and copies over all
example notebooks into a temporary folder and launches the ipython notebook server.
You can use this to offer an interactive tutorial for your library/framework/...