Skip to content

Instantly share code, notes, and snippets.

View harperreed's full-sized avatar

Harper Reed harperreed

View GitHub Profile
@harperreed
harperreed / s3_mirror_site.sh
Created July 10, 2012 02:57
Create an static S3 bucket to mirror a site
#!/bin/bash
#this will mirror a website, upload to s3, and make it publically available.
#install s3cmd. install wget. (i use homebrew).
#configure s3cmd (s3cmd --configure)
# run this by doing: mirror_site.sh www.example.org
wget --mirror -p --html-extension --convert-links -e robots=off -P . $1
s3cmd mb s3://$1
import json
import zipfile
import os
import html2markdown
from pathlib import Path
from datetime import datetime
source = 'notes.zip'
with zipfile.ZipFile(source, 'r') as zip_ref:
You are going to pretend to be Concept2PromptAI or C2P_AI for short. C2P_AI takes concepts and turns them into prompts for generative AIs that create images.
You will ask the user for a concept then provide a prompt for it in a copyable code-box.
After providing a prompt, ask if the User wants three different options for prompts for the concept or if they wish to move to a new concept.
Use the following examples as a guide:
Concept: A macro shot of a steampunk insect
@harperreed
harperreed / electric_objects.py
Last active August 11, 2022 10:02
Electric objects simple API wrapper
import requests
import urllib
import requests
import json
import random
"""
here is a wrapper for the *unreleased* electric objects API
Built by Harper Reed (harper@nata2.org) - @harper
@harperreed
harperreed / 01.gif
Last active May 16, 2022 18:37
Yayhooray Pinkies
01.gif
@harperreed
harperreed / lsusb-v-osx.txt
Last active April 12, 2022 15:50
OPAL Camera USB debug info
Opal C1:
Product ID: 0xf63b
Vendor ID: 0x03e7
Version: 2.00
Serial Number: 14442C10E19093D700
Speed: Up to 5 Gb/s
Manufacturer: Opal
Location ID: 0x02200000 / 1
Current Available (mA): 900

Hifi Digital MP3 Home

Software / Services / products:

  • Roon - very nice interface / hifi / good DSP - expensive
    • works with many audio endpoints (sonos, roon ready hardware, raspberry pis, etc)
    • High quality
  • Volumio - music player for raspberry pi, etc / multi room support and ripping support
@harperreed
harperreed / DownloadStationAPI.py
Last active January 4, 2022 08:13
example script to sync/download/etc put.io downloads to your synology download station
import time
import requests
import json
class DownloadStationAPI():
def __init__(self, host=None, username=None, password=None):
self.name = 'DownloadStation'
@harperreed
harperreed / busylamp.py
Created December 14, 2021 22:01
busy lamp mqtt server
import paho.mqtt.client as mqtt
from busylight.lights.embrava import Blynclight
import logging
logging.basicConfig(level=logging.INFO)
class busylamp:
lamp_color = (255, 255, 255)
state = False
@harperreed
harperreed / emfitqs-local-api.md
Created February 17, 2018 20:08
EMFIT QS Sleep tracker location API

EMFIT Local API

There is a functional http server running on the device that can be crawled for realtime data. It runs on port 80 and uses plain http.

You will need to know the IP address if your emfit device.

shortdvm.htm

For demoing / testing with a web browser there is an auto-refreshing page that contains only HR and RR values, it’s name is shortdvm.htm