Skip to content

Instantly share code, notes, and snippets.

View romicaraicu's full-sized avatar

Romica RAICU romicaraicu

View GitHub Profile
@romicaraicu
romicaraicu / varnishlog-examples.sh
Created June 6, 2019 13:08 — forked from cupracer/varnishlog-examples.sh
varnishlog examples (version 4.x)
# filter by request host header
varnishlog -q 'ReqHeader ~ "Host: example.com"'
# filter by request url
varnishlog -q 'ReqURL ~ "^/some/path/"'
# filter by client ip (behind reverse proxy)
varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"'
# filter by request host header and show request url and referrer header
@romicaraicu
romicaraicu / docker-compose.yml
Created August 1, 2017 10:21 — forked from jschwarty/docker-compose.yml
Docker compose for mongodb and seed containers
version: '2'
services:
mongodb:
image: mongo:3.2.6
ports:
- "27017:27017"
mongo-seed:
image: mongo:3.2.6
@romicaraicu
romicaraicu / cloudflare-failover.sh
Created May 30, 2017 15:11 — forked from Ara4Sh/cloudflare-failover.sh
CloudFlare A records failover script using CloudFlare api v4 (https://api.cloudflare.com) required jq and curl to run.
#!/bin/bash
# Copyright (C) 2016 Arash Shams <https://github.com/Ara4Sh>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@romicaraicu
romicaraicu / cloudflare-failover.sh
Created May 30, 2017 15:11 — forked from Ara4Sh/cloudflare-failover.sh
CloudFlare A records failover script using CloudFlare api v4 (https://api.cloudflare.com) required jq and curl to run.
#!/bin/bash
# Copyright (C) 2016 Arash Shams <https://github.com/Ara4Sh>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@romicaraicu
romicaraicu / run-innobackupex.sh
Created May 23, 2017 16:01 — forked from jmfederico/run-xtrabackup.sh
Script to create full/incremental backups with innobackupex script.
#!/bin/sh
TMPFILE="/tmp/innobackupex-runner.$$.tmp"
USEROPTIONS="--user=XXX --password=XXX"
FILTERTABLES="--include=.*[.].*"
BACKDIR=/var/mysql-bak
BASEBACKDIR=$BACKDIR/base
INCRBACKDIR=$BACKDIR/incr
FULLBACKUPLIFE=3600 #604800 # How long to keep incrementing a backup for, minimum 60
KEEP=1 # Keep this number of backups, appart form the one currently being incremented
@romicaraicu
romicaraicu / run-innobackupex.sh
Created May 23, 2017 16:00 — forked from jmfederico/run-xtrabackup.sh
Script to create full/incremental backups with innobackupex script.
#!/bin/sh
TMPFILE="/tmp/innobackupex-runner.$$.tmp"
USEROPTIONS="--user=XXX --password=XXX"
FILTERTABLES="--include=.*[.].*"
BACKDIR=/var/mysql-bak
BASEBACKDIR=$BACKDIR/base
INCRBACKDIR=$BACKDIR/incr
FULLBACKUPLIFE=3600 #604800 # How long to keep incrementing a backup for, minimum 60
KEEP=1 # Keep this number of backups, appart form the one currently being incremented