Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env lua
local type = type
local print = print
local pcall = pcall
local select = select
local string = string
local io = io
local string_format = string.format
@SkyyySi
SkyyySi / ihk-fixes.user.styl
Last active January 6, 2025 16:02
Ein UserCSS / UserStyle, um die Webseite der Niederrheinischen IHK zumindest ein bisschen weniger fürchterlich zu machen.
/* ==UserStyle==
@name IHK Azubiheft Fix
@namespace github.com/SkyyySi
@version 1.0.0
@description Ein UserCSS / UserStyle, um die Webseite der Niederrheinischen IHK zumindest ein bisschen weniger fürchterlich zu machen.
@author SkyyySi
@preprocessor stylus
==/UserStyle== */
$header_padding = 1em

Microsoft Management Console (mmc)

Syntax

For starting a Snap-In from CMD, stored in an arbitrary directoy:

C:\> "%windir%\System32\mmc.exe" "<path>\<filename>.msc"
local getmetatable = getmetatable
local type = type
local assert = assert
local rawget = rawget
---@class private
local _M = {}
--- A helper function to check whether the type of a given parameter is correct,
--- generating an error message if it is not.
@SkyyySi
SkyyySi / gtk.css
Created October 22, 2023 17:58
Dracula for GTK4 / libadwaita applications
/*
Generated with Gradience
Issues caused by theming should be reported to Gradience repository, and not to upstream
https://github.com/GradienceTeam/Gradience
*/
@define-color accent_color #bd93f9;
@define-color accent_bg_color #bd93f9;
@SkyyySi
SkyyySi / get-battery.lua
Last active October 18, 2023 16:43
A standalone script to get the current charging percentage of your device's battery, written in Lua. Requires LGI. Linux only (maybe BSD too; probably not, though).
#!/usr/bin/env luajit
local script_version = "1.1.1"
local lgi = require("lgi")
local GLib = lgi.GLib
local UPowerGlib = lgi.UPowerGlib
local function get_battery()
for _, device in pairs(UPowerGlib.Client():get_devices()) do
@SkyyySi
SkyyySi / rc.moon
Last active February 8, 2023 22:06
Port of awesome wm's rc.lua to moonscript
-- If LuaRocks is installed, make sure that packages installed through it are
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
pcall require, "luarocks.loader"
awesome = awesome ---@type awesome
screen = screen ---@type screen
client = client ---@type client
awful = require "awful" ---@type awful
gears = require "gears" ---@type gears
@SkyyySi
SkyyySi / button.lua
Created January 26, 2023 16:50
A wibox.container for turning any widget into a button. For awesomewm.
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
---@class wibox.container.button : wibox.container.background
---@operator call(table): wibox.container.button._instance
---@field private _private table
local button = {}
button.mt = {}
setmetatable(button, button.mt)
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local lgi = require("lgi")
local dpi = beautiful.xresources.apply_dpi
local modkey = modkey or "Mod4"
local spacing = dpi(8)
local font_size = " "..tostring(math.floor(dpi(8)+0.5))
import modules.scripts as scripts
import gradio as gr
import os
from modules import images
from modules.processing import process_images, Processed
from modules.processing import Processed
from modules.shared import opts, cmd_opts, state