Skip to content

Instantly share code, notes, and snippets.

@JonnyWong16
JonnyWong16 / plex_imdb_top_250_collection.py
Last active March 6, 2024 14:13
Automatically create an IMDB Top 250 collection in Plex using an existing movie library
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
#
# Automated IMDB Top 250 Plex collection script by /u/SwiftPanda16
#
# *** Use at your own risk! ***
# *** I am not responsible for damages to your Plex server or libraries. ***
#
#------------------------------------------------------------------------------
@joyrexus
joyrexus / index.html
Created October 6, 2015 19:00
Sewanee Flyover III
<html>
<head>
<meta charset='utf-8' />
<title>Domain Flyover</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.8.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.8.0/mapbox-gl.css' rel='stylesheet' />
<link href='https://www.mapbox.com/base/latest/base.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@binarybucks
binarybucks / gist:e6c7d42ecbeecbcc1a25
Created June 13, 2015 14:39
Nginx TLS vHost config
server {
listen 443 default_server ssl;
server_name CHANGEME
server_tokens off;
ssl_certificate CHANGEME.crt;
ssl_certificate_key CHANGEME.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:ssl_session_cache:10m;
@RobertSudwarts
RobertSudwarts / deg_to_cardinal.py
Created June 7, 2015 16:18
[python] degrees to cardinal directions
def degrees_to_cardinal(d):
'''
note: this is highly approximate...
'''
dirs = ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE",
"S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"]
ix = int((d + 11.25)/22.5)
return dirs[ix % 16]
@igrr
igrr / esp8266_pubsubclient.ino
Created January 6, 2015 23:44
PubSubClient sample for ESP8266 Arduino
#include <PubSubClient.h>
#include <ESP8266WiFi.h>
const char* ssid = ".................";
const char* password = "................";
char* topic = "esp8266_arduino_out";
char* server = "iot.eclipse.org";
@d3mon187
d3mon187 / imhome.py
Created March 24, 2014 17:20
Script that controls events for leaving home and coming back using phone pings and wemo motion sensors.
import os
import subprocess
import time
import datetime
import ephem #pyephem integration for checking if lights need to remain on
o=ephem.Observer()
o.lat='30' #change to your latitude
o.long='-98' #change to your longitude
running=1
@matbor
matbor / 00readme.md
Last active August 29, 2015 13:57
Last Will and Testament Notification Function for mqttwarn. https://github.com/jpmens/mqttwarn

note; I have all my scripts setup so that the lwt (last will and testament) publishes 'offline' if the scripts die.

@surrealchemist
surrealchemist / auth-basic.conf
Last active July 3, 2019 12:28 — forked from Thermionix/auth-basic.conf
Adding "port_in_redirect off;" which fixes the problem caused when your router is forwarding from a different port. This stops nginx from adding the port back in which is needed in a couple cases.
auth_basic "Restricted";
auth_basic_user_file /usr/local/etc/nginx/htpasswd;
@matbor
matbor / functions.owntracks.py
Last active August 29, 2015 13:57
This will reverse Geo the gps data sent by owntracks and then send it thru mqttwarn to whatever target you specify, https://github.com/jpmens/mqttwarn
#add this first part to the top of the functions file
#for reversegeo
import time
#import logging
from urllib import urlencode
from urllib2 import urlopen
#this filter will reverse geo the address for you
def OwnTracksConvertWithAdd(data):
@jpmens
jpmens / 00README.md
Last active February 11, 2016 23:58
openHAB sunrise / sunset

I use an MQTT 'bus' to communicate with openHAB.

forecast-io.py queries a weather service once an hour and publishes retained messages to MQTT at, say,

home/weather/today/sunsetTime 1391963342
home/weather/today/sunsetTime-iso 2014-02-09T17:29:02
home/weather/today/sunsetTime-hhmm 17:29