Skip to content

Instantly share code, notes, and snippets.

@gni
gni / color-debugger.js
Created August 18, 2025 08:51
Color debugger vite tailwindcss
(function () {
'use strict';
var ENABLED = new URLSearchParams(location.search).has('debugColors') || localStorage.getItem('__debug_colors__') === '1';
var state = {
enabled: ENABLED,
frozen: null,
panel: null,
hover_box: null,
@gni
gni / soft-virt-osx.md
Created May 11, 2025 10:42
Faire tourner un ancien logiciel macOS Intel sur un Mac Apple Silicon (via UTM)

Faire tourner un ancien logiciel macOS Intel sur un Mac Apple Silicon (via UTM)


✅ 1. Préparer ton Mac Apple Silicon (terminal)

1.1 Installer les outils Apple :

xcode-select --install
@gni
gni / symboles-programmation.md
Last active March 10, 2025 15:34
Cheat Sheet Ultime des Symboles en Programmation

Cheat Sheet Ultime des Symboles en Programmation

🔍 Langages couverts :

📌 Python | 📌 JavaScript | 📌 Java | 📌 C / C++ | 📌 C# | 📌 PHP | 📌 SQL | 📌 Bash | 📌 TypeScript | 📌 Rust | 📌 Go | 📌 Ruby


1️⃣ Délimiteurs et Séparateurs

Symbole Nom en français Nom en anglais Langages Utilisation
() Parenthèses Parentheses Tous Appels de fonction, expressions
@gni
gni / proxmox cloud init.sh
Created December 8, 2024 18:59
Proxmox cloud init setup
wget https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img
apt install guestfs-tools
virt-customize -a noble-server-cloudimg-amd64.img --install qemu-guest-agent
qm create 9000 --name ci-template --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
qm set 9000 --scsi0 local-lvm:0,import-from=/home/cloudinit/noble-server-cloudimg-amd64.img
qm set 9000 --ide2 local-lvm:cloudinit
qm set 9000 --boot order=scsi0
qm set 9000 --serial0 socket --vga serial0
qm template 9000
@gni
gni / gitlab-group-privacy.py
Created November 9, 2023 20:34
Ce script Python est conçu pour faciliter la gestion des paramètres de visibilité des projets et groupes sur GitLab.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script Name: gitlab-group-privacy.py
Auteur: Lucian BLETAN
Date de création: 09 Novembre 2023
Dernière modification: 09 Novembre 2023
Description:
@gni
gni / network docker
Created April 19, 2020 03:27
docker
docker network create --subnet=30.1.0.0/16 --ip-range=30.1.0.0/24 mynetwork
docker run --net=mynetwork --ip=30.1.1.1 --name=myservice1 xxxx
docker run --net=mynetwork --ip=30.1.1.2 --name=myservice2 yyyy
@gni
gni / mongo to pandas
Created November 26, 2019 21:12
mongo to pandas df
import pandas as pd
from pymongo import MongoClient
client = MongoClient("mongodb://localhost:27017")
db = client.database_Name
collection_conn = db['collection_name']
collection_cursor = collection_conn.find()
collection_pandas_df = pd.DataFrame(list(collection_cursor))
#!/bin/bash
URL=$1
FILENAME=${URL##*/}
FONT_DIR=/usr/share/fonts/truetype/custom/
echo $FILENAME
echo $FONT_DIR
echo "Start install"
@gni
gni / css.css
Last active May 13, 2025 21:07
css
html {
box-sizing: border-box
}
*, *:before, *:after {
box-sizing: inherit
}
html {
-ms-text-size-adjust: 100%;
@gni
gni / keybase
Last active October 25, 2022 22:41
# Editing out all the echoes...
killall Keybase
fusermount -uz /keybase
killall kbfsfuse
killall keybase
keybase ctl stop
pkill Keybase