Skip to content

Instantly share code, notes, and snippets.

@erenon
erenon / rewrite_rust_errors.py
Created July 19, 2022 09:39
Replace matching patterns at the specified locations
#!/bin/python
# Replace matching patterns at the specified locations
#
# On stdin it expects locations (as reported by the rustc compiler):
#
# --> path/to/file.rs:line:col
#
# Lines not matching this pattern are ignored:
@erenon
erenon / .config_sway_config
Created January 20, 2023 16:21
Sway sessions à la tmux
set $mode_session session [s]elect [r]ename [f]latten
bindsym $mod+s mode "$mode_session"
mode "$mode_session" {
bindsym s exec --no-startup-id ~/bin/way_select_session.py, mode "default"
bindsym r exec --no-startup-id ~/bin/way_rename_workspace.py, mode "default"
bindsym f exec --no-startup-id ~/bin/way_flatten_sessions.py, mode "default"
bindsym Escape mode "default"
bindsym Return mode "default"
}
V=2;
W=15;
D=30;
H1=50;
cube([D, V, W]);
cube([D, H1, V]);
difference() {
cube([V, H1, W]);