Skip to content

Instantly share code, notes, and snippets.

View drizuid's full-sized avatar

driz drizuid

View GitHub Profile
@drizuid
drizuid / nextcloud.md
Last active July 3, 2024 16:15
nextcloud stuff

The most important bit, IMO, is that I use split dns, as every proper network should. Relying on hairpin nat/nat reflection/nat loopback will just cause problems. This is generally true for everything, hairpin nat is a security vulnerabilty, you should not be using it outside of strictly controlled scenarios with manual rules, usually for enterprise level gear like the non-recommended setup for Cisco Expressway.

I use SWAG (https://github.com/linuxserver/docker-swag) as my reverse proxy. I renamed collabora.subdomain.conf.sample to collabora.subdomain.conf, nextcloud.subdomain.conf.sample to nextcloud.subdomain.conf, and restarted swag. I then created DNS records (external and internal) for nextcloud and collabora. My SWAG participates in network nc

I was recently asked what swag confs I use for this, I use collabora.subdomain.conf.sample with no modifications except renaming to remove .sample and I use [ne

@drizuid
drizuid / config.js
Created September 30, 2023 14:42
xs movies
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
module.exports = {
delay: 10,
/**
* 1: BHD
* 3: BIB
* 4: PTP
* 5: HDB
* 6: MAM
#!/bin/bash
# this is a simple script, it will curl to get your current ipv4 ip (change from ipv4 to ipv6 and A to AAAA to do this for ipv6)
# compare to what is set at cloudflare, and then update the record if needed. unlike most scripts you'll find, this does NOT
# use the global key. You need DNS::Edit for your api key.
# the record ID may not be needed, but this is how I set this up, maybe ill edit later
DOMAIN="<put the record you want to update here>"
NEWIP=$(host $DOMAIN| grep address | awk '{ print $4 }')
CURRIP=$(curl -s ipv4.icanhazip.com)
@drizuid
drizuid / gosund-smartplug
Last active October 31, 2021 19:38
stuff
reset 3
backlog template {"NAME":"Gosund WP6","GPIO":[0,0,0,17,0,0,0,0,56,57,21,0,0],"FLAG":0,"BASE":18}; module 0
backlog NtpServer1 192.168.128.10; NtpServer2 0; NtpServer3 0; TimeZone 99; TimeDST 0,2,3,1,2,-240; TimeSTD 0,1,11,1,2,-300; Emulation 1;
backlog MqttHost 192.168.128.9; Topic Plug6; SetOption53 1; SetOption59 1;PowerRetain on; DeviceName Plug6; SetOption19 0;
run sql select lg.name as LineGroup,n.dnorpattern,dhd.hlog from linegroup as lg inner join linegroupnumplanmap as lgmap on lgmap.fklinegroup=lg.pkid inner join numplan as n on lgmap.fknumplan = n.pkid inner join devicenumplanmap as dmap on dmap.fknumplan = n.pkid inner join device as d on dmap.fkdevice=d.pkid inner join devicehlogdynamic as dhd on dhd.fkdevice=d.pkid order by lg.name
run sql car select pkid,lastredirectingpartypattern,originalcalledpartypattern,finalcalledpartypattern from tbl_billing_error where originalcalledpartypattern="5025093359"
run sql car select DBINFO('utc_to_datetime',datetimeOrigination),callingPartyNumber,finalCalledPartyNumber from tbl_billing_error where callingPartyNumber like '%17990%' order by datetimeOrigination
run sql car select DBINFO('utc_to_datetime',datetimeOrigination),origdevicename,callingPartyNumber,finalCalledPartyNumber from tbl_billing_error order by datetimeOrigination
@drizuid
drizuid / lohas-14W_bulbs
Last active October 6, 2023 22:06
stuff
reset 3
backlog template {"NAME":"Lohas100 RGBW","GPIO":[0,0,0,0,0,0,0,0,0,143,0,144,0],"FLAG":0,"BASE":18}; module 0
backlog NtpServer1 192.168.128.10; NtpServer2 0; NtpServer3 0; TimeZone 99; TimeDST 0,2,3,1,2,-240; TimeSTD 0,1,11,1,2,-300; Emulation 2;
backlog MqttHost 192.168.128.9; Topic Light3; SetOption53 1; SetOption56 1; SetOption57 1; SetOption59 1; SetOption17 1; PowerRetain on; DeviceName Light3; SetOption19 0;
@drizuid
drizuid / radarr.subdomain.conf
Created April 28, 2020 17:14
allow and deny statements
# make sure that your dns has a cname set for radarr and that your radarr container is not using a base url
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name radarr.*;
include /config/nginx/ssl.conf;