Skip to content

Instantly share code, notes, and snippets.

View malikbenkirane's full-sized avatar

Malik Benkirane malikbenkirane

View GitHub Profile
@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'*
@malikbenkirane
malikbenkirane / reading_time.js
Created August 6, 2023 08:25
Get reading time with nodejs
const url = "https://sourcehut.org/blog/2020-04-20-prioritizing-simplitity/";
const readingTime = require('reading-time');
const innertext = require('innertext');
const https = require('https');
https.get(url, function(res) {
console.log(res.statusCode);
res.setEncoding('utf8');
res.on('data', function(data) {
alias gi="git add -i"
alias gv="git commit -v"
g() {
case $1 in
ai)
git add -i
;;
a)
git commit -v --amend
;;