Skip to content

Instantly share code, notes, and snippets.

View oalders's full-sized avatar
🚀
https://www.olafalders.com/2025/05/28/enhancing-sketchybar-with-is-battery/

Olaf Alders oalders

🚀
https://www.olafalders.com/2025/05/28/enhancing-sketchybar-with-is-battery/
View GitHub Profile
@oalders
oalders / upgrade-hugo.md
Created May 24, 2025 16:31
perl.com Hugo Upgrade Strategy Suggestions

Hugo 0.59.1 to Latest Version Upgrade Guide

Looking at the Hugo version jump from 0.59.1 (released in September 2019) to the current latest version (0.147.5, released May 2025), you'll need to handle several major breaking changes that accumulated over 5+ years of development.

Major Breaking Changes to Address

1. Configuration File Changes

Hugo now prefers hugo.toml over config.toml as the primary configuration file name. While config.toml still works as a fallback, updating to hugo.toml aligns with current best practices and avoids potential conflicts in multi-framework setups.

@oalders
oalders / throwdown.md
Last active May 2, 2025 08:52
PTS 2025 CLI Throwdown

Paul

  • WezTerm
  • yazi
  • tmux powerline
  • tailscale
  • neovim
    • git-signs
      • stage lines
  • SmoothCursor
@oalders
oalders / yolo.js
Created April 16, 2025 20:23
Load GitHub Pr Hidden Converations
(async function clickAllLoadMoreButtons() {
const delay = ms => new Promise(res => setTimeout(res, ms));
const selector = 'button.ajax-pagination-btn';
let attempts = 0;
const maxAttempts = 50; // Stop after 50 attempts
// Set up MutationObserver to detect DOM changes and watch for 'Load more...' buttons
const observer = new MutationObserver(async function(mutationsList, observer) {
// Stop observing once max attempts are reached
if (attempts >= maxAttempts) {
@oalders
oalders / copilot-prompts.md
Last active November 7, 2024 18:36
Copilot Prompts

Prompts for Copilot

All code

Always show me just the code changes, unless I specifically ask for the entire file.

Go

@oalders
oalders / sort-perl-imports.pl
Created September 9, 2024 00:25
Sort Perl imports
#!/usr/bin/env perl
# find lib ! -type d | xargs -n1 bin/sort-imports.pl
# find t ! -type d | xargs -n1 bin/sort-imports.pl
use strict;
use warnings;
use Path::Tiny qw( path );
@oalders
oalders / gist:5bf7cf84e1c1b17e746d53931b9d290e
Created July 12, 2023 01:13
WEZTERM_LOG=wgpu_hal=trace,wezterm_gui::termwindow::webgpu=trace,info wezterm -n --config 'enable_wayland=false'
21:12:22.939 WARN window::os::x11::connection > Unable to resolve appearance using xdg-desktop-portal: get_appearance.read_setting: Reading xdg-portal org.freedesktop.appearance color-scheme: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files
21:12:22.978 INFO wgpu_hal::vulkan::instance > Unable to find extension: VK_EXT_swapchain_colorspace
21:12:22.982 INFO wgpu_hal::vulkan::instance > Instance version: 0x4020a2
21:12:22.982 INFO wgpu_hal::vulkan::instance > Enabling device properties2
21:12:22.984 DEBUG wgpu_hal::gles::egl > Client extensions: [
"EGL_EXT_device_base",
"EGL_EXT_device_enumeration",
"EGL_EXT_device_query",
"EGL_EXT_platform_base",
"EGL_KHR_client_get_all_proc_addresses",
@oalders
oalders / gist:cdffb9cb584e48c52f7ca358cec23140
Created July 11, 2023 22:13
WEZTERM_LOG=wezterm_gui::termwindow::webgpu=trace,info wezterm -n --config 'enable_wayland=false'
18:13:19.817 WARN window::os::x11::connection > Unable to resolve appearance using xdg-desktop-portal: get_appearance.read_setting: Reading xdg-portal org.freedesktop.appearance color-scheme: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files
18:13:19.929 TRACE wezterm_gui::termwindow::webgpu > Using adapter: AdapterInfo { name: "virgl (Mesa DRI Intel(R) UHD Graphics 615 (AML-KBL))", vendor: 65541, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Gl }
18:13:19.929 TRACE wezterm_gui::termwindow::webgpu > caps: SurfaceCapabilities { formats: [Rgba8UnormSrgb, Bgra8UnormSrgb, Rgba8Unorm, Bgra8Unorm, Rgba16Float], present_modes: [Fifo], alpha_modes: [Opaque] }
18:13:19.929 TRACE wezterm_gui::termwindow::webgpu > downlevel_caps: DownlevelCapabilities { flags: DownlevelFlags(COMPUTE_SHADERS | FRAGMENT_WRITABLE_STORAGE | INDIRECT_EXECUTION | BASE_VERTEX | NON_POWER_OF_TWO_MIPMAPPED_TEXTURES | CUBE_ARRAY_TEXTURE
16:41:04.259 TRACE config::config > consider config: /home/olaf/.wezterm.lua
16:41:04.259 TRACE config::config > consider config: /home/olaf/.config/wezterm/wezterm.lua
16:41:04.259 TRACE async_io::driver > block_on()
16:41:04.291 TRACE async_io::driver > block_on: completed
16:41:04.291 TRACE polling::epoll > add: epoll_fd=5, fd=7, ev=Event { key: 18446744073709551615, readable: false, writable: false }
16:41:04.291 TRACE polling::epoll > add: epoll_fd=5, fd=6, ev=Event { key: 18446744073709551615, readable: true, writable: false }
16:41:04.291 TRACE polling::epoll > new: epoll_fd=5, event_fd=6, timer_fd=Some(7)
16:41:04.291 TRACE async_io::driver > main_loop: waiting on I/O
16:41:04.291 TRACE async_io::reactor > process_timers: 0 ready wakers
16:41:04.292 TRACE polling > Poller::wait(_, None)
@oalders
oalders / gist:58977120631e5fa157f93be4427472d1
Created July 11, 2023 18:22
wezterm debugging part deux
14:20:54.310 TRACE config::config > consider config: /home/olaf/.wezterm.lua
14:20:54.310 TRACE config::config > consider config: /home/olaf/.config/wezterm/wezterm.lua
14:20:54.311 TRACE async_io::driver > block_on()
14:20:54.337 TRACE async_io::driver > block_on: completed
14:20:54.337 TRACE polling::epoll > add: epoll_fd=5, fd=7, ev=Event { key: 18446744073709551615, readable: false, writable: false }
14:20:54.337 TRACE polling::epoll > add: epoll_fd=5, fd=6, ev=Event { key: 18446744073709551615, readable: true, writable: false }
14:20:54.337 TRACE polling::epoll > new: epoll_fd=5, event_fd=6, timer_fd=Some(7)
14:20:54.337 TRACE async_io::driver > main_loop: waiting on I/O
14:20:54.337 TRACE async_io::reactor > process_timers: 0 ready wakers
14:20:54.337 TRACE polling > Poller::wait(_, None)
log_unknown_escape_sequences: false,
integrated_title_button_alignment: Right,
integrated_title_button_style: Windows,
integrated_title_button_color: Auto,
font_dirs: [],
color_scheme_dirs: [],
dpi: None,
font: TextStyle {
font: [
FontAttributes {