Skip to content

Instantly share code, notes, and snippets.

+ python3 -c 'import os; import middlewared; print(os.path.dirname(middlewared.__spec__.origin))'
+ cd /usr/local/lib/python3.9/site-packages/middlewared
+ alembic upgrade head
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> c6be4fe10acc, Fix references
INFO [alembic.runtime.migration] Running upgrade c6be4fe10acc -> e49fadd7285d, Fix booleans
INFO [alembic.runtime.migration] Running upgrade e49fadd7285d -> 0d545b21e189, Drop Django tables
INFO [alembic.runtime.migration] Running upgrade 0d545b21e189 -> a3423860aea0, Drop nfs_share_path MtM
INFO [alembic.runtime.migration] Running upgrade a3423860aea0 -> d38e9cc6174c, Fix lacking foreign keys
@dwhacks
dwhacks / Attiny85_batteryMonitor.ino
Last active April 20, 2022 16:41
Attiny battery monitor with tiny core.
/*
Attiny85_batteryMonitor
Ideas borrowed from: https://github.com/unixbigot/Flat-Mate
modified for arduino tiny core by DWhacks
*@@ Voltage trigger levels.
*
@dwhacks
dwhacks / Attiny_gps_beacon.ino
Created May 4, 2014 18:54
Attiny softserial and gps
/*
Original code come from Adafruit GPS logger shield kit - v1.1
http://www.adafruit.com/products/98
http://www.ladyada.net/make/gpsshield/download.html
All of this example Arduino code is Public Domain. Enjoy!
http://en.wikipedia.org/wiki/GNU_General_Public_License
Modified by DWHacks for use with U-blox PCI-5S.
Info about U-blox PCI-5S here: http://emerythacks.blogspot.ca/2013/01/u-blox-pci-5s-cheap-gps-module-for-your.html
@dwhacks
dwhacks / Attiny85_watchdog_example.ino
Created December 20, 2013 14:07
Attiny85 Watchdog
/*
* Watchdog Sleep Example
* Demonstrate the Watchdog and Sleep Functions
* LED on digital pin 0
*
* KHM 2008 / Lab3/ Martin Nawrath nawrath@khm.de
* Kunsthochschule fuer Medien Koeln
* Academy of Media Arts Cologne
*
* Modified on 5 Feb 2011 by InsideGadgets (www.insidegadgets.com)
@dwhacks
dwhacks / network_new
Last active December 13, 2020 20:53
/etc/config/network new
# /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fda2:ed20:3b24::/48'
@dwhacks
dwhacks / network_old
Created December 13, 2020 20:05
current network config, no vlans
#/etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fda2:ed20:3b24::/48'
@dwhacks
dwhacks / TeenLogger_DW_ublox_uart.ino
Last active December 4, 2020 05:13
GPS dwhacks cheap ublox
/*
Original code come from Adafruit GPS logger shield kit - v1.1
http://www.adafruit.com/products/98
http://www.ladyada.net/make/gpsshield/download.html
All of this example Arduino code is Public Domain. Enjoy!
http://en.wikipedia.org/wiki/GNU_General_Public_License
Modified by DWHacks for use with U-blox PCI-5S.
Info about U-blox PCI-5S here: http://emerythacks.blogspot.ca/2013/01/u-blox-pci-5s-cheap-gps-module-for-your.html
Info about DWHacks: dwhacks.blogspot.com
@dwhacks
dwhacks / FSM_dw_gps_1.ino
Created September 13, 2013 02:43
DW finite state machine GPS logger
/*GPS logger for Ublox GPS module outputting NMEA data through Uart
by DWhacks
For Teensy
Help from Feyr and tgmobile on ##foulab IRC
using finite state machine http://playground.arduino.cc/code/FiniteStateMachine
*/
@dwhacks
dwhacks / teensy_loggerUBLOX
Last active December 4, 2020 05:12
Ublox cheap GPS logger
/*
Original code come from Adafruit GPS logger shield kit - v1.1
http://www.adafruit.com/products/98
http://www.ladyada.net/make/gpsshield/download.html
All of this example Arduino code is Public Domain. Enjoy!
http://en.wikipedia.org/wiki/GNU_General_Public_License
Modified by DWHacks for use with U-blox PCI-5S.
Info about U-blox PCI-5S here: http://emerythacks.blogspot.ca/2013/01/u-blox-pci-5s-cheap-gps-module-for-your.html
Info about DWHacks: dwhacks.blogspot.com
@dwhacks
dwhacks / Attiny85_mailbox_TX.ino
Last active December 4, 2020 04:59
attiny85 Mailbox TX
#include <Manchester.h>
/*
You've Got Snail Mail by dwhacks: http://daynewaterlow.com
Using Arduino-Tiny core on the Attiny85
http://code.google.com/p/arduino-tiny/
Notifier Code borrowed from: https://github.com/LowPowerLab/MailboxNotifier
Manchester library for Arduino from: http://mchr3k.github.io/arduino-libs-manchester/