Skip to content

Instantly share code, notes, and snippets.

Avatar

Vladimir Panteleev CyberShadow

View GitHub Profile
View 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 Jun 24, 2020
Bugzilla Harmony unstable branch reformat rewrite
View .perltidyrc
-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 Jun 17, 2020
Tombs & Tentacles
View .gitignore
/twine_graph
/graph.dot
/graph.dot.svg
View .gitignore
/crack_caesar
/crack_1to1_dict
/decode
/crack_alg_dict
/crack_vignette_dict
View ShellPatternsToRegex.bash
#!/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 Feb 8, 2020
Subnautica input helper
@CyberShadow
CyberShadow / .gitignore
Created Feb 8, 2020
Subnautica map helper
View .gitignore
/draw
/map.svg
/map.txt
@CyberShadow
CyberShadow / btrfs-rescrub-errors
Last active Dec 4, 2019
btrfs-rescrub-errors
View btrfs-rescrub-errors
#!/bin/bash
# Scan dmesg for btrfs error messages, and re-scrub the respective
# offsets. Needs btrfs scrub with -s / -e switches:
# https://patchwork.kernel.org/patch/11268681/
set -eEuo pipefail
shopt -s lastpipe
blocksize=$((1*1024*1024*1024))
@CyberShadow
CyberShadow / main.d
Last active Sep 17, 2019 — forked from run-dlang/main.d
Code shared from run.dlang.io.
View main.d
/+dub.sdl:
dependency "sumtype" version="~>0.8.11"
+/
import std.stdio;
import sumtype;
struct High {}
struct Low{}
struct Medium{}
struct Original{}
struct None{};
@CyberShadow
CyberShadow / .gitignore
Last active Aug 15, 2019
Eliza script parser, graph generator, and Steam guide
View .gitignore
/dump_script
/section-*.dot
/images/section-*.png
/images/images.txt
/10-section-*.steamguide
/sections.txt
/guideid.txt
You can’t perform that action at this time.