Skip to content

Instantly share code, notes, and snippets.

View barmic's full-sized avatar

Michel barmic

  • Grenoble
View GitHub Profile
@barmic
barmic / catppuccin-mocha.css
Created June 20, 2026 20:11
Thème linuxfr
@charset "UTF-8";
/* Thème sombre Catppuccin (variante Mocha) pour LinuxFr.org */
/* Palette : https://github.com/catppuccin/catppuccin */
/* Distributed under GNU AGPL v3 License */
/* == Palette Catppuccin Mocha == */
/* == Mapping des constantes du thème de base vers la palette == */
/* Copyright 2010 Eve Schoonbroodt (design) https://www.studiomagenta.be/ */
/* Copyright 2010 Nicolas Schoonbroodt (css) <nicolas@elsewhere.be> */
/* Distributed under GNU AGPL v3 License */
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
@barmic
barmic / gist:f00f8bcc0ba73273ad29358c96a05565
Last active February 2, 2026 09:24
Règles de plonkage linuxfr
! Plonkage linuxfr
! Version: 2026-02-01
! hellpe
! https://linuxfr.org/users/san_guickoo/journaux/retour-d-experience-sur-le-developpement-d-une-application-par-l-utilisation-d-ia#comment-2012107
linuxfr.org##li.comment:has(a[href^="/users/hellpe"])
html body#users-show.logged.visitor section#container.container main#contents article.node.hentry.score8.diary.new-node header div.meta span.posted_by_spanblock a
linuxfr.org##article:has(a[href^="/users/hellpe"])
@barmic
barmic / chalenge.py
Created August 25, 2022 20:53
python chalenge
def find_quadruplet_sum(numbers, target):
'''
Finds four integers within `numbers` whose sum amounts to
exactly `target`, and returns them.
There will always be a valid quadruplet, and the same number
can be picked several times.
'''
for a in numbers:
for b in numbers:
#!/bin/zsh
c=$(git branch | grep -c -- "$1")
if [[ "$c" -eq 1 ]]; then
git checkout $(git branch | grep -- "$1")
else
echo "Pattern \"$1\" is ambigus"
git branch | grep --color -- "$1"
fi
@barmic
barmic / HealthCheck.java
Last active February 16, 2025 22:49
Healthcheck
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class HealthCheck {
public static void main(String[] args) {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
@barmic
barmic / autofill.js
Last active August 14, 2020 06:46
userscript
// ==UserScript==
// @name AutoFill Push
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://qlf-sun-admin.sfr.com/sun/push/ng/bundles/*/campaigns/add/*
// @match https://sun-admin.sfr.com/sun/push/ng/bundles/*/campaigns/add/*
// @match https://dev-sun-admin.inovatel.com/sun/push/ng/bundles/*/campaigns/add/*
// @grant none
@barmic
barmic / tarsnap.sh
Created April 13, 2020 14:25
Tarsnap config
#!/bin/bash
# install in /etc/NetworkManager/dispatcher.d/02tarsnap
IF=$1
STATUS=$2
RETENTION_DAYS=7
RETENTION_COUNT=5
[[ "$STATUS" != 'up' ]] && exit
@barmic
barmic / doodle.txt
Created December 19, 2019 08:48
Doodle Noël 2020
Non je rigole on va attendre un peu tout de même ;)
@barmic
barmic / plouf
Created December 12, 2019 14:44
Disséquer un APK pour trouver une API de météo
https://pastebin.com/raw/u67CjRJZ
sub MAIN ($length){say (1...$length).map({("*" x $length).comb.join("_").subst(/\*_/," ", :x($length-$_))}).join("\n")}