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:67bc12c489c9c688c82ecea48864af27
Created January 23, 2025 19:32
DeepSeek-R1 14B spelling "strawberry"
>>> How many Rs are in the word "strawberry"?
<think>
Okay, so I need to figure out how many times the letter 'R' appears in the word "strawberry." Let me start by writing down the word
clearly: S-T-R-A-W-B-E-R-R-Y. Wait, no, that's not quite right. Let me think again.
Wait, the correct spelling of "strawberry" is S-T-R-A-W-B-E-R-R-Y? Hmm, maybe I should break it down letter by letter to be sure. So,
starting from the beginning: S, T, R, A, W, B, E, then comes another R, and then two more letters before Y? Or is that correct?
Wait a second, maybe I'm getting confused with how "strawberry" is spelled. Let me write it out step by step. The word starts with 'S',
then 'T', followed by 'R'. So that's the first R right there. Then comes A, W, B, E. After E, I think another R comes in. But wait, does
--- C:\temp\index.hbs.orig Sat May 18 17:04:00 2024
+++ C:\src\conduit\theme\index.hbs Sat May 18 17:04:34 2024
@@ -47,6 +47,8 @@
{{#each additional_css}}
<link rel="stylesheet" href="{{ ../path_to_root }}{{ this }}">
{{/each}}
+ <link href="https://fonts.googleapis.com/css?family=Alfa+Slab+One&display=swap" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600&display=swap" rel="stylesheet">
{{#if mathjax_support}}
@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 / 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 / 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';
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:
@Daniel15
Daniel15 / slack-invite-link-security-issue.txt
Last active July 17, 2023 01:16
Slack invite link security issue
@Daniel15
Daniel15 / WithHovercard.tsx
Created October 17, 2021 00:24
React Bootstrap tooltip with Popper.js
import React, {useEffect, useState} from 'react';
import ReactDOM from 'react-dom';
import {Placement} from '@popperjs/core';
import useMouseOver from '../hooks/useMouseOver';
import useLazyRef from '../hooks/useLazyRef';
import {usePopper} from 'react-popper';
type Props = Readonly<{
children: React.ReactNode;
@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$ {