Skip to content

Instantly share code, notes, and snippets.

@libbymiller
libbymiller / screenshot.py
Last active April 19, 2018 12:01
e-ink chromium waveshare
import epd7in5
import Image
import ImageDraw
import ImageFont
EPD_WIDTH = 640
EPD_HEIGHT = 384
def main():
epd = epd7in5.EPD()
import flickrapi
import urllib
import json
import random
import filecmp
import shutil
import os.path
from pprint import pprint
api_key = u'your api key'
import flickrapi
import urllib
import json
import random
import filecmp
import shutil
import os.path
from pprint import pprint
api_key = u'your api key'
import flickrapi
import urllib
import json
import random
import filecmp
import shutil
import os.path
from pprint import pprint
api_key = u'your api key'
import flickrapi
import urllib
import json
import random
import filecmp
import shutil
import os.path
from pprint import pprint
api_key = u'your api key'
@libbymiller
libbymiller / randomFeedsToHTML.rb
Created June 3, 2017 14:56
A script to take an OPML file, hack-parse it, and find 10 random things to read
require 'rss'
require 'open-uri'
require 'open_uri_redirections'
require 'cgi'
links = []
# hackparse opml file
file = File.new("subscriptions.opml", "r")
while (line = file.gets)
@libbymiller
libbymiller / petey-pi.md
Last active April 22, 2016 17:39
Petey autostarted with supervisor on a Pi B+ with physical buttons and wifi enabled.

install the wifi stuff

git clone https://github.com/radiodan/provision
cd provision
sudo ./provision node

git fetch origin
git checkout -b minimal origin/minimal

sudo apt-get install libv8-dev -y

# using a B+ and the default skeleton app I get no startup audio on a B+.
# pi 2 works perfectly.
# I can control audio from the webpage fine.
# This is what I did:
diskutil list
diskutil unmountDisk /dev/disk2
sudo dd bs=1m if=~/Downloads/2016-02-26-raspbian-jessie.img of=/dev/rdisk2
Put it in the Pi, login, expand the filesystem, reboot and login again.
var radiodan = require('radiodan-client').create;
radiodan.player.discover().then(function(players) {
console.log(players); // [ playerObjects ]
});
var radiodan = require('radiodan-client');
radiodan.create().player.discover().then(function(players) {
console.log(players); // [ playerObjects ]
});