Skip to content

Instantly share code, notes, and snippets.

View oalders's full-sized avatar
🚀
https://www.olafalders.com/2024/08/28/i-am-still-lazy/

Olaf Alders oalders

🚀
https://www.olafalders.com/2024/08/28/i-am-still-lazy/
View GitHub Profile
@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 {
feature_code country_code country_name
PCL GG Guernsey
PCL IM Isle of Man
PCL JE Jersey
PCLD AI Anguilla
PCLD AX Åland Islands
PCLD BM Bermuda
PCLD BV Bouvet Island
PCLD CC Cocos [Keeling] Islands
PCLD CX Christmas Island
@oalders
oalders / dzil-docker.md
Last active March 3, 2023 23:28
dzil via Docker
@oalders
oalders / setup.sh
Created January 6, 2023 20:14
Testing Rails apps in Docker (unzip archive in the container)
#!/bin/bash
# Create an empty dir which contains only the .zip file of your app
# Copy this file to your app dir
# Save it as `setup.sh`
# Then run it via:
# docker run --rm -it -p 3000:3000 --volume $PWD:/sandbox ruby:3.2.0-bullseye ./sandbox/setup.sh
set -eux