Skip to content

Instantly share code, notes, and snippets.

View mjf's full-sized avatar

Matouš Jan Fialka mjf

View GitHub Profile
@mjf
mjf / pal.rst
Last active May 5, 2023 07:14
PAL - Partitioning Automation Language
@mjf
mjf / mirror-centos-7.0.1406.service
Created September 11, 2014 06:11
Systemd units to mirror CentOS v7.0.1406 (excluding ISOs) every 30 minutes using RSync
[Unit]
Description=Mirror CentOS v7.0.1406 to /srv/mirrors/centos/7.0.1406
Wants=network-online.target
RefuseManualStart=true
RefuseManualStop=true
[Service]
Type=simple
User=mirrors
Group=mirrors
@mjf
mjf / sysconfig-ifcfg-scripts-gen
Last active August 30, 2021 15:47
Simple shell scripts to create sysconfig ifcfg files and udev rules files for PCI interfaces
#! /bin/sh
# Generate /etc/sysconfig/network-scripts/ifcfg-*
# Copyright (C) 2014 Matous J. Fialka, <http://mjf.cz/>
# Released under the terms of The MIT License
#
# Environment variables
# ---------------------
#
# IPADDR[<n>]=...
@mjf
mjf / varnish_cache_http_errors.rst
Last active August 29, 2015 14:13
Varnish Cache Memos

Varnish Cache Memos

Authors: Matouš Jan Fialka
Date: 2015-03-31
Version: Varnish Cache v4.0.2
Memo:varnish_cache.2015.3.31.1

HTTP errors caching

@mjf
mjf / USA
Last active October 14, 2019 07:27
USA & USE - Useful Shell Aliases and Environment
#! /bin/sh
# USA - Useful Shell Aliases
# Copyright (C) 2015-2017 Matous Jan Fialka, <http://mjf.cz/>
# Released under the terms of "The MIT License"
#
# Common aliases (SELinux support)
#
alias lz='ls -aZ'
@mjf
mjf / fswap
Created January 21, 2015 08:28
fswap - File swap
#! /bin/sh
# fswap - File swap
# Copyright (C) 2015 Matous Jan Fialka, <http://mjf.cz/>
# Released under the terms of "The MIT License"
if [ $# -ne 2 ]
then
echo "fswap FILE1 FILE2" >&2
exit 1
@mjf
mjf / .bashrc.include
Last active October 19, 2015 07:38
mysqlreportfmt - Format MySQL Report Tool's output
#
# Include this function in your ~/.bashrc file
#
mysqlreport() {
$(which mysqlreport) $@ | mysqlreportfmt | less -c -R
}
@mjf
mjf / nagios_varnish_plugin.go
Last active August 29, 2015 14:17
nagios_varnish_plugin - Monitoring for Varnish Cache
// nagios_varnish_plugin - Monitoring for Varnish Cache
// Copyright (C) 2015 Matous Jan Fialka, <http://mjf.cz/>
// Released under the terms of "The MIT License"
package main
import (
"encoding/json"
"fmt"
"log"
@mjf
mjf / haproxy_pem_file.rst
Last active February 27, 2018 09:05
HA-Proxy Memos

HAProxy Memos

Authors: Matouš Jan Fialka
Date: 2015-03-31
Version: HAProxy v1.5.2
Memo:haproxy.2015.3.31.1

PEM file order of objects

@mjf
mjf / common.vcl
Last active August 29, 2015 14:18
common.vcl - Varnish Cache 4 Common Subroutines
# common.vcl - Varnish Cache 4 Common Subroutines
# Copyright (C) 2015 Matous Jan Fialka, <http://mjf.cz/>
# Released under the terms of "The MIT License"
vcl 4.0;
import std;
#
# OPTIONS