Skip to content

Instantly share code, notes, and snippets.

version: '3.1'
services:
unifi:
container_name: unifi
restart: unless-stopped
image: linuxserver/unifi
volumes:
- /srv/docker/unifi:/config
environment:
- PGID=0
@5t111111
5t111111 / email_zpool_status.py
Created September 15, 2013 16:01
Send alert-email via Gmail when FreeNAS ZPool fails.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import socket
import smtplib
from email.MIMEText import MIMEText
from email.Header import Header
from email.Utils import formatdate
F.A.Q.
Because I got tired of answering these same things 100's of times.
1) Where can I find the latest beta?
They are always in the OP. They are also in my signature, and the root of the FTP.
2) Where is the root of the FTP you ask?
Good question! It’s in the OP as well.
3) How do I install this? / I'm having problems installing
@jsundram
jsundram / cull.py
Last active April 5, 2023 15:22
Check if lat long is inside the bounds of the continental US (box model, not shape)
# http://en.wikipedia.org/wiki/Extreme_points_of_the_United_States#Westernmost
top = 49.3457868 # north lat
left = -124.7844079 # west long
right = -66.9513812 # east long
bottom = 24.7433195 # south lat
def cull(latlngs):
""" Accepts a list of lat/lng tuples.
returns the list of tuples that are within the bounding box for the US.
NB. THESE ARE NOT NECESSARILY WITHIN THE US BORDERS!