This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$include /etc/inputrc | |
# allow the use of the Delete/Insert keys | |
"\e[P": delete-char | |
"\e[4h": quoted-insert | |
"\e[5~": history-search-backward | |
"\e[6~": history-search-forward | |
set colored-stats On |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function timer_start { | |
timer=${timer:-$SECONDS} | |
} | |
function timer_stop { | |
exit_code=$? | |
timer_show=$(($SECONDS - $timer)) | |
unset timer | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3060 2 | |
2023 4 | |
340 9 | |
309 10 | |
285 12 | |
255 1 | |
232 3 | |
171 8 | |
153 5 | |
114 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Rex -feature => [ '1.4', 'exec_autodie' ]; | |
use Time::HiRes qw(time); | |
use Minion; | |
my $minion = Minion->new( SQLite => 'sqlite:/tmp/minion.backend' ); | |
add_minion_tasks(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Rex -feature => [ '1.4', 'exec_autodie' ]; | |
use Net::MQTT::Simple; | |
use Time::HiRes qw(time); | |
no_ssh task 'agent', sub { | |
my $mqtt = Net::MQTT::Simple->new('localhost'); | |
$mqtt->run( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Rex -feature => [ '1.4', 'exec_autodie' ]; | |
use Linux::Inotify2; | |
use File::Basename qw(dirname); | |
use Time::HiRes qw(time tv_interval); | |
use DDP; | |
my $inotify = Linux::Inotify2->new(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Rex -feature => [ '1.4', 'exec_autodie' ]; | |
sudo_password get_password('path/to/sudo/password/in/pass'); | |
user 'myuser'; | |
task 'a' => sub { | |
say run 'whoami'; # should be myuser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Rex -feature => [ '1.4', 'exec_autodie' ]; | |
use Parallel::Subs; | |
use Parallel::Forker; | |
desc 'Sleep for some time'; | |
task 'rexsleep', sub { | |
my $params = shift; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Rex::Hook::File::Diff; | |
use strict; | |
use warnings; | |
use Rex -base; | |
use Rex::Hook; | |
use Text::Diff; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Rex; | |
task 'files', sub { | |
# utf8 disabled | |
say 'disabling utf8 pragma'; | |
no utf8; | |
my $file = '/tmp/test'; | |
file $file, content => 'Daniel Böhmer'; |