Skip to content

Instantly share code, notes, and snippets.

View ap-Codkelden's full-sized avatar
🏠
Working from home

Renat ap-Codkelden

🏠
Working from home
View GitHub Profile
@ap-Codkelden
ap-Codkelden / fail2ban-allstatus.sh
Created August 6, 2016 12:15 — forked from kamermans/fail2ban-allstatus.sh
Show status of all fail2ban jails at once
#!/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
# Based on https://gist.github.com/fernandoaleman/5083680
# Start the old vagrant
$ vagrant init ubuntu_saucy
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
@ap-Codkelden
ap-Codkelden / tree.md
Last active August 29, 2015 14:16 — forked from hrldcpr/tree.md

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!