Skip to content

Instantly share code, notes, and snippets.

View davidldennison's full-sized avatar
🎯
Focusing

David Dennison (Search Riot) davidldennison

🎯
Focusing
View GitHub Profile
@davidldennison
davidldennison / replacevar-script.js
Created July 6, 2025 20:36 — forked from erikyo/replacevar-script.js
Adds to Yoast an additional replacement variable both in frontend and snippet preview (backend)
/* inspired from https://github.com/Yoast/wpseo-woocommerce/blob/trunk/js/src/yoastseo-woo-replacevars.js */
/* global jQuery, YoastSEO, app, globals YoastACFAnalysisConfig */
var pluginName = "additionalVariablePlugin";
var ReplaceVar = window.YoastReplaceVarPlugin && window.YoastReplaceVarPlugin.ReplaceVar;
var placeholders = {};
var modifiableFields = [
"content",
"title",
@davidldennison
davidldennison / alttextgenerator.cs
Created July 3, 2025 02:43 — forked from elbruno/alttextgenerator.cs
alttextgenerator.cs
#:package [email protected]
using OllamaSharp;
// set up the client
var uri = new Uri("http://localhost:11434");
var ollama = new OllamaApiClient(uri);
ollama.SelectedModel = "gemma3";
var chat = new Chat(ollama);
@elbruno
elbruno / alttextgenerator.cs
Created June 25, 2025 14:52
alttextgenerator.cs
#:package [email protected]
using OllamaSharp;
// set up the client
var uri = new Uri("http://localhost:11434");
var ollama = new OllamaApiClient(uri);
ollama.SelectedModel = "gemma3";
var chat = new Chat(ollama);
@sulco
sulco / copy-prompts.bookmarklet.js
Created November 1, 2024 12:14
Copy Prompts bookmarklet
javascript:(function(){
const result = [...document.querySelectorAll('.text-bolt-elements-textSecondary + div > div > ._MarkdownContent_1mdbx_1')]
.map(node => node.innerText)
.reduce((acc, curr) => acc + curr + '\n\n', '');
navigator.clipboard.writeText(result)
.then(() => alert('Content copied to clipboard!'))
.catch(err => alert('Failed to copy: ' + err));
})();
@MarekBodinger
MarekBodinger / openJinaAi.js
Created August 6, 2024 12:00
Open current URL in Jina AI
//bookmarklet_title:Open in Jina AI
window.open(`https://r.jina.ai/${window.location.href}`, '_blank');
@ninmonkey
ninmonkey / settings.json
Created May 23, 2024 23:36
VsCode Settings - Default using Pwsh profile settings.json
{
// settings related to pwsh terminal
"powershell.enableProfileLoading": true,
"terminal.integrated.defaultProfile.windows": "Pwsh🐒", // "Pwsh🐒",
// The terminal profile to use for automation-related terminal usage like tasks and debug. This setting will currently be ignored if `terminal.integrated.automationShell.windows` (now deprecated) is set.
"terminal.integrated.automationProfile.windows": {
"args": [
"-NoLogo"
],
@erikyo
erikyo / woocommerce_layered_navigation_add_classes.php
Last active July 6, 2025 20:38
Adds some useful classes to the WooCommerce layered navigation widget. This makes it very easy to stylise attribute colours or anything that can be represented with an icon.
<?php
/**
* Adds some useful classes to the WooCommerce layered navigation widget.
* This makes it very easy to stylise attribute colours or anything that can be represented with an icon.
*
* @param string $term_html - the item html
* @param object $term - the item props
*
* @return string - the old html list content wrapped inside a div with as class term id, term name and taxonomy
@RubenKelevra
RubenKelevra / fast_firefox.md
Last active July 7, 2025 13:22
Make Firefox fast again
@erikyo
erikyo / replacevar-script.js
Last active July 6, 2025 20:36
Adds to Yoast an additional replacement variable both in frontend and snippet preview (backend)
/* inspired from https://github.com/Yoast/wpseo-woocommerce/blob/trunk/js/src/yoastseo-woo-replacevars.js */
/* global jQuery, YoastSEO, app, globals YoastACFAnalysisConfig */
var pluginName = "additionalVariablePlugin";
var ReplaceVar = window.YoastReplaceVarPlugin && window.YoastReplaceVarPlugin.ReplaceVar;
var placeholders = {};
var modifiableFields = [
"content",
"title",
@natzir
natzir / google-api-indexing.ipynb
Created November 12, 2020 14:50
Google-API-Indexing.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.