Skip to content

Instantly share code, notes, and snippets.

View lukeify's full-sized avatar

Luke lukeify

  • Alexandra, New Zealand
  • 17:20 (UTC +12:00)
View GitHub Profile
@lukeify
lukeify / solar.js
Created February 4, 2020 10:03
Sunshine hours calculator
/**
* Sunshine hours calculation. Data taken from https://cliflo.niwa.co.nz.
*
*/
const fs = require('fs');
const readline = require('readline');
const linestream = readline.createInterface({
input: fs.createReadStream(process.argv[2]),
@lukeify
lukeify / pihole-on-udm.md
Last active December 27, 2023 21:24
Running PiHole on a UDM

Preamble

I have been looking to free up one of my rPi's from PiHole duty for a while now, and I was pleasantly surprised to see it is indeed possible to run a containerized instance of PiHole on a UDM, thanks to the excellent work of boostchicken, who created several utility scripts to expedite the process. This quick gist documents my setup steps as of January 2023, and also just generally improves the formatting of the order of operations. You probably want to start here.

Step zero for me was figuring out SSH access for UniFiOS. This (to my knowledge) isn't able to be enabled from UniFiOS at https://192.168.1.1—you'll need to visit the UniFi Portal at unifi.ui.com, navigate to your network, then SettingsSystemNetwork Device Authentication and enable Device SSH Authentication. Enabling SSH in your local conso