You are currently browsing the Perl category
Displaying 1 - 4 of 4 entries.

LISA Prerequisites

  • Posted on January 1, 2016 at 15:34

Super Quick Start Guide II: LISA

# pacman -Sy perl-dbd-pg
# cpan
cpan> install Filesys::Df
cpan> install Filesys::DiskFree
cpan> install Filesys::Path
cpan> install Config::Simple
cpan> install Email::Send::SMTP::TLS
cpan> install Email::Simple

File names:

  • Transponder: lisa-bot-1.5.pl
    Call: ./transponder/lisa-bot-1.5.pl 3
  • Heartbeat Share Checker: lh-sharechecker-1.8.pl
    Call: .heartbeat//lh-sharechecker-1.8.pl –runmode=3 –interval=60
  • Acquire Storage Device: lisa-dn-acquire-storage-device-1.3.1pl
    Call: ./bootdisk/lisa-dn-acquire-storage-device-1.3.1pl 3
  • Acquire Computer: ls-dn-acquire-computer-1.4.0.pl
    Call: ./bootdisk/lisa-dn-acquire-computer-1.4.0.pl 3

 

Everything you really need in Arch

  • Posted on December 13, 2015 at 18:07

Creating a list of everything installed:

# pacman -Qe | awk '{print $1 " \\" }'

 

apache \
atril \
autoconf \
automake \
bash \
bind-tools \
binutils \
bison \
bzip2 \
caja-gksu \
caja-image-converter \
caja-open-terminal \
caja-sendto \
caja-share \
coreutils \
cryptsetup \
device-mapper \
dcfldd \
dhcpcd \
dialog \
diffutils \
e2fsprogs \
engrampa \
eom \
fakeroot \
file \
filesystem \
findutils \
flex \
foremost \
fping \
galculator-gtk2 \
gawk \
gcc \
gcc-libs \
gettext \
glibc \
grep \
groff \
grub \
gzip \
hfsprogs \
htop \
inetutils \
iproute2 \
iputils \
jfsutils \
less \
libtool \
licenses \
lightdm \
linux \
logrotate \
lsof \
lvm2 \
m4 \
make \
man-db \
man-pages \
marco \
mate-applets \
mate-backgrounds \
mate-control-center \
mate-icon-theme-faenza \
mate-media \
mate-netspeed \
mate-notification-daemon \
mate-power-manager \
mate-screensaver \
mate-sensors-applet \
mate-system-monitor \
mate-terminal \
mate-themes \
mate-user-guide \
mate-user-share \
mate-utils \
mc \
mdadm \
mlocate \
mozo \
mtools \
nano \
net-tools \
netctl \
nfs-utils \
nmap \
openssh \
os-prober \
p7zip \
php-apache \
php-gd \
pacman \
par2cmdline \
patch \
pciutils \
pcmciautils \
perl \
perl-dbd-pg \
pkg-config \
pluma \
postgresql \
procps-ng \
psmisc \
reiserfsprogs \
rsync \
s-nail \
screen \
sed \
shadow \
sleuthkit \
sshfs \
sudo \
sysfsutils \
tar \
testdisk \
texinfo \
tree \
unrar \
usbutils \
util-linux \
vi \
vim \
vimpager \
wget \
which \
xfsprogs \
zip \

And then CPAN:

Authen::NTLM
Config::Simple
Email::Send
Email::Sender
DBI
DBD::Pg
Digest::SHA1
Digest::SHA2
Digest::SHA256
Digest::SHA3
File::Binary
File::Tail 
File::Slurp
Filesys::Df
Email::Find
Log::Log4perl
Moose
MooseX
MooseX::ClassAttribute
MooseX::Singleton
SQL::Abstract

Knowing your dynamic IP-address

  • Posted on July 25, 2011 at 18:53

The troubling situation
Being a nerd, there is nothing more frustrating than having a dynamic IP-address.
Being a nerd and doing some hosting locally actually makes it even wors!

There’s not much use to running services like Apache or Sendmail with an IP-address that changes at random times.
Random in this particular case means: “When we of Ziggo want it to!”.

Alert by email
So what you basically want is to be alerted whenever you IP has changed.
I wrote some perl-code that does exactly that! And as a bonus, it does some handy logging.
The script can be initiated from command-line, but the best way is making a cronjob of course.

Realworld example
I created two new e-mailadresses; newipkrusjme@gmail.com and newipkrusjme@hotmail.com. Both addresses are now configured on my iPhone to receive all mail automatically,
In the cron, I set it to run as an hourly-job,
And then I did “the Dutch approach“…

Sourcecode
Thanks to Vim it was quite easy to make the sourcecode readable using :TOhtml.
If you love to see the amazing Vim-output or you’re actually seriously interested: You can find the sourcecode here: http://www.krusj.nl/files/newip-2.0.pl.html
Download directly: http://www.krusj.nl/files/newip-2.0.pl

Installing

  • download the script, (for example to /usr/local/bin)
  • change the email-addresses to your preferred ones,
  • change the interface-card, (eth1, eth0 or whatever)
  • mkdir /var/log/newip /var/newip,
  • chmod 755 /usr/local/bin/newip-2.0.pl,

Testing / Forcing
If you want to test it, just run the script from command-line using:
# /usr/local/bin/newip-2.0 --force-mail

CPAN, MacPorts and Eclipse: The hard-life

  • Posted on January 24, 2011 at 10:21

Developing machine configuration
My workstation is an Apple MacPro, running Snow Leopard. And I do my developing in Eclipse. For me undoubtedly the number one IDE. The Perl-support is really fantastic.
Unless you installed MacPorts!

Description
Although I was sure I installed the used CPAN-Modules, Eclipse kept complaining about not able to find them, blablabla….
Eclipse Error: Can't find CPAN Module

Cause
MacPorts installed it’s own Perl! Although not necessarily, it can happen easily. With a little bit of playing around in MacPorts, it’s quite probable than MacPorts installed it’s own Perl. Although it really isn’t a big issue in everyday use. (I never ran into any trouble, so far) it may result in Eclipse fooling you.
Because since my OS now by default uses the MacPorts version of Perl, it will also use the CPAN that’s installed by MacPorts. And, once again: It works just fine!
The only trouble is Eclipse. Eclipse, or actually E-P-I-C, still only looks in the default Perl search-paths.
So if you install a new module using CPAN when MacPorts has installed Perl, it will install that new module in the MacPorts-CPAN-Path, and not in the default OSX-CPAN-Path. That’s all!

Remedy
Just install your CPAN module also in the default OS X-Path using the absolute path.
Example:
$ sudo /usr/bin/cpan
cpan> install Archive::TarGzip
cpan> reload cpan
cpan> exit

Now restart your Eclipse….
Problem solved!