Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓
Busy ... Always busy

Mitchell Krog mitchellkrogza

🤓
Busy ... Always busy
View GitHub Profile
@mitchellkrogza
mitchellkrogza / fail2ban-allstatus.sh
Created Jul 14, 2016 — forked from kamermans/fail2ban-allstatus.sh
Show status of all fail2ban jails at once
View fail2ban-allstatus.sh
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done
@mitchellkrogza
mitchellkrogza / fail2ban-reset-log-db.sh
Last active Mar 30, 2021
Bash script to reset Fail2Ban - clears / truncates log file and deletes the sqlite database - stops and restarts service during this process.
View fail2ban-reset-log-db.sh
#!/bin/bash
# Bash Script by https://gist.github.com/mitchellkrogza
# ************************************************************
# This script clears the log file and database of Fail2Ban
# This resets Fail2Ban to a completely clean state
# Useful to use after you have finished testing all your jails
# and completed your initial setup of Fail2Ban and are now
# putting the server into LIVE mode
# ************************************************************
View force-css-js-to-go-live-immediately.php
<?php
// Version CSS file in a theme
wp_enqueue_style( 'theme-styles', get_stylesheet_directory_uri() . '/style.css', array(), filemtime( get_stylesheet_directory() . '/style.css' ) );
// Version JS file in a theme
wp_enqueue_script( 'theme-scripts', get_stylesheet_directory_uri() . '/js/scripts.js', array(), filemtime( get_stylesheet_directory() . '/js/scripts.js' ) );
@mitchellkrogza
mitchellkrogza / index.html
Last active Apr 10, 2021 — forked from anonymous/index.html
Vortex CSS Animation
View index.html
<canvas id="canvas"></canvas>
@mitchellkrogza
mitchellkrogza / discourse.css
Last active Jan 14, 2020
My own custom css for a Discourse Forum - Use it, change it and please send back any improvements
View discourse.css
/** Discourse CSS by Mitchell Krog - mitchellkrog@gmail.com **/
@font-face {
font-family: ProximaNova;
src: url('https://dmmj3mmt94rvw.cloudfront.net/webfonts/ProximaNova300.eot');
src: url('https://dmmj3mmt94rvw.cloudfront.net/webfonts/ProximaNova300.eot?#iefix') format('embedded-opentype'), url('https://dmmj3mmt94rvw.cloudfront.net/webfonts/ProximaNova300.woff') format('woff'), url('https://dmmj3mmt94rvw.cloudfront.net/webfonts/ProximaNova300.ttf') format('truetype'), url('https://dmmj3mmt94rvw.cloudfront.net/webfonts/ProximaNova300.svg#icon') format('svg');
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: ProximaNova;
@mitchellkrogza
mitchellkrogza / rules-both.iptables
Created Apr 15, 2017 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
View rules-both.iptables
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@mitchellkrogza
mitchellkrogza / travis-ci-git-commit.bash
Created Jun 23, 2017 — forked from ddgenome/travis-ci-git-commit.bash
Make a commit on a branch in a Travis CI build, dealing with detached HEAD state safely
View travis-ci-git-commit.bash
#!/bin/bash
# function to make a commit on a branch in a Travis CI build
# be sure to avoid creating a Travis CI fork bomb
# see https://github.com/travis-ci/travis-ci/issues/1701
function travis-branch-commit() {
local head_ref branch_ref
head_ref=$(git rev-parse HEAD)
if [[ $? -ne 0 || ! $head_ref ]]; then
err "failed to get HEAD reference"
return 1
@mitchellkrogza
mitchellkrogza / GitRepoUpdateTimestamp.sh
Created Oct 6, 2017 — forked from jeffery/GitRepoUpdateTimestamp.sh
Update Timestamp of files in Checked-out Git Repository
View GitRepoUpdateTimestamp.sh
#!/bin/bash -e
####
# Helper script to update the Last modified timestamp of files in a Git SCM
# Projects working Copy
#
# When you clone a Git repository, it sets the timestamp of all the files to the
# time when you cloned the repository.
#
# This becomes a problem when you want the cloned repository, which is part of a
# Web application have a proper cacheing mechanism so that it can re-cache files
@mitchellkrogza
mitchellkrogza / rpi3-arch-linux-to-sdcard.sh
Created Oct 10, 2017 — forked from pklaus/rpi3-arch-linux-to-sdcard.sh
Raspberry Pi 3: Arch Linux ARM 64bit to SDcard Script. This is for the Rapsberry Pi 3. For the RPi 2 (or the 3 32bit), see https://gist.github.com/pklaus/9dd4a7bf040788cda501 . For the RPi 1, see https://gist.github.com/pklaus/b92dfc72136d1509c2ed .
View rpi3-arch-linux-to-sdcard.sh
#!/bin/bash
# <https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3>
set -x
echo -e "\n\nArch Linux ARM to SD Card\n"
echo -e "for the Raspberry Pi 3\n\n"
echo -e "\nAll drives on this computer:\n"
View OS X macOS Install ISO Creator
#!/bin/bash
################################
# OS X Install ISO Creater #
# #
# Author: shela #
################################
#######################################
# Declarations