Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by J1mbo

  1. J1mbo

    Help with rewrite rule

    Thanks Feherke.
  2. J1mbo

    Help with rewrite rule

    Thanks for the reply. I can't seem to find any good documentation on the use of "!" w/ mod_rewrite, but i thought it was correct from what i've seen in other examples. I'll look into this more closely though. The [^ ] works for negative character classes, but it doesn't work in this situation.
  3. J1mbo

    Help with rewrite rule

    I have the following working rules in my httpd.conf for redirecting http to https based on the URI: ### Redirect port 80 to port 443 (ssl) for secure content RewriteCond %{SERVER_PORT} ^80$ RewriteCond %{REQUEST_URI} ^.*(password|phpmyadmin).*$ [NC] RewriteRule ^.*$...
  4. J1mbo

    eval a hash variable inside function

    Thanks, but it has to be a variable going into the function since the function will be processing more than just the one user in my example.
  5. J1mbo

    Javascript checking for correct input.

    There is a numeric form validation function in validate.js: http://webcoder.info/downloads/validate.html
  6. J1mbo

    eval a hash variable inside function

    I have this code that parses smb.conf and puts a users shares/descriptions into a hash of the username: open(CONFIG, "$smbconf") || die; while (<CONFIG>) { next unless m/^\[([a-zA-Z0-9]+)\]$/; $ShareName = $1; while (<CONFIG>) { next unless m/^\s+comment \=...
  7. J1mbo

    MAILX - email body not giving &quot;new line&quot;

    Have you tried unix2dos? unix2dos $mail_file | mailx -s "Audit" user@domain.net
  8. J1mbo

    Drop decimal places without rounding

    This one handles whatever number of numbers occur after the decimal: $amtr1 = "3,750.94545645"; $amtr1 = preg_replace('/([\d,]+.\d{2})\d+/', '$1', $amtr1); print "$amtr1";
  9. J1mbo

    Drop decimal places without rounding

    Here's my preg_replace solution: $amtr1 = "3,750.945"; $amtr1 = preg_replace('/([\d,]+.\d{2})\d/', '$1', $amtr1); print "$amtr1";
  10. J1mbo

    Drop decimal places without rounding

    <?php $amtr1 = 3,750.945; $last = $amtr1{strlen($amtr1)-1}; $amtr = rtrim($amtr1, "$last"); print "$amtr"; ?> There's probably a simpler/quicker solution using ereg_replace though.
  11. J1mbo

    jumpstart install getting Link Down - cable problem

    Do you have more than one network interface? What is the output of the 'show-nets' command from the ok prompt? If you have multiple interfaces, try selecting each interface from the show-nets output and then running your boot command again.
  12. J1mbo

    Monitoring an application

    tusc or strace may be what you need. Try googling them for more info.
  13. J1mbo

    How to restrict website access by country

    Thanks for the link. I understand proxies and that hackers exist in the US. I'm trying to eliminate the larger threat and make it not worth their time to bother with me. I can prosecute someone in the US much easier than say Russia or Turkey too. Cheers,
  14. J1mbo

    Date comparison function

    This isn't accomplished very easily with the shell. I researched this issue some time ago and decided to use perl with the date::calc module. Here is a reference i found for a ksh method in my research though: http://www.itworld.com/Comp/2378/swol-0299-unix101/pfindex.html Good Luck,
  15. J1mbo

    How to restrict website access by country

    I had a hacker deface my website a few weeks ago. I've since blocked his IP address range from accessing my site. I'm was wondering if anyone has a mapping of IP addresses to countries so i can block everyone outside the US? I've looked around google w/o any luck. Thanks,

Part and Inventory Search

Back
Top