Menu
×
  • Main
  • Home
  • Network Monitoring Software
  • Application Monitoring Software
  • Bandwidth Monitoring Software
  • Syslog Servers
  • TFTP Servers
  • Event Log Analysis Software
  • Help Desk Software
  • IPAM Software
  • Netflow Analyzers and Collectors
  • Network Configuration Management Software
  • VN Manager & Monitoring Software
  • Wake On Lan Tools
  • Info & Contact
  • Contact
  • Terms of Use
  • Privacy Policy
  • Disclaimer
  • Legal
  • © 2016 NetAdminTools.com
    All Rights Reserved

Network Admin Tools

  • Home
  • Monitoring
  • Backup/Recovery
  • GNU/Linux
  • Administration
  • Perl
  • Ruby
  • Database

About Paul Anderson

Paul is an Avid Tech Geek who Loves writing, Cycling and All Things Linux! He comes from a Background of Windows Administration along with Ubuntu/Centos Server administration. Paul holds industry wide certifications include CompTIA & Microsoft Accredited certifications.

Posts by Paul Anderson

About The Author

Paul Anderson
Twitter | Email | Website

Paul is an Avid Tech Geek who Loves writing, Cycling and All Things Linux!

He comes from a Background of Windows Administration along with Ubuntu/Centos Server administration.

Paul holds industry wide certifications include CompTIA & Microsoft Accredited certifications.

Paul has started to dive into the field of Virtualization as well as Ubuntu Linux. On his down time, he not only enjoys Cycling (as mentioned above), but also Gaming with his 5 yr old Son.

Call of Duty and Command & Conquer are/were is favorite games - he now occassionally plays fornite keep up with his kids.

Currently in Paul's Lab network, there are several Cisco Devices and tons of old Servers as he's practicing for his CCNA Certs.

Setting Passive Mode for Perl/CPAN

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Perl

One problem with the default install of the CPAN shell is that if you need passive FTP to get through your firewall, the CPAN shell won’t work. Here is the behavior: . . . Invalid PORT. Retrying. –12:26:05– ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz (try: 8) => `-‘ Connecting to ftp.perl.org[192.35.244.50]:21… connected. Logging in as anonymous … Logged in! ==> […]

Archiving Files With Perl

Last Updated: May 11th, 2018 - Paul Anderson

By Paul Anderson / May 11, 2018 — Perl

Agatha had some complaints about her chicken cam. People weren’t seeing enough chicken booty. A quick and easy way to do this is to use Perl: while(6 ne 9){ for($c=1;$c<11;$c++){ system(“scp root\@crackers:/chickenpicture.jpg /home/u-1/chickencam”); system(“scp /home/u-1/chickencam/chickenpicture.jpg root\@signalq.com:/web/path/here/”); system(“scp /home/u-1/chickencam/chickenpicture.jpg root\@signalq.com:/web/path/here/archive/chickenpicture”.$c.”.jpg”); sleep 300; } } This way, the chicken cam cycles through. The only tricky part is […]

Compression of Text With Perl – Part 1

Last Updated: May 11th, 2018 - Paul Anderson

By Paul Anderson / May 11, 2018 — Perl

In this article I show how to use Perl to extract keywords from a text file, create an index of these keywords, and reassemble the text in a simplified way. This will give you compression, as well as control over stored data. I used The Snow Queen with the simplified character set of the Odyssey […]

Compression of Text With Perl – Part 2

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Perl

In this article I showed how to extract keywords from a text file to create an index, and I reassembled the text again from the compressed file. In this article, I render the compressed file with a limited character set. Here is the code: %found = (); %index= (); $i=1; # this will grab 196 […]

Matching Hex Characters With Perl

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Perl

You can match hex characters with \x. Just put \x before the hexadecimal number. For instance, if you wish to replace all backspace characters with nothing, use this: perl -pi -e “s|\x08||g” file.txt

Writing a Simple Filter With Perl

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Perl

One cool thing you can do with perl is write a filter. We often tail various log files, but just want to know about specific bits. If we want to see more, we can look at the actual logs; however, for the purposes of the current activity, we don’t need much information. Say your logs […]

Installing The Net-SNMP Perl Module on Windows

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Perl

There are restrictions on the crypt-des.ppd module that make it a rare beastie to find. When you try and install via ppm: ppm> install net-snmp Error: PPD for ‘Crypt-DES.ppd’ could not be found. After some searching, we did find the module at soulcage.net. The site seems legit, but do your own homework. To add the […]

Sending a Command Via TCP With Perl

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Perl

To send a command via TCP with Perl, you can use IO::Socket::INET: use IO::Socket; my $sock = new IO::Socket::INET ( PeerAddr => ‘localhost’, PeerPort => ‘1001’, Proto => ‘tcp’, ); die “Error: $!\n” unless $sock; print $sock “commandtoexecute\n”; close($sock); This will send the command commandtoexecute to port 1001 on localhost or complain that there is […]

Converting File Extension to Lower Case With Perl

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Perl

Let’s say that you have a bunch of references to files that take the format IMGblahx.JPG, but all of the files are actually IMGblahx.jpg. An example file would be named IMG_1807.JPG. To change all of the references to IMGblahx.JPG to IMGblahx.jpg, use this one line perl script: $ perl -pi -e “s|(IMG……)JPG|\$1jpg|g” * Put an […]

Installing Ruby and Rails on Mac OS X

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Ruby

Ruby and SQLite come with Mac OS X. Ruby is a bit older, and had some trouble installing Rails, so we ugraded: srv-8:~ usr4$ sudo port upgrade sqlite3 Password: —> Fetching ncursesw —> Attempting to fetch ncurses-5.7.tar.gz from http://mirrors.kernel.org/gnu/ncurses —> Verifying checksum(s) for ncursesw —> Extracting ncursesw —> Configuring ncursesw —> Building ncursesw —> Staging […]

Porting an Existing Static Database-derived Web Site to Ruby on Rails

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Ruby

[Note that this article is an experiment in hacking a Rails app in to static HTML off of a single root directory. This was done with routes.rb and some parsing of the URL within Rails. This is interesting in its own right, so we are leaving it up; however, a much better way is to […]

Moving from WEBrick to Mongrel

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Ruby

I’ve been moving more and more pages over to NetAdminTools, and the render time is starting to take a long time. => Booting WEBrick => Rails 2.3.4 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2010-07-20 06:29:17] INFO WEBrick 1.3.1 [2010-07-20 06:29:17] INFO ruby 1.8.7 (2009-12-24) [i686-linux] [2010-07-20 […]

Ruby Loops and ANSI Color

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Ruby

Here is a quick little script to illustrate loops and the Term-Ansicolor gem: require “rubygems” require “term/ansicolor” c = Term::ANSIColor print c.white,c.bold,c.on_blue print ” ” puts for w in [ “words”,”in”,”an”,”array” ] print ” “+w end print ” ” print c.reset print “\n” I originally made this because wanted to create a graphic with monospaced […]

Passenger Memory Stats

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Ruby

Use passenger-memory-stats while your app is loaded to see how your system handles your session settings. We use the –max-pool-size 50 option to limit the number of passenger sessions that connect to our RoR application. Here are the stats under load: root:/usr/local/bin# passenger-memory-stats ————- Apache processes ————- *** WARNING: The Apache executable cannot be found. […]

403 Forbidden Error With Passenger

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Ruby

I spent way, way too much time troubleshooting a 403 error with Passenger: =============== Phusion Passenger Standalone web server started PID file: /opt/mcjr/passenger.9000.pid Log file: /opt/mcjr/log/development.log Environment: development Accessible via: http://0.0.0.0:9000/ Serving in the background as a daemon. 403 Forbidden nginx/0.8.52 It turns out that even though thee permissions on my rails app were fine, […]

Converting a Rails App to present with GTK

Last Updated: October 26th, 2023 - Paul Anderson

By Paul Anderson / October 26, 2023 — Ruby

This article shows how to convert a Rails application to a standard Ruby application, and it shows how to present the data via GTK2. The idea is that a web application and a desktop application can have similar needs, and going back and forth via a common framework has some advantages. We are taking this […]

Ruby Regex Substitution – Benefit of Controllers

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Ruby

This site is generated on RoR, but published as static HTML. It goes way, way back, and the images are referenced in many ways. I think there is a decent chance that some images are referenced without quotes. I added a feature for mobile views years ago, so that I could easily browse with my […]

NT Administration from the Command Line

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Administration

In addition to using the GUI to create accounts and groups, the command line can be used. This is often useful when automating server setup or recovery. net user jsmith tempword /ADD /FULLNAME:”John Smith” /COMMENT:”Accounting Manager” net localgroup “Accounting Local Resource Group” /add /COMMENT:”Payroll and A/R Files” net group “Accounting Members” /ADD /COMMENT:”Members have access […]

Simple multi-tape backup with tar / Standby File/Print Server

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Backup/Recovery

We have a share available via NFS called share. All of our software, documents, versions of websites are on this share. It doesn’t contain any live systems stuff, but it is quite large. We bought a 15/30 gig DLT drive for cheap on Ebay, and some used DLT tapes to go with it. Many of […]

SYSLINUX

Last Updated: October 3rd, 2016 - Paul Anderson

By Paul Anderson / October 3, 2016 — Backup/Recovery

[Updated 8/27/02] SYSLINUX is a bootloader for Linux using MS-DOS floppies. It is good to learn how to create your own SYSLINUX recovery diskettes for disaster recovery. [On a related topic, check out SuperRescue CD. SuperRescue is an iso image you can burn to a CD. The CD is bootable and has a suite of […]

« Previous Page
Next Page »

Search

Must Read Resources

  • WHITE PAPER
    Network Management Software Buyers Guide
  • WHITE PAPER
    GNS3 Network Emulator Training
  • WHITE PAPER
    Netflow Best Practices
  • WHITE PAPER
    Learn how to Analyze Packet with Deep Analysis
  • WHITE PAPER
    How to Find your Highest Bandwidth Users
Network Admin Tools
Network Admin Tools

Categories

  • Active Directory
  • Administration
  • Backup/Recovery
  • BSD
  • Bugs and Fixes
  • Certification
  • Comparisons
  • Database
  • Desktop
  • DIY
  • Email
  • ERP
  • File/Print
  • GIAGD
  • GNU/Linux
  • GNU/Linux Dictionary
  • Hardware
  • Information Grab Bag
  • Interoperability
  • Monitoring
  • Name Resolution and DNS
  • Network Management Software
  • Network Services
  • Networking
  • Perl
  • REALbasic
  • Remote Control
  • Ruby
  • Security
  • Software
  • Solaris
  • Syslog Servers
  • TFTP Server
  • Uncategorized
  • Web
Network Admin Tools
Network Admin Tools

Information

  • Contact
  • Privacy Policy
  • Terms of Use
  • Disclaimer
  • Legal

About

  • About Us
  • Contribute
  • Staff/Authors

© 2026 Network Admin Tools · Powered by Leanpress