Skip to content

Instantly share code, notes, and snippets.

@Vigrond
Vigrond / jellyfinchromecast.md
Last active August 13, 2025 20:55
Jellyfin with Chromecast
@bem13
bem13 / danbooru_tag_count_scraper.py
Created February 9, 2024 13:15
Danbooru tag count scraper Python script
import requests
import csv
import time
# Base URL without the page parameter
base_url = 'https://danbooru.donmai.us/tags.json?limit=1000&search[hide_empty]=yes&search[is_deprecated]=no&search[order]=count'
# Specify the filename for the CSV
csv_filename = 'danbooru_tags_post_count.csv'
@YukiCoco
YukiCoco / KeypairVault.rs
Last active August 13, 2025 20:52
安全在服务器储存敏感内容的算法,使用 Argon2 + AES 加密
use std::fs;
use std::path::Path;
use argon2::{
password_hash::{
rand_core::OsRng,
PasswordHasher, SaltString
},
Argon2
};
use aes_gcm::{
@NickHatBoecker
NickHatBoecker / plugin.gd
Last active August 13, 2025 20:51
Godot addon to create functions and get/set vars on the fly
## Idea by u/siwoku
##
## Contributors:
## - You don't have to select text to create a function u/newold25
## - Consider editor settings's indentation type u/NickHatBoecker
## - Added shortcuts (configurable in editor settings) u/NickHatBoecker
@tool
extends EditorPlugin
@whistler
whistler / ofx2csv.py
Created April 19, 2015 23:32
Convert QFX/OFX to CSV
from csv import DictWriter
from glob import glob
from ofxparse import OfxParser
DATE_FORMAT = "%m/%d/%Y"
def write_csv(statement, out_file):
print "Writing: " + out_file
fields = ['date', 'payee', 'debit', 'credit', 'balance']
with open(out_file, 'w') as f:
@mmozeiko
mmozeiko / armv8_tsc.h
Last active August 13, 2025 20:48
armv8 timer & cycle counter
#pragma once
#if defined(__linux__)
# define _GNU_SOURCE
# include <sched.h>
# include <unistd.h>
# include <sys/syscall.h>
# include <linux/perf_event.h>
#elif defined(_WIN32)
# include <intrin.h>
@herissondev
herissondev / ElixirAiAgent.ex
Created August 13, 2025 14:55
Minimal AI agent in elixir
defmodule ElixirAiAgent do
@moduledoc """
A minimal ai agent implementation showcasing how simple it is to build AI agents in Elixir.
Combines agent logic and server management in one module.
"""
use GenServer
alias LangChain.Chains.LLMChain
alias LangChain.Message
@muratkeremozcan
muratkeremozcan / global_rules.md
Created July 10, 2025 13:41
windsurf global rules

Windsurf Global Rules

Meta Rule: When applying rules, explicitly state which rules are being followed in the output. You may abbreviate rule descriptions to key phrases.

Purpose

This is a centralized ruleset for AI assistance across all projects. These rules define:

  • Coding standards and best practices
  • Project structure conventions
@lewangdev
lewangdev / default.custom.yaml
Last active August 13, 2025 20:44
雾凇拼音自定义配置,MacOS-like & Wechat-like Dark/Light Color Scheme For Rime
patch:
# 菜单
menu:
page_size: 8 # 候选词个数
# alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⑩ ] # 修改候选项标签
# alternative_select_keys: ASDFGHJKL # 如编码字符占用数字键,则需另设选字键
# ascii_mode、inline、no_inline、vim_mode 等等设定,可参考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml
# 中西文切换
#
# 【good_old_caps_lock】 CapsLock 切换到大写或切换中英。

Visualize primary and replicas (inspired by Waterpark)

Mix.install([
  {:kino, "~> 0.16.1"}
], consolidate_protocols: false)

Library modules