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
| <# | |
| .SYNOPSIS | |
| Bulk-set GitHub repos to private using GitHub CLI (gh), with filters. | |
| .DESCRIPTION | |
| Evaluates repositories for one or more GitHub owners and sets matching public repositories to private. | |
| By default, a repository is selected when ANY of the following is true: | |
| - stale last push date | |
| - empty repository | |
| - low recent commit activity |
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 function positionalHashing(hexString) | |
| local finalNumber = 0 | |
| for i = 1, #hexString do | |
| local char = hexString:sub(i, i) | |
| local numValue = tonumber(char, 16) or 0 | |
| finalNumber = (finalNumber + (numValue * i)) % (2 ^ 53) | |
| end | |
| return finalNumber | |
| end | |
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 Theros <https://github.com/therosin> | |
| -- | |
| -- This file is part of LuaWorldStateSystem. | |
| -- | |
| -- LuaWorldStateSystem is free software: you can redistribute it and/or modify | |
| -- it under the terms of the GNU General Public License as published by | |
| -- the Free Software Foundation, either version 3 of the License, or | |
| -- (at your option) any later version. | |
| -- | |
| -- LuaWorldStateSystem is distributed in the hope that it will be useful, |
The createTypedPipeline utility allows you to construct and execute a sequence of stages, where each stage performs a transformation or operation on input data, potentially resulting in a new output type. It supports both synchronous and asynchronous stages, making it suitable for a wide range of data processing tasks.
- Type Safety: Ensures the inputs and outputs of stages are correctly typed.
- Context Sharing: A shared context (
ctx) object is passed through stages, allowing for state sharing and error collection. - Flexible Error Handling: Configurable behavior to either halt execution on errors or continue, logging errors to the context for later handling.
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 os | |
| import platform | |
| from PIL import Image, ImageDraw, ImageFont | |
| import click | |
| # where is your eBook library located? (uses current directory by default) | |
| EBOOK_LIBRARY_PATH = "." | |
| # Should we create an image or just print the ASCII art? | |
| CREATE_IMAGE = 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
| function createDocumentMouseTracker(document) { | |
| /** | |
| * store the current mouse position in a data attribute so it can be read by CSS. | |
| */ | |
| const updateMouseTracking = (e) => { | |
| document.documentElement.dataset.mouseX = Math.round(e.clientX); | |
| document.documentElement.dataset.mouseY = Math.round(e.clientY); | |
| } | |
| document.enableMouseTracking = () => { |
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
| /** | |
| * Creates a scroll tracker for the given document. | |
| * @param {Document} document - the document to track | |
| */ | |
| function createDocumentScrollTracker(document) { | |
| /** | |
| * store the current scroll position in a data attribute so it can be read by CSS. | |
| */ | |
| const updateScrollTracking = () => { | |
| document.documentElement.dataset.scrollX = Math.round(window.scrollX); |
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
| /** | |
| * debounce a callback function. | |
| * @param {function} fn - the function to debounce | |
| * @returns {function} - the debounced function | |
| */ | |
| const debounce = (fn) => { | |
| let frame; | |
| return (...params) => { | |
| if (frame) { cancelAnimationFrame(frame); } |
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 M = { | |
| _NAME = 'mWebClient', | |
| _VERSION = '0.1-dev', | |
| _DESCRIPTION = [[ | |
| Provides Basic GET/POST Supprt for CE3 Game Modules | |
| the lua environment found in CE3 games doesnt allow for loading common dll based http libraries | |
| this module attempts to get around this by using native windows powershell calls and coroutines | |
| ]], | |
| _AUTHOR = "Theros <theros@svaltek.xyz" | |
| } |
NewerOlder