Skip to content

Instantly share code, notes, and snippets.

View FredNandrin's full-sized avatar

Fred Nandrin FredNandrin

  • Berlin, Germany
View GitHub Profile
@FredNandrin
FredNandrin / RenewExpiredGPGkey.md
Created August 14, 2023 13:46 — forked from TheSherlockHomie/RenewExpiredGPGkey.md
Updating expired GPG keys and backing them up 🔑🔐💻

Updating expired GPG keys and their backup 🔑🔐💻

I use a GPG key to sign my git commits.

An error like this one might be a sign of an expired GPG key.

error: gpg failed to sign the data fatal: failed to write commit object
<?php
echo "<H1>".$_SERVER['HOSTNAME']."</H1>";
phpinfo();
// Based on code by Robert Kent, James Bavington & Tom Foyster
var dropCookie = true; // false disables the Cookie, allowing you to style the banner
var cookieDuration = 1; // Number of days before the cookie expires, and the banner reappears
var cookieName = 'Covid19'; // Name of our cookie
var cookieValue = 'on'; // Value of cookie
var cookieDivId = 'xxxx';
var cookieCloseButtonClass = 'yyyy';
function displayCovid19Banner() {
#!/bin/bash
# copy necessary lib for system command from root to chrooted directory
#
# Frédéric Nandrin - NanIT 2019 - fred@nanit.be
# Tested on Debian 9
#
# USAGE : chrootcmd <chrooted dir> <cmd>
# ex : chrootcmd /home/fred /bin/ls
#
@FredNandrin
FredNandrin / disk.yaml.default
Created July 12, 2018 12:35
Limit dd-agent to main partition
instances:
# The use_mount parameter will instruct the check to collect disk
# and fs metrics using mount points instead of volumes
- use_mount: no
- excluded_filesystems:
- tmpfs
- none
- shm
- nsfs
sh install_mysql.sh
sh install_apache_php7.sh
sh install_wordpress.sh
apt install vsftpd fail2ban
echo "listen_address=127.0.0.1" >> /etc/vsftpd.conf
echo "listen_address6=::1" >> /etc/vsftpd.conf
service vsftpd restart
@FredNandrin
FredNandrin / wordpress-plugin-svn-to-git.md
Created May 1, 2018 19:02 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development
@FredNandrin
FredNandrin / docker-compose.yml
Last active April 24, 2018 20:42
Docker-compose for Prestashop dev
version: '2'
volumes:
db-data:
vendor:
var:
services:
mysql:
image: mysql
@FredNandrin
FredNandrin / Makefile
Created October 27, 2017 17:31
Basic makefile for docker stack with symfony
#
# Run `make ENVIRONMENT=machinename` to override the default
#
ENVIRONMENT=default
TLS_VERIFY=$(shell docker-machine env $(ENVIRONMENT) | grep 'DOCKER_TLS_VERIFY=".*"' | cut -d\" -f2)
HOST=$(shell docker-machine env $(ENVIRONMENT) | grep 'DOCKER_HOST=".*"' | cut -d\" -f2)
CERT_PATH=$(shell docker-machine env $(ENVIRONMENT) | grep 'DOCKER_CERT_PATH=".*"' | cut -d\" -f2)
MACHINE_NAME=$(shell docker-machine env $(ENVIRONMENT) | grep 'DOCKER_MACHINE_NAME=".*"' | cut -d\" -f2)
DOCKER_MACHINE_NAME=$(MACHINE_NAME)
DOCKER_TLS_VERIFY=$(TLS_VERIFY)