Author Archives: admin

port check with perl

If you are on a machine without telnet you can use this perl script to check connectivity. #!/usr/bin/perl# # nettest.pl# use IO::Socket;use Errno;$| = 1; $host = shift;$port = shift;$type = shift || “tcp”;die “No Host parameter!” if !$host;die “No Port … Continue reading

Posted in Uncategorized | Comments Off on port check with perl

Cleaning up Docker Images

Here is great way to clean up docker images that are not being used.

Posted in Uncategorized | Tagged | Leave a comment

Onscreen Keyboard

When using Remote desktop to change your password, you have to press ctrl-alt-delete. Usually you can use ctrl-End on your remote machine — but sometimes that doesn’t work. Using the windows onscreen keyboard will do the trick. Run -> enter … Continue reading

Posted in Uncategorized | Leave a comment

crontab to check for updates on Redhat or Centos

This is the entry we use to check for updates everynight. If updates are available it will download them and send email so you can just jump on machine and do yum update -y 6 5 * * * /usr/bin/yum … Continue reading

Posted in Uncategorized | Leave a comment

perl toggle operator for extracting one table from mysql dump file

We did it with a nifty one liner perl command that uses the TOGGLE operator. zcat fast.dmp.12082014_13_03.sql.gz |perl -ne ‘if (/CREATE TABLE `budget`/../UNLOCK/ ) {print $_; }’ > budget.1208.sql This looks for lines in the dump between lines that match … Continue reading

Posted in Uncategorized | Leave a comment

Keep submit buttons from submitting twice

Jquery One function works nicely for limiting a bind event to only one time. Just be sure to re-bind it ONE time when the server sends back an error when validating the form inputs. $objResponse->script(” $(‘#submit_edit_prod_personalization_form’).button().one(‘click’,function() { xajax_update_prod_personalization(xajax.getFormValues(‘edit_prod_personalization_form’)); });”);

Posted in Uncategorized | Leave a comment

Quick way to find IP address

Here is a quick way to find the external IP address of a system.  It can be used scripts etc wget http://ipinfo.io/ip -qO –

Posted in Uncategorized | Leave a comment

Find out what CAs a webserver will accept

Here is a handy command to find out what CAs are accepted by a website.  When your website is configured to require client PKI certificates with the SSLVerifyClient require directive, it will only accept client certificates issued by CAs that … Continue reading

Posted in Uncategorized | Leave a comment

Setting up NTP to keep server time in sync

Install ntp packages yum install ntp Redhat 5 need ntpdate separately yum install nptdate Set ntp to start on boot: chkconfig –level 345 ntp on chkconfig –level 345 ntpdate on For redhat 7: systemctl enable ntpd.service Verify with this: chkconfig … Continue reading

Posted in Uncategorized | Leave a comment

Quick HTTP server

If you need to pull files from a linux box.  This handy python command will turn on a temporary HTTP server listening on port 8000   cd to directory you want to pull files from and type: python -m SimpleHTTPServer … Continue reading

Posted in Uncategorized | Leave a comment