Category Archives: How Tos

HOWTO: Create a random alpha-numeric string in Perl

Creating an alpha-numeric string in Perl is easy, but having a quick function you can call is better! This is very useful for things like password generators. To see how to do this in Python, check out this post: …howto-create-a-random-alpha-numeric-string-in-python … Continue reading

Posted in How Tos, perl, Programming | Leave a comment

HOWTO: Create a random alpha-numeric string in Python

Creating an alpha-numeric string in python is easy, but having a quick function you can call or import as a module is better! This is very useful for things like password generators. To see how to do this in Perl, … Continue reading

Posted in How Tos, Programming, python | Leave a comment

How To Prevent A Python Script From Running As Root

At or near the top of your app, before it executes anything sensitive, place the following code: if os.geteuid()==0:     print “Cannot run as root!”     sys.exit(1) How to do this in PERL: …how-to-prevent-a-perl-script-from-running-as-root… Did you find this post useful or have … Continue reading

Posted in How Tos, Programming, python | Leave a comment