Skip to content

Instantly share code, notes, and snippets.

View malikbenkirane's full-sized avatar

Malik Benkirane malikbenkirane

View GitHub Profile
package main
import (
"fmt"
"strconv"
)
// An interface lets you avoid dealing directly with concrete types.
type i0 interface {
plus1() int
@malikbenkirane
malikbenkirane / config.toml
Last active March 3, 2026 10:21
Helix Editor config
[editor]
cursorline = true
line-number = "relative"
[editor.lsp]
display-inlay-hints = true
# [editor.soft-wrap]
# enable = true
@malikbenkirane
malikbenkirane / v3_commit.txt
Created February 16, 2026 12:46
An attempt of a "good commit" message prompt.
You will be analyzing a git diff and generating a well-structured commit message following conventional commit guidelines.
Here is the git diff to analyze:
<git_diff>
</git_diff>
Here is additional context about the change:
<context>
@malikbenkirane
malikbenkirane / hints.txt
Created February 14, 2026 07:50
idevicerestore homebrew hints
TLDR;
git clone https://github.com/libimobiledevice/idevicerestore
mkdir -p limd-build
cd limd-build
curl -o ./limd-build-macos.sh -L https://is.gd/limdmacos
bash ./limd-build-macos.sh
Manual build
@malikbenkirane
malikbenkirane / client.conf
Last active February 10, 2026 11:36
Wireguard Wg-quick
[Interface]
Address = # e.g. 10.20.10.2/24
ListenPort = 33333
DNS = 8.8.8.8
PrivateKey = # ...
[Peer]
PublicKey = # server.conf public key
Endpoint = # server IP:PORT
AllowedIPs = # e.g. 10.20.10.0/24 or 0.0.0.0/0
@malikbenkirane
malikbenkirane / Powershell env
Created February 7, 2026 08:59
Windows Powershell ssh-keygen / Tailscale
$env:USERPROFILE\.ssh\SSH_PRIVATE_KEY
# instead of C:\Users\USERNAME.ssh\SSH_PRIVATE_KEY
@malikbenkirane
malikbenkirane / hey_marimo.py
Created February 2, 2026 20:38
Marimo Demo #1
import marimo
__generated_with = "0.19.7"
app = marimo.App(width="medium")
@app.cell
def _():
import pandas as pd
import pyarrow
@malikbenkirane
malikbenkirane / listen.go
Created January 31, 2026 21:50
PostgreSQL's LISTEN/NOTIFY mechanism can be used with Go to implement a simple publish/subscribe (pub/sub) system for inter-process communication.
package main
import (
"context"
"fmt"
"log"
"://github.com"
"://github.com/pgconn"
)
@malikbenkirane
malikbenkirane / gist:d51c2aadc68715eb0e6863cb6e73922c
Created December 28, 2025 19:46
mm/mattermost docker single container
container kill mattermost-tbot
container rm mattermost-tbot
container volume delete mattermost-tbot-data
container volume delete mattermost-tbot-logs
container volume delete mattermost-tbot-plugins
container volume delete mattermost-tbot-db
container volume delete mattermost-tbot-config
container volume create mattermost-tbot-data
#!/bin/sh -e
rm -vrf ~/Library/Preferences/Ableton/
rm -vrf ~/Library/Preferences/Ableton/
rm -vrf ~/Library/Application Support/Ableton/
rm -vrf ~/Library/Caches/Ableton/
rm -vrf ~/Library/Preferences/com.ableton.live.*
rm -vrf ~/Library/Application Support/Propellerhead Software/ReWire/'Ableton Live Engine'*