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 that checks if a swedish personnummer is valid. | |
* Author: André Laszlo <andre@laszlo.nu> | |
*/ | |
function check_personnummer(pnr) { | |
// Do formatting and sanity control | |
pnr = pnr.replace(/[^0-9]/g, ''); // only keep digits | |
if (12 == pnr.length) // year format 1985 → 85 | |
pnr = pnr.substr(2); |
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
#!/usr/bin/perl | |
### check_backup.pl | |
# By Nathan Vonnahme, Sept 2011 | |
# An example for "Writing Custom Nagios Plugins in Perl" at the Nagios | |
# World Conference North America 2011. | |
# I. Prologue |
NewerOlder