Skip to content

Instantly share code, notes, and snippets.

View Daniel15's full-sized avatar
💭
Busy

Daniel Lo Nigro Daniel15

💭
Busy
View GitHub Profile
@Daniel15
Daniel15 / gist:2ed69409ccc28e3d19a5bb2df14a21e0
Created May 8, 2024 17:57
Blue Iris notification flow in Node-RED
[
{
"id": "f64fc2c05427d1ff",
"type": "mqtt in",
"z": "329ba4b7632a95c8",
"name": "BlueIris/+/alert-image-b64",
"topic": "BlueIris/+/alert-image-b64",
"qos": "2",
"datatype": "json",
"broker": "e811c8eb637d26a5",
@Daniel15
Daniel15 / gist:6b8b3eb6bd680fd1c78799e4ea8cf0cb
Created May 8, 2024 17:52
Blue Iris notification with buttons in Node-RED
{
"message": message,
"data": {
"clickAction": "http://cameras.vpn.d.sb:81/ui3.htm?maximize=1&tab=alerts&cam=" & original_payload.camera & "&rec=" & original_payload.id,
"image": "/media/local/alerts/" & image_filename,
"actions": [{
"action": "URI",
"title": "Live View",
"uri": "http://cameras.vpn.d.sb:81/ui3.htm?maximize=1&cam=" & original_payload.camera
}, {
@Daniel15
Daniel15 / 1_README.md
Last active May 6, 2024 06:40
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

@Daniel15
Daniel15 / gist:9f22d46ccc791036a97634b4c573f701
Created February 18, 2024 22:15
HostHatch Black Friday 2020 YABS
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
# Yet-Another-Bench-Script #
# v2024-01-01 #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
Sun Feb 18 01:52:40 PM PST 2024
Basic System Information:
---------------------------------
@Daniel15
Daniel15 / _common.conf
Created May 1, 2020 16:33
WordPress config with WP Super Cache for Nginx
# /etc/nginx/snippets/wordpress/common.conf
index index.php;
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
}
# Block PHP files in uploads, content, and includes directory.
location ~* /(?:uploads|files|wp-content|wp-includes)/.*\.php$ {
@Daniel15
Daniel15 / FaviconProgress.html
Last active November 9, 2023 21:33
Using Favicon as progress bar
<!DOCTYPE html>
<html>
<head>
<title>Example Page</title>
</head>
<body>
<p>This page uses the favicon as a progress bar. Try clicking the button.</p>
<button onclick="run()">Do something</button>
<script>
@Daniel15
Daniel15 / BlueIrisAI-NodeRedFunctionNode.js
Last active October 13, 2023 18:56
Blue Iris AI alerts in Node-RED
const {img, ...otherPayloadFields} = msg.payload;
const objectsToFilter = new Set([
'ball',
'sports ball',
'horse',
'book',
'suitcase',
]);
let formattedObjectNames = 'Nothing';
@Daniel15
Daniel15 / _README.md
Last active August 29, 2023 21:33
Routing scripts for Tinc

This Gist contains some scripts for Tinc, in order to configure the routing tables for a remote subnet on Windows (ie. if a remote system wants to expose an entire subnet over the VPN). Tinc does not configure the routing tables by default, which is why these scripts are needed. See the mailing list thread here: https://www.tinc-vpn.org/pipermail/tinc/2018-December/005340.html

Place the files in the Tinc network directory (eg. C:\Program Files\Tinc\netname\) and change $interface in functions.ps1 to match the name of the Tinc interface configured in tinc.conf

@Daniel15
Daniel15 / slack-invite-link-security-issue.txt
Last active July 17, 2023 01:16
Slack invite link security issue
zigbee2mqtt:
container_name: zigbee2mqtt
restart: unless-stopped
image: koenkk/zigbee2mqtt:latest
volumes:
- /var/local/docker/zigbee2mqtt:/app/data
- /run/udev:/run/udev:ro
ports:
- 8080:8080
environment: