Skip to content

Instantly share code, notes, and snippets.

View flusher's full-sized avatar

Florian Cathala flusher

View GitHub Profile
@flusher
flusher / ab_gzip.sh
Created May 2, 2014 16:15
Apache Benchmark test load with gzip compression
ab -c 10 -n 1000 -H "Accept-Encoding: gzip,deflate" http://www.example.com/
@flusher
flusher / cache_warmer.sh
Created May 2, 2014 16:18
Website cache warmer from multipages XML sitemap
#!/bin/bash
# Warm cache from XML sitemap with multiple pages
url="www.example.com"
xmlsitemap="sitemap.xml"
pages=2
log_file="/var/log/cache_warmer.log"
echo $(date +"[%d/%m/%Y : %T]") "Cache warmer launched for $url" >> $log_file
@flusher
flusher / freedos pxe boot
Created May 6, 2014 10:47
Boot FreeDOS iso through PXE
label freedos
menu label ^FreeDOS
kernel path/memdisk
initrd path/freedos.iso
append iso raw
@flusher
flusher / makeiso.sh
Last active August 29, 2015 14:01
Create FreeDOS bootable ISO from FDOS OEM CD builder
#!/bin/bash
# Create FreeDOS bootable ISO from FDOS OEM CD builder
# @see http://www.fdos.org/bootdisks
mkisofs -o fdoem.iso -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -N -J -r -c _$ -hide-joliet _$ -hide _$ CDROOT
@flusher
flusher / cve-2015-0235_vulntest.c
Created January 27, 2015 17:48
CVE-2015-0235 vulnerability test
/* [user@fedora-19 ~]$ cat > charged-ghbn.c << EOF */
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
@flusher
flusher / deploy_myproject_tag.sh
Created May 25, 2016 13:31
Deployment script for a given (git, versioned Drupal project) tag
#!/bin/bash
#########################
### Deployment script ###
#########################
APP_PATH="/var/www/myproject/www"
APP_URL="www.myproject.com"
APP_POST_DEPLOY_SCRIPT="$APP_PATH/scripts/myproject_update.sh"
#!/bin/bash
# Script de déploiement pour un projet Drupal versionné sur un repo Git
# avec gestion des releases et des sauvegardes.
APP_ENVIRONNEMENT="PROD"
APP_PATH="/var/www/www.myproject.com"
APP_CURRENT_PATH="current"
APP_RELEASES_PATH="releases"
APP_BACKUP_PATH="backup"
@flusher
flusher / letsencrypt.conf
Created February 17, 2017 10:46
Nginx Letsencrypt perfect configuration
# Rule for legitimate ACME Challenge requests (like /.well-known/acme-challenge/xxxxxxxxx)
# We use ^~ here, so that we don't check other regexes (for speed-up). We actually MUST cancel
# other regex checks, because in our other config files have regex rule that denies access to files with dotted names.
location ^~ /.well-known/acme-challenge/ {
# Prevent HTTP Auth
auth_basic off;
allow all;
# Separate logs
Host *
Compression yes
KeepAlive yes
ServerAliveInterval 10
GSSAPIAuthentication no
AddKeysToAgent yes
AddressFamily inet
ServerAliveInterval 300
ServerAliveCountMax 2
ControlPersist 600
@flusher
flusher / drupal8.md
Created April 21, 2022 11:10 — forked from UshaMakoa/drupal8.md
drupal d8