Skip to content

Instantly share code, notes, and snippets.

View CyberShadow's full-sized avatar

Vladimir Panteleev CyberShadow

View GitHub Profile
#!/bin/env rdmd
module xorg_show_grabs;
import std.algorithm;
import std.conv;
import std.exception;
import std.getopt;
import std.stdio;
import std.string;
@CyberShadow
CyberShadow / .gitignore
Last active May 8, 2024 02:07
Eliza script parser, graph generator, and Steam guide
/dump_script
/section-*.dot
/images/section-*.png
/images/images.txt
/10-section-*.steamguide
/sections.txt
/guideid.txt
@CyberShadow
CyberShadow / solve.d
Last active May 7, 2024 10:02
Multi-word anagram search with llama.cpp filtering
import std.algorithm.iteration;
import std.algorithm.setops;
import std.algorithm.sorting;
import std.array;
import std.exception;
import std.file;
import std.range;
import std.stdio;
import std.string;
/play
/*.png
/*.bmp
/solitaire
@CyberShadow
CyberShadow / .gitignore
Last active April 23, 2024 18:05
An Untitled Story Black Jack solver
/solve
/game.txt
/make_table_hands
/make_table_heap
/graph
/data
/bot_server
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CyberShadow
CyberShadow / .gitignore
Last active March 27, 2024 12:48
Buckshot Roulette solver
/search_shootself
@CyberShadow
CyberShadow / config.py
Last active March 10, 2024 21:34
My Blankie configuration
# Sample Blankie configuration file.
# The main duty of thes configuration file is to define a function,
# config, which configures Blankie according to the current
# circumstances. Using the provided configuration object, the
# function tells Blankie what state the system should be in, and
# Blankie takes care to apply any changes necessary to bring the
# system to that state.
# This function is re-evaluated every time the context (idle time /
@CyberShadow
CyberShadow / llama-cpp-cuda.nix
Created February 25, 2024 19:06
Run llama.cpp / .llamafiles with Nix
let
package = {
writeShellScript
, llama-cpp
, nixGL
}:
writeShellScript "run-llamafile" ''
if [ $# -eq 0 ] ; then
echo "Usage: $0 server -m wizardcoder-python-13b-v1.0.Q4_K_M.gguf -ngl 9999"
exit 2
@CyberShadow
CyberShadow / test.d
Created January 21, 2024 10:53
Numeric encoding
private struct MaybeDynamicArray(T, size_t size = -1)
{
static if (size == -1)
{
T[] items;
alias items this;
}
else
{
T[size] items;