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
| # https://www.freedesktop.org/software/systemd/man/systemd.unit.html | |
| [Unit] | |
| Description=My App | |
| After=network.target | |
| # https://www.freedesktop.org/software/systemd/man/systemd.exec.html | |
| [Service] | |
| Type=simple | |
| # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#WorkingDirectory= | |
| WorkingDirectory=-/srv/app/ |
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
| import { Browser, chromium, firefox, webkit } from "playwright"; | |
| import { afterAll, beforeAll, describe, it } from "vitest"; | |
| const browserTypes = process.env.ALL_BROWSERS | |
| ? [chromium, firefox, webkit] | |
| : [chromium]; | |
| for (const browserType of browserTypes) { | |
| describe(`browser:${browserType.name()}`, () => { | |
| let browser: Browser; |
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
| import { parse } from 'parse5' | |
| import { adapter } from 'parse5-htmlparser2-tree-adapter' | |
| import xpath from 'xpath' | |
| const html = '...' | |
| const selector = '...' | |
| const doc = parse(html, { treeAdapter: adapter }) | |
| const htmlEl = doc.childNodes.find(c => c.name === 'html') |
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
| // ==UserScript== | |
| // @name Dark NixOS Package, Wiki and Main Site | |
| // @namespace http://userstyles.org | |
| // @description Darkened NixOS Websites, includes Wiki and Package Search | |
| // @author Thomas Leon Highbaugh | |
| // @homepage https://userstyles.org/styles/163453 | |
| // @match http://nixos.org/* | |
| // @match https://nixos.org/* | |
| // @match http://*.nixos.org/* | |
| // @match https://*.nixos.org/* |
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
| ---Utility for keymap creation. | |
| ---@param lhs string | |
| ---@param rhs string|function | |
| ---@param opts string|table | |
| ---@param mode? string|string[] | |
| local function keymap(lhs, rhs, opts, mode) | |
| opts = type(opts) == 'string' and { desc = opts } | |
| or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr }) | |
| mode = mode or 'n' | |
| vim.keymap.set(mode, lhs, rhs, opts) |
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
| #Requires AutoHotkey v2 | |
| ; Install the keyboard hook to capture the real key state of the keyboard | |
| InstallKeybdHook(true) | |
| ; Disable the CapsLock key | |
| SetCapsLockState("alwaysoff") | |
| ; Send esc key when Capslock is pressed as default | |
| g_DoNotAbortSendEsc := true | |
| $*Capslock::{ ; Capture CapsLock key press | |
| global g_DoNotAbortSendEsc ; use global variable g_DoNotAbortSendEsc |
OlderNewer