Skip to content

Instantly share code, notes, and snippets.

View hobopanda's full-sized avatar

kyle steinkamp hobopanda

  • Panda Electronics
  • United States
View GitHub Profile
@hobopanda
hobopanda / smx8fancontrol
Created May 16, 2018 15:07 — forked from timemaster67/smx8fancontrol
Python script to edit the X8DTL-iF Registry to control fan speed.
#!/usr/bin/env python
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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
@hobopanda
hobopanda / Pi 3B+ overclocking
Last active November 18, 2022 01:32
Pi 3B+ overclocking
USE AT YOUR OWN RISK!!
Run this in a terminal to determine current MHz:
sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
benchmarking
install sysbench: sudo apt-get install sysbench
@hobopanda
hobopanda / docker-cleanup-resources.md
Created May 16, 2018 14:46 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@hobopanda
hobopanda / HowToOTG.md
Created May 16, 2018 14:40 — forked from gbaman/HowToOTG.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@hobopanda
hobopanda / tmpdb.sh
Created February 23, 2017 16:10 — forked from Tafkas/tmpdb.sh
Create RRDTool database for storing temperature values
#!/usr/bin/env bash
rrdtool create temperatures.rrd \
--start N \
--step 300 \
DS:temps1:GAUGE:1200:-40:50 \
DS:temps2:GAUGE:1200:-40:50 \
DS:temps3:GAUGE:1200:-40:50 \
DS:temps4:GAUGE:1200:-40:50 \
DS:temps5:GAUGE:1200:-40:50 \
@hobopanda
hobopanda / fetch_wde_data.sh
Created February 23, 2017 16:10 — forked from Tafkas/fetch_wde_data.sh
Fetch data from USB-WDE1 receiver and write it to RRDTool database
#!/usr/bin/env bash
# Receive weather data from remote USB WDE1 and store it into database
# Loop forever to read data from USB WDE1
socat / dev/ttyUSB0, B9600 STDOUT | \
while read line
do
if [["$ {line%% *}" == '$ 1']] then
# Format data
"{? line # 1, 1,} $" tmp = `echo | tr ',' ','`.
@hobopanda
hobopanda / xport-temp.sh
Created February 23, 2017 16:09 — forked from Tafkas/xport-temp.sh
Export RRDTool database to xml
#!/usr/bin/env bash
rrdtool xport -s now-3h -e now --step 300 \
DEF:a=/home/pi/weather/temperatures.rrd:temps1:AVERAGE \
DEF:b=/home/pi/weather/temperatures.rrd:temps2:AVERAGE \
DEF:c=/home/pi/weather/temperatures.rrd:temps3:AVERAGE \
DEF:d=/home/pi/weather/temperatures.rrd:temps4:AVERAGE \
DEF:e=/home/pi/weather/temperatures.rrd:temps5:AVERAGE \
DEF:f=/home/pi/weather/temperatures.rrd:temps6:AVERAGE \
XPORT:a:"Livingroom" \
@hobopanda
hobopanda / createhighchartfromxml.js
Created February 23, 2017 16:09 — forked from Tafkas/createhighchartfromxml.js
Parse xml file generated from RRDTool export and create Highchart series
$.ajax({
type: "GET",
url: "data/temperature24h.xml",
dataType: "xml",
success: function(xml) {
var series = []
//define series
$(xml).find("entry").each(function() {
var seriesOptions = {
@hobopanda
hobopanda / createhighchartfromxml.js
Created February 23, 2017 16:09 — forked from Tafkas/createhighchartfromxml.js
Parse xml file generated from RRDTool export and create Highchart series
$.ajax({
type: "GET",
url: "data/temperature24h.xml",
dataType: "xml",
success: function(xml) {
var series = []
//define series
$(xml).find("entry").each(function() {
var seriesOptions = {