Skip to content

Instantly share code, notes, and snippets.

Alexis Madrzejewski madrzejewski

Block or report user

Report or block madrzejewski

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View cv.tex
% Exemple de CV utilisant la classe moderncv
% Style classic en bleu
% Article complet : https://blog.madrzejewski.com/creer-cv-elegant-latex-moderncv/
\documentclass[12pt,a4paper]{moderncv}
\moderncvtheme[blue]{classic}
\usepackage[utf8]{inputenc}
\usepackage[inline]{enumitem}
% Marge aux 4 coins de la page, ici elles sont réduites pour gagner de la place
\usepackage[top=1.0cm, bottom=1.0cm, left=1.6cm, right=1.6cm]{geometry}
View macros.sh
#!/bin/sh
# https://blog.madrzejewski.com/rediger-texte-raccourcis-clavier-linux-xbindkeys-xdotool
case $1 in
# Exemple : signature d'un email
'majf1')
xdotool key --delay 110 Return
xdotool type --delay 0 "Si vous avez d'autres questions, je reste à votre écoute."
xdotool key --delay 1 Return
View example.sh
#!/bin/bash
# Example for : https://blog.madrzejewski.com/traiter-json-shell-cli
set -euo pipefail
LC_ALL=C
OLD_IFS=$IFS
IFS=$'\n'
View 00-remoteip.conf
# Conf for this article : https://blog.madrzejewski.com/offloader-ssl-nginx-reverse-proxy-apache
LoadModule remoteip_module modules/mod_remoteip.so
RemoteIPHeader X-Forwarded-For
RemoteIPTrustedProxy 127.0.0.1
View config
# /etc/monit/conf.d/config
# Configuration de Monit de base
set daemon 120 # verif toutes les 2 minutes
with start delay 240 # 1ere verif après 4min
set logfile syslog facility log_daemon # précise les fichiers de logs
set mailserver localhost # précise le serveur de mail pour les alertes
set eventqueue
# si le serveur de mail down, on stock les alertes
basedir /var/monit # répertoire de stockage
View all the commands used in the article.sh
# All the command used here : http://blog.madrzejewski.com/faire-fonctionner-curl-en-https-dans-un-environnement-php-fpm-chroote
# Centos 7.1, the libs named may changed in the future, so don't just copy/paste and check on your system first
# First example, chroot bash
mkdir chroot_bash
mkdir -p chroot_bash/usr/bin
cp /usr/bin/bash chroot_bash/usr/bin
chroot chroot_bash/ bash
chroot: failed to run command ‘bash’: No such file or directory
You can’t perform that action at this time.