Skip to content

Instantly share code, notes, and snippets.

View CyberShadow's full-sized avatar

Vladimir Panteleev CyberShadow

View GitHub Profile
@CyberShadow
CyberShadow / .gitignore
Last active July 1, 2023 18:39
nntp-md-adder
/nntp-md-adder
@CyberShadow
CyberShadow / bug.sql
Created April 18, 2021 00:23
SQLite "ALTER TABLE DROP COLUMN" data corruption bug
CREATE TABLE [MyTable] (
[ID] INTEGER PRIMARY KEY NOT NULL,
[Foo] INTEGER,
[Bar] INTEGER);
-- Insert 50000 identical rows
INSERT INTO [MyTable] ([Foo], [Bar])
SELECT 123, 456 FROM generate_series(1, 50000, 1);
-- All rows are: [Foo]==123, [Bar]==456
@CyberShadow
CyberShadow / test.d
Last active August 7, 2023 18:55
Mouse test
import std.math;
import ae.net.asockets;
import ae.sys.timing;
import mylib.linux.input_event_codes;
import uinput_filter.client;
import uinput_filter.common;
@CyberShadow
CyberShadow / test.d
Created November 26, 2020 21:57
Some attempts at rendering a wallpaper
import ae.utils.graphics.color;
import ae.utils.graphics.hls;
import ae.utils.graphics.image;
import ae.utils.math;
import std.conv;
import std.math;
import std.stdio;
enum size = 4096;
@CyberShadow
CyberShadow / autosave.lua
Last active September 17, 2026 08:46 — forked from Hakkin/autosave.lua
-- autosave.lua
--
-- Periodically saves "watch later" data during playback, rather than only saving on quit.
-- This lets you easily recover your position in the case of an ungraceful shutdown of mpv (crash, power failure, etc.).
--
-- You can configure the save period by creating a "lua-settings" directory inside your mpv configuration directory.
-- Inside the "lua-settings" directory, create a file named "autosave.conf".
-- The save period can be set like so:
--
-- save_period=60
@CyberShadow
CyberShadow / .perltidyrc
Last active June 24, 2020 12:51
Bugzilla Harmony unstable branch reformat rewrite
-pbp # Start with Perl Best Practices
-w # Show all warnings
-iob # Ignore old breakpoints
-l=80 # 80 characters per line
-vmll
-ibc
-iscl
-hsc
-mbl=2 # No more than 2 blank lines
-i=2 # Indentation is 2 columns
@CyberShadow
CyberShadow / .gitignore
Created June 17, 2020 06:32
Tombs & Tentacles
/twine_graph
/graph.dot
/graph.dot.svg
@CyberShadow
CyberShadow / .gitignore
Created June 3, 2020 21:03
Gravity Falls
/crack_caesar
/crack_1to1_dict
/decode
/crack_alg_dict
/crack_vignette_dict
#!/bin/bash
# shellcheck disable=SC1003
set -eEuo pipefail
# Converts a list of wildcard patterns, as defined by glob(7) and used
# by e.g. GNU find for the -path switch, to a single regular
# expression.
function ShellPatternsToRegex() {
local patterns=("$@")
@CyberShadow
CyberShadow / dummy.txt
Created February 8, 2020 08:31
Subnautica input helper
dummy