Skip to content

Instantly share code, notes, and snippets.

@kieraneglin
kieraneglin / retry-stalled-autodl-torrents.sh
Created February 26, 2024 01:40
Retry stalled fresh torrents from Autobrr/autodl-irssi in Deluge 2.x
#!/bin/bash
daemon_port=58846
# The Daemon username and password may not be the same as the web UI.
# Google "deluge daemon username password" for more info.
username=deluge
password=deluge
# If you want to only retry stalled torrents that were
# added by autobrr/autodl-irssi/etc, set `auto_dl_only` to 1
# and set `auto_dl_label` to whatever you've set up for your auto-downloader.
#include <iostream>
#include <string>
#include <algorithm>
bool hasPngExtension(const std::string& filename) {
std::string extension = ".png";
if (filename.size() >= extension.size()) {
// Extract the last part of the string
std::string fileExtension = filename.substr(filename.size() - extension.size());
// Convert both to lowercase for case-insensitive comparison
@kenzic
kenzic / window.ai.html
Last active January 12, 2025 20:36
Playground to demo window.ai
<html>
<head>
<meta charset="utf-8">
<title>window.ai playground: Updated 9/3/204</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="ui">
#include <iostream>
#include <string>
#include <algorithm>
bool hasPngExtension(const std::string& filename) {
size_t dotPos = filename.rfind('.');
if (dotPos == std::string::npos) return false;
std::string extension = filename.substr(dotPos + 1);
std::transform(extension.begin(), extension.end(), extension.begin(), ::tolower);
return extension == "png";
#include <iostream>
#include <string>
#include <algorithm> // For std::transform
bool hasPngExtension(const std::string& filename) {
// Find the last occurrence of the dot
size_t dotPos = filename.rfind('.');
if (dotPos == std::string::npos) {
// No dot found, no extension
return false;
#include <iostream>
#include <string>
bool hasPngExtension(const std::string& filename) {
// Find the last occurrence of the dot
size_t dotPos = filename.rfind('.');
if (dotPos == std::string::npos) {
// No dot found, no extension
return false;
}
@Leeyah-123
Leeyah-123 / stream-filter.js
Last active January 12, 2025 20:32
QuickNode stream filter to filter out transactions we don't need and function to transform QuickNode Solana Programs+Logs Stream data to human-readable format
function main(stream) {
const data = Array.isArray(stream.data) ? stream.data[0] : stream.data;
// Obtain addresses from KV Store
const addresses = qnGetList("watchlist_addresses");
// Convert addresses array to Set for faster lookups
const addressSet = new Set(addresses?.map(addr => addr.toLowerCase()) || []);
const filteredData = data.filter(tx => {
@adrienne
adrienne / mullenweg-wpe.md
Last active January 12, 2025 20:30
The Mullenweg/WPE Thing
@DomPizzie
DomPizzie / README-Template.md
Last active January 12, 2025 20:29
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@bzvyagintsev
bzvyagintsev / README.md
Last active January 12, 2025 20:28
Шаблон README.md

Название проекта

Добавьте краткое описание проекта, опишите какую задачу он решает. 1-3 предложения будет достаточно. Добавьте бейджи для важных статусов проекта: статус разработки (в разработке, на поддержке и т.д.), статус билда, процент покрытия тестами и тд.

Содержание