Skip to content

Instantly share code, notes, and snippets.

View malikbenkirane's full-sized avatar

Malik Benkirane malikbenkirane

View GitHub Profile
@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
;;
@malikbenkirane
malikbenkirane / solarized_hex.html
Created June 21, 2023 17:58
hexadecimal and rgb solarized with vanilla javascript and html
<html>
<body>
<div style="display:flex;justify-content:space-around">
<div>
<h1>11</h1>
<div style="display:flex">
<div style="background-color:rgb(15,38,47);width:20px;height:20px"></div>
<div id="rgb_15_38_47">(15,38,47)</div>
" Essentials
let mapleader = ","
syntax on
set nu ru et
set ts=2 sts=2 sw=2
set cursorline
set hlsearch
set nocompatible
filetype off
{
"version": 1,
"notes": "",
"documentation": "stick to https://docs.qmk.fm (=\n",
"keymap": "crkbd_rev1_malik",
"keyboard": "crkbd/rev1",
"layout": "LAYOUT_split_3x5_3",
"layers": [
[
"KC_Q", "KC_W", "KC_E", "KC_R", "KC_T",
@malikbenkirane
malikbenkirane / proxy.go
Created January 15, 2021 10:35 — forked from ericflo/proxy.go
Golang TCP Proxy
package proxy
import (
"io"
"net"
"sync"
log "github.com/Sirupsen/logrus"
)