Skip to content

Instantly share code, notes, and snippets.

View CyberShadow's full-sized avatar

Vladimir Panteleev CyberShadow

View GitHub Profile
-- 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 / main.d
Last active September 17, 2019 17:01 — forked from run-dlang/main.d
Code shared from run.dlang.io.
/+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 / zz-busybox-initramfs-fix
Last active May 2, 2019 03:58 — forked from yongqli/zz-busybox-initramfs-fix
Fix remote unlocking of LUKS-encrypted root in Ubuntu/Debian
#!/bin/sh
# This hook is for fixing busybox-initramfs issue while unlocking a luks
# encrypted rootfs. The problem is that the included busybox version
# is stripped down to the point that it breaks cryptroot-unlock script:
# https://bugs.launchpad.net/ubuntu/+source/busybox/+bug/1651818
# This is a non-aggressive fix based on the original busybox-initramfs hook
# until the bug is fixed.
# busybox or busybox-static package must be present for this to work
@CyberShadow
CyberShadow / dlang-org-redesign-dark-theme.css
Last active October 11, 2016 03:06 — forked from JakobOvrum/dlang-org-redesign-dark-theme.css
dlang.org Re-Design Dark Theme
@-moz-document regexp("https?://(www\.|forum\.)?dlang.org/(|library|library-prerelease|phobos|phobos-prerelease|spec)(.*)") {
body {
color: #BFBFBF !important;
background-color: #222 !important;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkAgMAAAANjH3HAAAACVBMVEUaGhohISElJSUh9lebAAAB20lEQVRIx4XWuZXDMAwE0C0SAQtggIIYoAAEU+aKOHhYojTrYP2+QfOW/5QIJOih/q8HwF/pb3EX+UPIveYcQGgEHiu9hI+ihEc5Jz5KBIlRRRaJ1JtoSAl5Hw96hLB1/up1tnIXOck5jZQy+3iU2hAOKSH1JvwxHsp+5TLF5MOl1/MQXsVs1miXc+KDbYydyMeUgpPQreZ7fWidbNhkXNJSeAhc6qHmHD8AYovunYyEACWEbyIhNeB9fRrH3hFi0bGPLuEW7xCNaohw1vAlS805nfsrTspclB/hVdoqusg53eH7FWot+wjYpOViX8KbFFKTwlnzvj65P9H/vD0/hibYBGhPwlPO8TmxRsaxsNnrUmUXpNhirlJMPr6Hqq9k5Xn/8iYQHYIuQsWFC6Z87IOxLxHphSY4SpuiU87xJnJr5axfeRd+lnMExXpEWPpuZ1v7qZdNBOjiHzDREHX5fs5Zz9p6X0vVKbKKchlSl5rv+3p//FJ/PYvoKryI8vs+2G9lzRmnEKkh+BU8yDk515jDj/HAswu7CCz6U/Mxb/PnC9N41ndpU4hUU7JGk/C9PmP/M2xZYdvBW2PObyf1IUiIzoHmHW9yTncliYs9A9tVNppdShfgQaTLMf+j3X723tLeHgAAAABJRU5ErkJggg==) !important;
background-cl
@CyberShadow
CyberShadow / namegen.d
Created November 24, 2011 01:51 — forked from bhelyer/namegen.d
void main()
{
import std.random, std.stdio, std.range, std.algorithm, std.string;
array(map!q{std.stdio.writeln(capitalize(array(map!q{cast(char)["aeiou", "bcdfghjklmnpqrstvwxyz"][a][std.random.uniform(0, $)]}([[1,0,1,1,0,1], [0,1,1,0,1,0]][std.random.uniform(0, $)][0..std.random.uniform(5, 7)])))), 42}(iota(12)));
}
@CyberShadow
CyberShadow / namegen.d
Created November 24, 2011 01:51 — forked from bhelyer/namegen.d
module namegen;
import std.ascii;
import std.random;
import std.utf;
void main()
{
import std.stdio;