Skip to content

Instantly share code, notes, and snippets.

View merouanekhalili's full-sized avatar

Merouane KHALILI merouanekhalili

View GitHub Profile
@merouanekhalili
merouanekhalili / nagios.conf
Created March 13, 2018 10:38
nginx config for nagios 4 + nagvis
server {
server_name _;
access_log /var/log/nginx/localhost-access.log;
error_log /var/log/nginx/localhost-error.log;
index index.php index.html;
location /nagios {
auth_basic "Private";
auth_basic_user_file /usr/local/nagios/etc/htpasswd.users;
@merouanekhalili
merouanekhalili / Secure mail
Last active August 29, 2015 14:15
iptables
#!/bin/sh
# Vider les tables actuelles
iptables -t filter -F
# Vider les règles personnelles
iptables -t filter -X
# Interdire toute connexion entrante et sortante
iptables -t filter -P INPUT DROP
@merouanekhalili
merouanekhalili / gist:5426250
Created April 20, 2013 14:56
PHP : detect bot
<?php
public function isBot() {
$bots = array(
'googlebot',
'adsbot-google',
'feedfetcher-google',
'yahoo',
'lycos',
'bloglines subscriber',
'dumbot',