Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
# coding=UTF8
# Copyright 2015 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@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)
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 / 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()
#!/usr/bin/python
# coding=UTF8
# Copyright 2015 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@libbymiller
libbymiller / gist:e3511c16d1590467171d9e157c6218b1
Last active January 29, 2019 17:51
Slackwobbler - anywhere - updated to new ArduinoJson and improved by Tim
/**
Arduino Real-Time Slack Bot
Copyright (C) 2016, Uri Shaked.
Licensed under the MIT License
https://github.com/urish/arduino-slack-bot
Bodged to use WiFiManager and a servo by libby.
#!/usr/bin/env bash
# export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
# ^^^ this can cause barfing and isn't needed
# Choose a condition for running WiFi Connect according to your use case:
# 1. Is there a default gateway?
# ip route | grep default