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
#-------------------------------------------------- | |
# 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 |
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
---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 |
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
; 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 |
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
;;;;;;;;;;;;;;;;;;; | |
;; == 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) |
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
.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; */ |
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
[core] | |
autocrlf = input | |
eol = lf | |
editor = vim | |
pager = delta | |
[push] | |
autoSetupRemote = true | |
[pull] | |
rebase = true | |
[merge] |
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
--[[ | |
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' |
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 fixNewsletterLabels() { | |
const LABEL_NAME = PropertiesService.getScriptProperties().getProperty('root label') ?? "newsletters" | |
let rootLabel = GmailApp.getUserLabelByName(LABEL_NAME) | |
// Get the "newsletters" label and all labels under it | |
let newsLabelsNames = GmailApp.getUserLabels() | |
.map(label => label.getName()) | |
.filter(labelName => labelName.startsWith(LABEL_NAME + "/")); | |
let query = "-label:newsletters "; |
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
# Write-Host -ForegroundColor Green 'Measuring...' | |
$stopWatch = [System.Diagnostics.Stopwatch]::new() | |
$stopWatch.Start() | |
[System.Collections.ArrayList] $stops = @() | |
[double] $last = 0.0 | |
function stop($descr) { | |
$t = $stopWatch.Elapsed.TotalMilliseconds | |
$d = $t - $last | |
[void] $stops.Add([PSCustomObject]@{ | |
Accumulated = "`e[36m$t`e[0m" |
NewerOlder