Skip to content

Instantly share code, notes, and snippets.

View diogotito's full-sized avatar

diogotito diogotito

View GitHub Profile
@diogotito
diogotito / Grid.cs
Created September 2, 2025 17:20
A CodeLab BitmapEffect that draws a grid in Paint.NET
// Name: Grid
// Submenu: AAAAAAAA
// Author: Diogo Marques
// Title: Grid
// Version: 0.01
// Desc: Renders a grid
// Keywords:
// URL:
// Help:
@diogotito
diogotito / BitmapEffect_ProceduralTarget.cs
Last active September 2, 2025 14:26
A CodeLab BitmapEffect that draws a pixel art target in Paint.NET
// Name: Procedural Target
// Submenu: AAAAAAAA
// Author: Diogo Marques
// Title: Procedural Target
// Version: 0.01
// Desc: Draws a pixel art target, procedurally. Recommended image size: 17x17
// Keywords:
// URL: https://gist.github.com/diogotito/0149dc2dc120c4b06ff5a2628993a004
// Help:
@diogotito
diogotito / decorated_task.rb
Last active August 21, 2025 16:28
Crake - Cursed Ruby make. Demonstrates why class variables aren't recommended, I guess
#--------------------------------------------------
# fake Rake
#--------------------------------------------------
module TaskRunner
Task = Data.define *%i| name reqs recipes | do
@@tasks = {}
def run
reqs.each { @@tasks[it]&.run }
recipes.each { |recipe| recipe.call(self) }
@@tasks.delete(name) # Don't repeat this Task
@diogotito
diogotito / _rgb555_slider.lua
Last active July 29, 2025 23:35
Aseprite RGB555 color picker script
---Update red, green or blue color gradient in in RGB555 space
---@param t table The table with the 32 shades of the gradient
---@param base_color Color The color to base the gradient on
---@param channel "red"|"green"|"blue" The name of one of `Color`'s channels
local function make_channel_gradient555(t, base_color, channel)
for i555 = 0, 31 do
local color = Color(base_color)
color[channel] = (i555 << 3) + (i555 >> 2)
t[i555] = color
end
@diogotito
diogotito / sidebar.css
Last active October 20, 2025 12:01
Sideberry custom CSS + a userChrome.css to hide surrounding panel UI elements when the Sidebery panel is active
#root.root {--tabs-border-radius: 8px;}
#root.root[data-toolbar-color-scheme="light"] {
--btw-the-inactive-bg-is: rgb(235, 235, 239);
--btw-ff-light: rgb(235, 235, 239);
--frame-bg: var(--btw-ff-light);
--toolbar-bg: var(--btw-ff-light);
--toolbar-fg: rgb(91,91,102);
}
#root.root[data-toolbar-color-scheme="dark"] {
--frame-bg: rgb(28, 27, 34);
@diogotito
diogotito / My Disks.ini
Last active March 12, 2025 02:40
Rainmeter skin that shows drive usage
; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------
; HOWTO: Adding more disks
; ----------------------------------
; Adding more disks is a pretty straightforward process. Follow the following steps to turn
; this 2 disks skin into a 3 disks skin. You can then extend it even further as you wish.
;
; 1) Create a new variable called disk3=X: directly below disk2=D: in the [Variables] section
@diogotito
diogotito / Layer Section (Japan) (6M).ss.cfg
Last active March 7, 2025 04:56
Mednafen per-game override configuration for Layer Section AKA Rayforce AKA Galactic Attack AKA Gunlock for the SEGA Saturn, with custom DualShock 4 mappings for ergonomic in-game controls and save scumming
;;;;;;;;;;;;;;;;;;;
;; == Visuals == ;;
;;;;;;;;;;;;;;;;;;;
; Stretch to fill screen.
; Default: aspect_mult2 - Aspect Preserve + Integer Multiple-of-2 Scale
; aspect_int - Aspect Preserve + Integer Scale: Full-screen stretch, same as "aspect" except that the equivalent xscalefs and yscalefs are rounded down to the nearest integer.
ss.stretch aspect_int
;Enable scanlines with specified opacity. (0 makes them invisible)
@diogotito
diogotito / azul.css
Last active February 5, 2025 17:37
Obsidian CSS snippet to make some CSS color variables from the default theme match the color scheme of my i3 setup
.theme-dark.mod-linux {
--azul-i3-1: #262a32;
--azul-i3-2: #32343d;
--azul-i3-3: #3d4150;
--azul-i3-4: #4d586e;
--color-base-00: #1e1e1e; /* #1e1e1e; */
--color-base-10: #242424; /* #242424; */
--color-base-20: var(--azul-i3-1); /* #262626; */
--color-base-25: #2a2a2a; /* #2a2a2a; */
[core]
autocrlf = input
eol = lf
editor = vim
pager = delta
[push]
autoSetupRemote = true
[pull]
rebase = true
[merge]
@diogotito
diogotito / init.lua
Last active February 5, 2025 17:40
Minimal Neovim init.lua
--[[
I'm actually interested in moving to Lazyvim if I ever adopt Neovim as my main development editor.
This is just for some light editing sesions in the terminal
--]]
-- Don't load Vim plugins installed with pacman
vim.opt.rtp:remove('/usr/share/vim/vimfiles')
-- Gosh I can't unlearn this habit!
local cursed_esc = 'jk'