Skip to content

Instantly share code, notes, and snippets.

View barmic's full-sized avatar

Michel barmic

  • Grenoble
View GitHub Profile
@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")}
@barmic
barmic / DLFPNoKarma.js
Created August 31, 2019 18:41
DLFP scripts
// ==UserScript==
// @name DLFPNoKarma
// @namespace DLFPNoKarma
// @version 0.1
// @description https://linuxfr.org/users/peetah/journaux/plonk
// @author You
// @match https://linuxfr.org/*
// @grant none
// @run-at document-body
// ==/UserScript==
@barmic
barmic / plouf.c
Created May 28, 2019 13:58
plouf
register short *to, *from;
register count;
{
register n=(count+7)/8;
switch(count%8){
case 0: do{ *to = *from++;
case 7: *to = *from++;
case 6: *to = *from++;
case 5: *to = *from++;
case 4: *to = *from++;
@barmic
barmic / docke-compose.yml
Created May 27, 2019 11:59
deploiement barmic.eu
version: '3'
services:
loadbalancer:
image: traefik:1.7
restart: always
command: --api --docker
ports:
- "80:80"
- "8080:8080"
volumes:
@barmic
barmic / amqpcat.py
Last active April 29, 2019 12:39
amqpcat
#!/usr/bin/env python3
from yaml import safe_load_all, dump
import sys
import pika
def serialize(channel, method, props, body):
msg={'body': body.decode('utf-8'), 'headers': props.headers, 'routingkey': method.routing_key}
dump(msg, sys.stdout, default_flow_style=False)
sys.stdout.write('---\n')
@barmic
barmic / Hello.java
Created August 5, 2018 09:08
HelloWorld Atlas
import info.q37.atlas.*;
class Hello extends Atlas {
public void handle( DOM dom, String action, String id )
{
String head =
"<title>\"Hello, World !\" example</title>" +
"<style type=\"text/css\">" +
" html, body { height: 100%; padding: 0; margin: 0; }" +
" .vcenter-out, .hcenter { display: table; height: 100%; margin: auto; }" +
@barmic
barmic / .gitconfig
Created June 6, 2018 12:09
Configuration git
[user]
name = Michel Barret
email = michel.barret@inovatel.com
[push]
default = simple
[alias]
st = status --short --branch
co = checkout
br = branch
fetch = fetch --prune
@barmic
barmic / idea.sh
Created May 18, 2018 09:34
Run idea
#!/bin/zsh
IDEA_SCRIPT=$(print -l /opt/idea-IU-*/bin/idea.sh | sort | tail -n1)
/usr/local/bin/reset-signal "${IDEA_SCRIPT}" &> /dev/null &
@barmic
barmic / tuto.md
Last active April 5, 2022 07:51
Authentification par certificat avec nginx

Pour mettre en place une authentification par certificat avec nginx comme reverse proxy.

Création des certificats

Créer l'authorité de certification

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt