Skip to content

Instantly share code, notes, and snippets.

@1nn3
1nn3 / loop-threads.pl
Last active April 23, 2020 06:07
Threads durchlaufen
#!/usr/bin/env perl
# Siehe auch: https://www.perl-community.de/bat/poard/thread/20656
use diagnostics;
use strict;
use utf8;
use warnings;
use threads;
# Threard Start Handler
@1nn3
1nn3 / listsplit.pl
Last active July 19, 2020 06:47
Teile eine Liste in gleichlange Teile
#!/usr/bin/env perl
use Data::Dumper;
use POSIX;
#** @method public listsplit ()
# @brief split a list into equal length portions
#
# Teilt eine Liste in N gleiche Portionen auf.
# Beachte: Bleibt ein Rest, sind es N+1 Portionen. Ist $portions >
# scalar(@array), sind es nur scalar(@array) Portionen.
@1nn3
1nn3 / arpalert-action-on-detect
Last active February 16, 2024 12:44
ARP alert action on detect script
#!/usr/bin/env sh
# ARP alert action
# grep "action on detect" /etc/arpalert/arpalert.conf
# action on detect = "/usr/local/sbin/arpalert-action-on-detect"
mac="$1"
ip="$2"
extras="$3"
device="$4"
type_of_alert="$5"