This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- () { :; }; exec sqlite3 -init "$0" # Shebang | |
| -- XXX: THIS WILL DELETE EXISTING STRAWBERRY LIBRARY!!! | |
| -- Based on instructions at <url:https://wiki.strawberrymusicplayer.org/wiki/Import_collection_library_and_playlists_from_Clementine> | |
| -- You will need to replace '~' with its expansion | |
| ATTACH '~/.local/share/strawberry/strawberry/strawberry.db' AS strawberry; | |
| ATTACH '~/.config/Clementine/clementine.db' AS clementine; | |
| BEGIN; | |
| DELETE FROM strawberry.directories; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local parentTerm | |
| local linesFed = 0 | |
| local eventQueue = {} | |
| local consumeQueue = true | |
| local skipKeyUp = {} | |
| local function getChar() | |
| -- If the wrapped program received key event, | |
| -- we should not consume its corresponding char event | |
| local hadKeyDown = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local keyboardEvents = {["char"] = true, ["key"] = true, ["key_up"] = true} | |
| local touchButtonId = 1 | |
| local useParentKeyboard = true | |
| local useTmKeyboards = {} | |
| local monName = nil | |
| local scale = nil | |
| local seat = {monitor = nil, co = nil, monitorName = nil} | |
| local args = {...} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local selectedEvents = {"key", "key_up", "char", "paste", "mouse_click", "mouse_drag", "mouse_up", "mouse_scroll"} | |
| local allEvents = false | |
| local function repr(x) | |
| local visited = {} | |
| local visitedCount = 0 | |
| local function reprInner(x) | |
| visitedCount = visitedCount + 1 | |
| local t = type(x) | |
| if t == "string" then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Was not checked for compilation and runtime errors | |
| string Serialize(var obj) | |
| string t = Type(obj) | |
| if t == 'number' | |
| string s = obj | |
| return s | |
| else if t == 'bool' | |
| if obj | |
| return 'true' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| dot2tex — convert "dot2tex" code blocks to "tikz" code blocks | |
| Should be followed by diagram-generator.lua or diagram.lua in the filter chain. | |
| "dot2tex" must be installed into $PATH or it's executable filename should be | |
| provided in $DOT2TEX or dot2tex_path option. | |
| Copyright: (c) 2024 vftdan (https://github.com/Vftdan) | |
| License: MIT | |
| ]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) 2024, vftdan | |
| // SPDX-License-Identifier: MIT | |
| #include <unistd.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <limits.h> | |
| #define DEBUG_PRINT_VALUE(x, fmt) fprintf(stderr, #x " = " fmt "\n", x); fflush(stderr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| # owncast-chat2ass.sh | |
| # Copyright (c) 2023 vftdan (https://github.com/Vftdan) | |
| TimeToSeconds() { | |
| date -d "$1" +'%s.%N' | |
| } | |
| TimespanSeconds() { | |
| printf '%s\n' "$(TimeToSeconds "$2") - $(TimeToSeconds "$1")" | bc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scriptencoding utf-8 | |
| let b:keymap_name = "sunskribo" | |
| lmapclear <buffer> | |
| function! s:get_any_var(name, default) | |
| let l:g = get(g:, a:name, a:default) | |
| let l:b = get(b:, a:name, l:g) | |
| return get(w:, a:name, l:b) | |
| endfunction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python3 | |
| import sys | |
| def unquote(s): | |
| if len(s) < 2: | |
| return s | |
| if s[0] == '"' and s[-1] == '"': | |
| return s[1:-1] | |
| return s |
NewerOlder