Skip to content

Instantly share code, notes, and snippets.

@coldfire84
coldfire84 / mongod.conf
Created September 20, 2018 16:16
Node-Red-Alexa-Smart-Home-v3 mongod.conf
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
@coldfire84
coldfire84 / node-red-alexa-smart-home-v3.conf
Last active March 21, 2019 18:25
Mongodb Mosquitto Conf File
auth_plugin /usr/local/lib/auth-plug.so
auth_opt_backends mongo
auth_opt_mongo_uri mongodb://<user>:<password>@<mongo-server>:27017
auth_opt_mongo_database users
auth_opt_mongo_user_username_prop username
auth_opt_mongo_user_password_prop mqttPass
auth_opt_mongo_user_superuser_prop superuser
auth_opt_mongo_user_coll accounts
auth_opt_mongo_topiclist_coll topics
auth_opt_mongo_user_topiclist_fk_prop topics
@coldfire84
coldfire84 / mongodb-accounts.sh
Last active September 22, 2018 00:40
Node-Red-Alexa-Smart-Home-v3 MongoDB Account Setup
mongo mongodb://localhost/users --authenticationDatabase admin -u '<mongo-admin-user>' -p '<mongo-admin-password>' --eval '
db.createUser({
user: "<web-app-user>",
pwd: "<web-app-password>",
roles: [{
role: "readWrite",
db: "users"
}]
})'
@coldfire84
coldfire84 / mosquitto.conf
Last active July 25, 2019 11:27
Standard mosquitto.conf file
# Place your local configuration in /mosquitto/config/conf.d/
port 1883
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /mosquitto/data/
user mosquitto
@coldfire84
coldfire84 / docker-entrypoint.sh
Last active September 21, 2018 00:35
Mosquitto Docker docker-entrypoint.sh
#!/bin/bash
set -e
exec "$@"
@coldfire84
coldfire84 / libressl.patch
Created September 20, 2018 21:04
Libressl Patch for Mosquitto Compile
diff --git a/lib/mosquitto_internal.h b/lib/mosquitto_internal.h
index 4b4cf85..700bbb0 100644
--- a/lib/mosquitto_internal.h
+++ b/lib/mosquitto_internal.h
@@ -25,6 +25,9 @@ Contributors:
#ifdef WITH_TLS
# include <openssl/ssl.h>
+# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+# define HAVE_OPENSSL_OPAQUE_STRUCTS
@coldfire84
coldfire84 / default.conf
Last active March 10, 2023 03:33
Nginx Config
# Hardening as-per https://gist.github.com/plentz/6737338
server_tokens off;
# Expires map
map $sent_http_content_type $expires {
default off;
text/html epoch;
text/css max;
application/javascript max;
~image/ max;
#!/bin/bash
# Ensure you replace <mongo-admin> and <password> with your mongodb credentials
# Variables
###########################
CONTAINER="mongodb"
DATETIME=$(date +"%Y_%m_%d")
BACKUP_PATH="/var/docker/backup"
DROPBOX_UPLOADER_CONFIG_PATH="/var/docker/dropbox-uploader"
@coldfire84
coldfire84 / user_config_override.h
Created October 6, 2018 16:00
Sonoff user_config_override.h
/*
user_config_override.h - user configuration overrides user_config.h for Sonoff-Tasmota
Copyright (C) 2018 Theo Arends
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@coldfire84
coldfire84 / base-vs-instruction-fine-tuned.ipynb
Last active May 9, 2024 10:48
base-vs-instruction-fine-tuned.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.