Skip to content

Instantly share code, notes, and snippets.

View farkasmate's full-sized avatar

Mate Farkas farkasmate

  • IT Automation Engineering Ltd
  • London
View GitHub Profile

Keybase proof

I hereby claim:

  • I am farkasmate on github.
  • I am matefarkas (https://keybase.io/matefarkas) on keybase.
  • I have a public key ASC4zOBuXHQ98uqgtpSDoV-Xq2XgDUOj4wNXWVZteIpICwo

To claim this, I am signing this object:

#!/bin/bash
if [ $# != 1 ]
then
echo "Usage: $(basename $0) <backup.cpio.gz>"
exit 1
fi
dir="restored-$(basename $1)"
mkdir $dir
#!/bin/bash
if [ $# != 1 ]
then
echo "Usage: $(basename $0) <directory>"
exit 1
fi
file="$(basename $1)-$(date --iso-8601=seconds).cpio.gz"
find $1 -depth -mount -print0 | cpio --create --quiet --null | gzip --to-stdout > $file
@farkasmate
farkasmate / filter_dict.py
Last active November 3, 2017 00:22
Ansible Filter Plugin: Filter dicts by lambda
# ---
# - hosts: 'localhost'
# gather_facts: 'no'
# tasks:
# - set_fact:
# ports:
# Ethernet0:
# ip: '10.0.0.1'
# description: 'csw11'
# Ethernet1: