Skip to content

Instantly share code, notes, and snippets.

View ghfields's full-sized avatar

Garrett Fields ghfields

  • George Washington University
  • Washington DC
View GitHub Profile
@mihailescu2m
mihailescu2m / solaredge.py
Created December 31, 2019 23:00
snippet to write solaredge optimisers panel data in an influxdb database
import requests, pickle
from datetime import datetime
import json, pytz
import pandas as pd
from influxdb import DataFrameClient
login_url = "https://monitoring.solaredge.com/solaredge-apigw/api/login"
panels_url = "https://monitoring.solaredge.com/solaredge-web/p/playbackData"
SOLAREDGE_USER = "" # web username
@xenophonf
xenophonf / 01-pre-install.sh
Last active November 28, 2018 14:02
Ubuntu 18.04.1 root-on-ZFS-on-LUKS (HP ProLiant DL380 G7)
#!/bin/sh
#### Run as user `ubuntu` from the Ubuntu Desktop installer's live environment.
passwd ubuntu
sudo apt install --yes openssh-server
ip addr

Create an Ubuntu 18.04 droplet, and use the smallest SSD/HDD size. This way you can make a snapshot of the droplet and have the ability to later deploy that snapshot into a droplet of any size.

In this example, I use the "Optimized Droplet" that is 20GB, since that's the smallest one currently available.

After creating the droplet, power it down and open a ticket with DigitalOcean support, and ask to enable the Ubuntu 18.04 recovery ISO. It can take an hour or two before they do this. By the time you read this guide, hopefully they will have an automated way of doing it.

Once they get back to you, power your droplet back up and choose the recovery ISO's terminal/console option to get a shell. Now shrink the ext4 root to make room for the zfs root:

e2fsck -f /dev/vda1
@jgeboski
jgeboski / CWMP-INSTRUCTIONS
Created January 17, 2014 03:50
Instructions to disable the CWMP interface on OpenRG based routers
Verizon FiOS (and possibly other ISPs) deploy CPE routers based on
OpenRG which enable CWMP (port 4567) by default. The CWMP protocol
enables remote management of the CPE device, however, the protocol can
also enable a remote attacker to obtain unwarranted access. The simple
solution is to disable the CWMP protocol, which is done below. Please
note, this operation is likely unsupported by ISPs, so do the following
at your own risk.
Information on CWMP: http://en.wikipedia.org/wiki/TR-069