Skip to content

Instantly share code, notes, and snippets.

@mcheviron
mcheviron / main.go
Last active March 12, 2024 08:37 — forked from arturo-source/main.go
Golang array map, concurrency problem
package main
import (
"fmt"
"runtime"
"sync"
"time"
)
func Map[T1, T2 any](arr []T1, f func(item T1, index int) T2) []T2 {
@mcheviron
mcheviron / open-kitty.py
Created May 26, 2022 11:34 — forked from aunetx/open-kitty.py
A nautilus extension to open kitty in the current directory, instead of gnome-terminal.
# placed in ~/.local/share/nautilus-python/extensions/open-kitty.py
# you will need the package nautilus-python on fedora, or python-nautilus on ubuntu...
# french version
# translate and enjoy
import os
try:
from urllib import unquote
except ImportError:
from urllib.parse import unquote